Christian Thalinger
Christian Ullrich
- $Id: stack.c 2926 2005-07-07 14:33:27Z christian $
+ $Id: stack.c 2936 2005-07-08 15:08:04Z twisti $
*/
/* pop 3 push 0 */
- case ICMD_IASTORE:
case ICMD_AASTORE:
+#if defined(__POWERPC__)
+ COUNT(count_check_null);
+ COUNT(count_check_bound);
+ COUNT(count_pcmd_mem);
+
+ bte = (builtintable_entry *) iptr->val.a;
+ md = bte->md;
+ i = iptr->op1;
+
+ if (md->memuse > rd->memuse)
+ rd->memuse = md->memuse;
+ if (md->argintreguse > rd->argintreguse)
+ rd->argintreguse = md->argintreguse;
+
+ /* make all stack variables saved */
+
+ copy = curstack;
+ while (copy) {
+ copy->flags |= SAVEDVAR;
+ copy = copy->prev;
+ }
+
+ OP3TIA_0(TYPE_ADR);
+ break;
+#endif
+
+ case ICMD_IASTORE:
case ICMD_LASTORE:
case ICMD_FASTORE:
case ICMD_DASTORE:
COUNT(count_check_null);
COUNT(count_check_bound);
COUNT(count_pcmd_mem);
- OP3TIA_0(opcode-ICMD_IASTORE);
+ OP3TIA_0(opcode - ICMD_IASTORE);
break;
case ICMD_BASTORE:
break;
/* pop 2 push 1 */
-
+
+#if defined(__POWERPC__)
+ case ICMD_IDIV:
+ case ICMD_IREM:
+#if !SUPPORT_DIVISION
+ bte = (builtintable_entry *) iptr->val.a;
+ md = bte->md;
+ i = iptr->op1;
+
+ if (md->memuse > rd->memuse)
+ rd->memuse = md->memuse;
+ if (md->argintreguse > rd->argintreguse)
+ rd->argintreguse = md->argintreguse;
+
+ /* make all stack variables saved */
+
+ copy = curstack;
+ while (copy) {
+ copy->flags |= SAVEDVAR;
+ copy = copy->prev;
+ }
+#endif
+#else
case ICMD_IDIV:
#if !SUPPORT_DIVISION
bte = builtintable_get_internal(BUILTIN_idiv);
iptr->val.a = bte;
m->isleafmethod = false;
goto builtin;
+#endif
#endif
case ICMD_ISHL:
OP2_1(TYPE_INT);
break;
+#if defined(__POWERPC__)
+ case ICMD_LDIV:
+ case ICMD_LREM:
+#if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV)
+ bte = (builtintable_entry *) iptr->val.a;
+ md = bte->md;
+ i = iptr->op1;
+
+ if (md->memuse > rd->memuse)
+ rd->memuse = md->memuse;
+ if (md->argintreguse > rd->argintreguse)
+ rd->argintreguse = md->argintreguse;
+
+ /* make all stack variables saved */
+
+ copy = curstack;
+ while (copy) {
+ copy->flags |= SAVEDVAR;
+ copy = copy->prev;
+ }
+#endif
+#else
case ICMD_LDIV:
#if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV)
bte = builtintable_get_internal(BUILTIN_ldiv);
iptr->val.a = bte;
m->isleafmethod = false;
goto builtin;
+#endif
#endif
case ICMD_LMUL:
OP1_1(TYPE_ADR, TYPE_ADR);
break;
+ case ICMD_ARRAYCHECKCAST:
+ bte = (builtintable_entry *) iptr->val.a;
+ md = bte->md;
+
+ if (md->memuse > rd->memuse)
+ rd->memuse = md->memuse;
+ if (md->argintreguse > rd->argintreguse)
+ rd->argintreguse = md->argintreguse;
+
+ /* make all stack variables saved */
+
+ copy = curstack;
+ while (copy) {
+ copy->flags |= SAVEDVAR;
+ copy = copy->prev;
+ }
+
+ OP1_1(TYPE_ADR, TYPE_ADR);
+ break;
+
case ICMD_INSTANCEOF:
case ICMD_ARRAYLENGTH:
OP1_1(TYPE_ADR, TYPE_INT);
case ICMD_CHECKCAST:
case ICMD_INSTANCEOF:
- if (iptr->op1) {
+ {
classinfo *c = iptr->val.a;
if (c) {
if (c->flags & ACC_INTERFACE)
}
break;
+ case ICMD_ARRAYCHECKCAST:
+ if (iptr->op1) {
+ classinfo *c = ((vftbl_t *) iptr->target)->class;
+ if (c->flags & ACC_INTERFACE)
+ printf(" (INTERFACE) ");
+ else
+ printf(" (CLASS,%3d) ", c->vftbl->diffval);
+ utf_display_classname(c->name);
+ } else {
+ printf(" (NOT RESOLVED) ");
+ utf_display_classname(((constant_classref *) iptr->target)->name);
+ }
+ break;
+
case ICMD_INLINE_START:
printf("\t\t\t%s.%s%s depth=%i",iptr->method->class->name->text,iptr->method->name->text,iptr->method->descriptor->text, iptr->op1);
break;