-/* jit/stack.c - stack analysis
+/* vm/jit/stack.c - stack analysis
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
Changes: Edwin Steiner
- $Id: stack.c 1582 2004-11-24 13:57:36Z twisti $
+ $Id: stack.c 1680 2004-12-04 12:02:08Z jowenn $
*/
#include <stdio.h>
#include <string.h>
-#include "global.h"
-#include "native.h"
-#include "builtin.h"
+
#include "disass.h"
-#include "tables.h"
#include "types.h"
-#include "options.h"
-#include "statistics.h"
-#include "jit/codegen.inc.h"
-#include "jit/jit.h"
-#include "jit/stack.h"
-#include "jit/reg.h"
+#include "mm/memory.h"
+#include "native/native.h"
#include "toolbox/logging.h"
-#include "toolbox/memory.h"
+#include "vm/global.h"
+#include "vm/builtin.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "vm/tables.h"
+#include "vm/jit/codegen.inc.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/reg.h"
+#include "vm/jit/stack.h"
/**********************************************************************/
}
else if (bptr->indepth != stackdepth) {
show_icmd_method(m, cd, rd);
- printf("Block: %ld, required depth:%ld, current depth:%ld\n",bptr->debug_nr,bptr->indepth,stackdepth);
+ printf("Block: %d, required depth: %d, current depth: %d\n", bptr->debug_nr, bptr->indepth, stackdepth);
panic("Stack depth mismatch");
}
if (breplace && opcode == breplace->opcode) {
iptr[0].opc = breplace->icmd;
iptr[0].op1 = breplace->type_d;
- iptr[0].val.a = breplace->builtin;
+ iptr[0].val.fp = breplace->builtin;
m->isleafmethod = false;
switch (breplace->icmd) {
case ICMD_BUILTIN1:
if (breplace && opcode == breplace->opcode) {
iptr[0].opc = breplace->icmd;
iptr[0].op1 = breplace->type_d;
- iptr[0].val.a = breplace->builtin;
+ iptr[0].val.fp = breplace->builtin;
m->isleafmethod = false;
switch (breplace->icmd) {
case ICMD_BUILTIN1:
#if !SUPPORT_DIVISION
iptr[0].opc = ICMD_BUILTIN2;
iptr[0].op1 = TYPE_INT;
- iptr[0].val.a = BUILTIN_idiv;
+ iptr[0].val.fp = BUILTIN_idiv;
m->isleafmethod = false;
goto builtin2;
#endif
#if !SUPPORT_DIVISION
iptr[0].opc = ICMD_BUILTIN2;
iptr[0].op1 = TYPE_INT;
- iptr[0].val.a = BUILTIN_irem;
+ iptr[0].val.fp = BUILTIN_irem;
m->isleafmethod = false;
goto builtin2;
#endif
#if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV)
iptr[0].opc = ICMD_BUILTIN2;
iptr[0].op1 = TYPE_LNG;
- iptr[0].val.a = BUILTIN_ldiv;
+ iptr[0].val.fp = BUILTIN_ldiv;
m->isleafmethod = false;
goto builtin2;
#endif
#if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV)
iptr[0].opc = ICMD_BUILTIN2;
iptr[0].op1 = TYPE_LNG;
- iptr[0].val.a = BUILTIN_lrem;
+ iptr[0].val.fp = BUILTIN_lrem;
m->isleafmethod = false;
goto builtin2;
#endif
printf("\n");
}
printf("\n");
-
+#ifdef LSRA
+ if (!opt_lsra) {
+#endif
printf("Interface Table:\n");
for (i = 0; i < cd->maxstack; i++) {
if ((rd->interfaces[i][0].type >= 0) ||
}
}
printf("\n");
-
+#ifdef LSRA
+ }
+#endif
if (showdisassemble) {
#if defined(__I386__) || defined(__X86_64__)
u1 *u1ptr;
printf("\n");
i = bptr->mpc;
- s4ptr = (s4 *) (m->mcode + cd->dseglen + i);
+ s4ptr = (s4 *) ((ptrint) m->mcode + cd->dseglen + i);
if (bptr->next != NULL) {
for (; i < bptr->next->mpc; i += 4, s4ptr++) {
printf("\n");
} else {
- for (; s4ptr < (s4 *) (m->mcode + m->mcodelength); i += 4, s4ptr++) {
+ for (; s4ptr < (s4 *) ((ptrint) m->mcode + m->mcodelength); i += 4, s4ptr++) {
disassinstr(s4ptr, i);
}
printf("\n");
break;
case ICMD_INLINE_START:
- printf("\t\t\t%s.%s%s",iptr->method->class->name->text,iptr->method->name->text,iptr->method->descriptor->text);
+ 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;
case ICMD_INLINE_END:
break;
}
break;
}
-/* printf(" Line number: %d, method:",iptr->line); */
+ printf(" Line number: %d, method:",iptr->line);
/* printf("\t\t");
utf_display(iptr->method->class->name);
printf(".");