6744422: incorrect handling of -1 in set_jump_destination
authornever
Wed, 03 Sep 2008 14:57:00 -0700
changeset 1076 a4f1c0615381
parent 1075 17aea995eaf9
child 1078 cd4deb70bf5e
child 1123 3fdc7f23127c
6744422: incorrect handling of -1 in set_jump_destination Reviewed-by: rasbold
hotspot/src/cpu/x86/vm/nativeInst_x86.hpp
--- a/hotspot/src/cpu/x86/vm/nativeInst_x86.hpp	Tue Sep 02 08:30:41 2008 -0700
+++ b/hotspot/src/cpu/x86/vm/nativeInst_x86.hpp	Wed Sep 03 14:57:00 2008 -0700
@@ -391,6 +391,9 @@
 
   void  set_jump_destination(address dest)  {
     intptr_t val = dest - next_instruction_address();
+    if (dest == (address) -1) {
+      val = -5; // jump to self
+    }
 #ifdef AMD64
     assert((labs(val)  & 0xFFFFFFFF00000000) == 0 || dest == (address)-1, "must be 32bit offset or -1");
 #endif // AMD64