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 //--------------------------------------------------------------------------------- |