Mercurial > hg > graal-compiler
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/code/relocInfo.cpp Tue Jun 24 08:12:30 2014 +0200 +++ b/src/share/vm/code/relocInfo.cpp Wed Jun 11 09:16:19 2014 +0200 @@ -877,11 +877,7 @@ void internal_word_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) { address target = _target; if (target == NULL) { - if (addr_in_const()) { - target = new_addr_for(*(address*)addr(), src, dest); - } else { - target = new_addr_for(pd_get_address_from_code(), src, dest); - } + target = new_addr_for(this->target(), src, dest); } set_value(target); } @@ -890,7 +886,11 @@ address internal_word_Relocation::target() { address target = _target; if (target == NULL) { - target = pd_get_address_from_code(); + if (addr_in_const()) { + target = *(address*)addr(); + } else { + target = pd_get_address_from_code(); + } } return target; }