changeset 3509:28ba2439034f

recompile upon deoptimizations that are caused by runtime exceptions
author Lukas Stadler <lukas.stadler@jku.at>
date Mon, 08 Aug 2011 18:24:21 +0200
parents 8dbbef133869
children 5f3d12c9f300
files graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java src/cpu/x86/vm/c1_Runtime1_x86.cpp src/cpu/x86/vm/sharedRuntime_x86_64.cpp
diffstat 3 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java	Mon Aug 08 18:00:16 2011 +0200
+++ b/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java	Mon Aug 08 18:24:21 2011 +0200
@@ -623,7 +623,7 @@
             checkSubtype(asm, objHub, objHub, hub);
             asm.jneq(end, objHub, asm.o(null));
             XirOperand scratch = asm.createRegisterTemp("scratch", CiKind.Word, AMD64.r10);
-            asm.mov(scratch, asm.createConstant(CiConstant.forWord(0)));
+            asm.mov(scratch, asm.createConstant(CiConstant.forWord(2)));
 
             asm.callRuntime(CiRuntimeCall.Deoptimize, null);
             asm.shouldNotReachHere();
--- a/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Mon Aug 08 18:00:16 2011 +0200
+++ b/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Mon Aug 08 18:24:21 2011 +0200
@@ -101,6 +101,7 @@
     restore_live_registers(this, false);
     movptr(Address(thread, Thread::pending_exception_offset()), NULL_WORD);
     leave();
+    movl(rscratch1, 2); // InvalidateRecompile
     jump(RuntimeAddress(SharedRuntime::deopt_blob()->uncommon_trap()));
     bind(L);
   }
--- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Mon Aug 08 18:00:16 2011 +0200
+++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Mon Aug 08 18:24:21 2011 +0200
@@ -2642,7 +2642,7 @@
 
   int jmp_uncommon_trap_offset = __ pc() - start;
   __ pushptr(Address(r15_thread, in_bytes(JavaThread::ScratchA_offset())));
-  __ movptr(rscratch1, 0);
+  __ movptr(rscratch1, 2); // InvalidateRecompile
 
   int uncommon_trap_offset = __ pc() - start;