diff options
author | never <none@none> | 2008-09-03 14:57:00 -0700 |
---|---|---|
committer | never <none@none> | 2008-09-03 14:57:00 -0700 |
commit | 0b839c7101e948e14191fc940eb2cecd7a7833c0 (patch) | |
tree | 67625bca1cd2e47756ec489d1aa40f9faba944a5 | |
parent | 8f7519c7065cd6113c5f6fc655c48b891cc327e0 (diff) |
6744422: incorrect handling of -1 in set_jump_destination
Reviewed-by: rasbold
-rw-r--r-- | src/cpu/x86/vm/nativeInst_x86.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cpu/x86/vm/nativeInst_x86.hpp b/src/cpu/x86/vm/nativeInst_x86.hpp index c3951c5af..bd15cbb7b 100644 --- a/src/cpu/x86/vm/nativeInst_x86.hpp +++ b/src/cpu/x86/vm/nativeInst_x86.hpp @@ -391,6 +391,9 @@ class NativeJump: public NativeInstruction { 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 |