From fc898c4df1cc9786834f6124cb869202abb764b9 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 16 Oct 2007 12:10:56 -0600 Subject: [PATCH 1/2] fix broken assumption that all native functions will push rbp on the stack first thing --- src/compile.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/compile.cpp b/src/compile.cpp index e4a2097524..9db70a7d03 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -2089,7 +2089,13 @@ class Compiler: public Assembler { lea(rsp, FrameFootprint + BytesPerWord, rcx); mov(rcx, rdi, threadFrameOffset()); // set thread frame to current - jmp(rbx); + push(rbp); + + call(rbx); + + add(BytesPerWord, rsp); + + ret(); return finish(); } From 200e9339235365789e8d8a9fca2df218637a54f5 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 16 Oct 2007 12:16:12 -0600 Subject: [PATCH 2/2] fix regression related to logging verbosity and exception handling in compile.cpp --- src/compile.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/compile.cpp b/src/compile.cpp index 9db70a7d03..009ab474f3 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -894,17 +894,16 @@ findExceptionHandler(Thread* t, void* frame) catchType = 0; } - if (Verbose and - (catchType == 0 or - instanceOf(t, catchType, t->exception))) - { - fprintf(stderr, "exception handler match for %d in %s: " - "start: %d; end: %d; ip: %d\n", - offset, - &byteArrayBody(t, methodName(t, frameMethod(frame)), 0), - nativeExceptionHandlerStart(handler), - nativeExceptionHandlerEnd(handler), - nativeExceptionHandlerIp(handler)); + if (catchType == 0 or instanceOf(t, catchType, t->exception)) { + if (Verbose) { + fprintf(stderr, "exception handler match for %d in %s: " + "start: %d; end: %d; ip: %d\n", + offset, + &byteArrayBody(t, methodName(t, frameMethod(frame)), 0), + nativeExceptionHandlerStart(handler), + nativeExceptionHandlerEnd(handler), + nativeExceptionHandlerIp(handler)); + } return handler; }