Mercurial > hg > truffle
comparison src/cpu/x86/vm/assembler_x86.cpp @ 1047:beb8f45ee9f0
6889740: G1: OpenDS fails with "unhandled exception in compiled code"
Summary: Incorrect code was being generated for the store operation in the null case of the aastore bytecode template. The bad code was generated by the store_heap_oop routine which takes a Register as its second argument. Passing NULL_WORD (0) as the second argument causes the value to be converted to Register(0), which is rax. Thus the generated store was "mov (dst), $rax" instead of "mov (dst), $0x0". Changed calls to store_heap_oop that pass NULL_WORD as the second argument to a new routine store_heap_oop_null.
Reviewed-by: kvn, twisti
author | johnc |
---|---|
date | Thu, 29 Oct 2009 09:42:26 -0700 |
parents | d40f03b57795 |
children | 2f1ec89b9995 |
comparison
equal
deleted
inserted
replaced
1046:72a6752ac432 | 1047:beb8f45ee9f0 |
---|---|
8212 } else { | 8212 } else { |
8213 movq(dst, src); | 8213 movq(dst, src); |
8214 } | 8214 } |
8215 } | 8215 } |
8216 | 8216 |
8217 // Used for storing NULLs. | |
8218 void MacroAssembler::store_heap_oop_null(Address dst) { | |
8219 if (UseCompressedOops) { | |
8220 movl(dst, (int32_t)NULL_WORD); | |
8221 } else { | |
8222 movslq(dst, (int32_t)NULL_WORD); | |
8223 } | |
8224 } | |
8225 | |
8217 // Algorithm must match oop.inline.hpp encode_heap_oop. | 8226 // Algorithm must match oop.inline.hpp encode_heap_oop. |
8218 void MacroAssembler::encode_heap_oop(Register r) { | 8227 void MacroAssembler::encode_heap_oop(Register r) { |
8219 assert (UseCompressedOops, "should be compressed"); | 8228 assert (UseCompressedOops, "should be compressed"); |
8220 assert (Universe::heap() != NULL, "java heap should be initialized"); | 8229 assert (Universe::heap() != NULL, "java heap should be initialized"); |
8221 if (Universe::narrow_oop_base() == NULL) { | 8230 if (Universe::narrow_oop_base() == NULL) { |