6744422: incorrect handling of -1 in set_jump_destination

Wed, 03 Sep 2008 14:57:00 -0700

author
never
date
Wed, 03 Sep 2008 14:57:00 -0700
changeset 749
3a26e9e4be71
parent 748
a10808f5a4b5
child 751
5fa96a5a7e76
child 754
cdbee661c7da

6744422: incorrect handling of -1 in set_jump_destination
Reviewed-by: rasbold

src/cpu/x86/vm/nativeInst_x86.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/cpu/x86/vm/nativeInst_x86.hpp	Tue Sep 02 08:30:41 2008 -0700
     1.2 +++ b/src/cpu/x86/vm/nativeInst_x86.hpp	Wed Sep 03 14:57:00 2008 -0700
     1.3 @@ -391,6 +391,9 @@
     1.4  
     1.5    void  set_jump_destination(address dest)  {
     1.6      intptr_t val = dest - next_instruction_address();
     1.7 +    if (dest == (address) -1) {
     1.8 +      val = -5; // jump to self
     1.9 +    }
    1.10  #ifdef AMD64
    1.11      assert((labs(val)  & 0xFFFFFFFF00000000) == 0 || dest == (address)-1, "must be 32bit offset or -1");
    1.12  #endif // AMD64

mercurial