From 412348d9380f52fdc7e27c4f341becff01f81aa6 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sun, 1 Mar 2009 10:49:37 -0700 Subject: [PATCH] fix stack offset calulation for multianewarray --- src/compile.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/compile.cpp b/src/compile.cpp index 1def67c9fb..e6dd24559a 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -3427,13 +3427,9 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip, if (UNLIKELY(t->exception)) return; PROTECT(t, class_); - unsigned offset = alignedFrameSize(t, context->method) - - t->arch->frameHeaderSize() - - (localSize(t, context->method) - - methodParameterFootprint(t, context->method) - - 1) - + t->arch->frameReturnAddressSize() - - c->index(c->top()); + unsigned offset = localOffset + (t, localSize(t, context->method) + c->index(c->top()), + context->method) / BytesPerWord; Compiler::Operand* result = c->call (c->constant(getThunk(t, makeMultidimensionalArrayThunk)), @@ -4185,11 +4181,11 @@ finish(MyThread* t, Allocator* allocator, Context* context) strcmp (reinterpret_cast (&byteArrayBody(t, className(t, methodClass(t, context->method)), 0)), - "Arrays") == 0 and + "java/lang/Throwable") == 0 and strcmp (reinterpret_cast (&byteArrayBody(t, methodName(t, context->method), 0)), - "main") == 0) + "printStackTrace") == 0) { #ifdef __POWERPC__ asm("trap");