-bool patcher_checkcast_instanceof_interface(u1 *sp)
-{
- u1 *ra;
- u8 mcode;
- constant_classref *cr;
- classinfo *c;
-
- /* get stuff from the stack */
-
- ra = (u1 *) *((ptrint *) (sp + 5 * 8));
- mcode = *((u8 *) (sp + 3 * 8));
- cr = (constant_classref *) *((ptrint *) (sp + 2 * 8));
-
- /* get the fieldinfo */
-
- if (!(c = resolve_classref_eager(cr)))
- return false;
-
- /* patch back original code */
-
- *((u8 *) ra) = mcode;
-
- /* if we show disassembly, we have to skip the nop's */
-
- if (opt_shownops)
- ra = ra + 5;
-
- /* patch super class index */
-
- *((s4 *) (ra + 7 + 3)) = (s4) c->index;
-
- *((s4 *) (ra + 7 + 7 + 3 + 6 + 3)) =
- (s4) (OFFSET(vftbl_t, interfacetable[0]) -
- c->index * sizeof(methodptr*));
-
- return true;
-}
-
-
-/* patcher_checkcast_class *****************************************************
-
- Machine code:
-
- <patched call position>
- 49 bb 00 00 00 00 00 00 00 00 mov $0x0,%r11
- 45 8b 92 20 00 00 00 mov 0x20(%r10),%r10d
- 45 8b 9b 20 00 00 00 mov 0x20(%r11),%r11d
- 4d 29 da sub %r11,%r10
- 49 bb 00 00 00 00 00 00 00 00 mov $0x0,%r11
-
-*******************************************************************************/
-
-bool patcher_checkcast_class(u1 *sp)
-{
- u1 *ra;
- u8 mcode;
- constant_classref *cr;
- classinfo *c;
-
- /* get stuff from the stack */
-
- ra = (u1 *) *((ptrint *) (sp + 5 * 8));
- mcode = *((u8 *) (sp + 3 * 8));
- cr = (constant_classref *) *((ptrint *) (sp + 2 * 8));
-
- /* get the fieldinfo */
-
- if (!(c = resolve_classref_eager(cr)))
- return false;
-
- /* patch back original code */
-
- *((u8 *) ra) = mcode;
-
- /* if we show disassembly, we have to skip the nop's */
-
- if (opt_shownops)
- ra = ra + 5;
-
- /* patch super class' vftbl */
-
- *((ptrint *) (ra + 2)) = (ptrint) c->vftbl;
- *((ptrint *) (ra + 10 + 7 + 7 + 3 + 2)) = (ptrint) c->vftbl;
-
- return true;
-}
-
-
-/* patcher_instanceof_class ****************************************************
-
- Machine code:
-
- <patched call position>
- 49 ba 00 00 00 00 00 00 00 00 mov $0x0,%r10
-
-*******************************************************************************/
-
-bool patcher_instanceof_class(u1 *sp)
-{
- u1 *ra;
- u8 mcode;
- constant_classref *cr;
- classinfo *c;
-
- /* get stuff from the stack */
-
- ra = (u1 *) *((ptrint *) (sp + 5 * 8));
- mcode = *((u8 *) (sp + 3 * 8));
- cr = (constant_classref *) *((ptrint *) (sp + 2 * 8));
-
- /* get the fieldinfo */
-
- if (!(c = resolve_classref_eager(cr)))
- return false;
-
- /* patch back original code */
-
- *((u8 *) ra) = mcode;
-
- /* if we show disassembly, we have to skip the nop's */
-
- if (opt_shownops)
- ra = ra + 5;
-
- /* patch super class' vftbl */
-
- *((ptrint *) (ra + 2)) = (ptrint) c->vftbl;
-
- return true;
-}
-
-
-/* patcher_clinit **************************************************************
-
- May be used for GET/PUTSTATIC and in native stub.
-
- Machine code:
-
- <patched call position>
- 4d 8b 15 92 ff ff ff mov -110(%rip),%r10
- 49 89 1a mov %rbx,(%r10)
-
-*******************************************************************************/
-
-bool patcher_clinit(u1 *sp)