Mercurial > hg > truffle
comparison src/share/vm/code/relocInfo.cpp @ 20480:33acb0c42664
8044538: assert(which != imm_operand) failed: instruction is not a movq reg, imm64
Summary: Fixed internal_word_Relocation::target() to not retrieve target address from code if relocation points into the constant section. Added test.
Reviewed-by: kvn
author | thartmann |
---|---|
date | Wed, 11 Jun 2014 09:16:19 +0200 |
parents | 78bbf4d43a14 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20479:07e01043ade7 | 20480:33acb0c42664 |
---|---|
875 | 875 |
876 | 876 |
877 void internal_word_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) { | 877 void internal_word_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) { |
878 address target = _target; | 878 address target = _target; |
879 if (target == NULL) { | 879 if (target == NULL) { |
880 if (addr_in_const()) { | 880 target = new_addr_for(this->target(), src, dest); |
881 target = new_addr_for(*(address*)addr(), src, dest); | |
882 } else { | |
883 target = new_addr_for(pd_get_address_from_code(), src, dest); | |
884 } | |
885 } | 881 } |
886 set_value(target); | 882 set_value(target); |
887 } | 883 } |
888 | 884 |
889 | 885 |
890 address internal_word_Relocation::target() { | 886 address internal_word_Relocation::target() { |
891 address target = _target; | 887 address target = _target; |
892 if (target == NULL) { | 888 if (target == NULL) { |
893 target = pd_get_address_from_code(); | 889 if (addr_in_const()) { |
890 target = *(address*)addr(); | |
891 } else { | |
892 target = pd_get_address_from_code(); | |
893 } | |
894 } | 894 } |
895 return target; | 895 return target; |
896 } | 896 } |
897 | 897 |
898 //--------------------------------------------------------------------------------- | 898 //--------------------------------------------------------------------------------- |