CAS code misses check for null
Andrew Haley
aph at redhat.com
Tue Jun 14 10:11:14 UTC 2016
Do you think that it might be easier to have a macro which takes a dst
and does this?
void ShenandoahBarrierSet::interpreter_read_barrier(MacroAssembler* masm, Register src, Register dst) {
Label is_null;
__ mov(dst, src);
__ cbz(src, is_null);
__ ldr(dst, Address(src, BrooksPointer::BYTE_OFFSET));
__ bind(is_null);
}
It'd make all this stuff much easier to understand. And the
efficiency would not be very much different.
Andrew.
More information about the shenandoah-dev
mailing list