RFR: JDK-8203172: Primitive heap access for interpreter BarrierSetAssembler/aarch64
Roman Kennke
rkennke at redhat.com
Tue May 15 09:38:52 UTC 2018
Hi Andrew,
> On 14/05/18 21:23, Roman Kennke wrote:
>> . . .
>> Can I please get a review?
> I have only one small question regarding this change in
> templateTable_aarch64.cpp:
>
> @@ -2763,12 +2756,11 @@
>
> // ztos
> {
> __ pop(ztos);
> if (!is_static) pop_and_check_object(obj);
> - __ andw(r0, r0, 0x1);
> - __ strb(r0, field);
> + __ access_store_at(T_BOOLEAN, IN_HEAP, field, r0, noreg, noreg);
> if (rc == may_rewrite) {
> patch_bytecode(Bytecodes::_fast_zputfield, bc, r1, true, byte_no);
> }
> __ b(Done);
> }
>
> The implementation of access_store_at (when the call finally lands in in
> BarrierSetAssembler) for the T_BOOLEAN case simply does an strb. So, the
> andw(r0, r0, 0x1) in the original has been elided in the replacement.
> Was that definitely redundant in the original?
http://cr.openjdk.java.net/~rkennke/JDK-8203172/webrev.00/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp.udiff.html
+ case T_BOOLEAN:
+ __ andw(val, val, 0x1); // boolean is true if LSB is 1
+ __ strb(val, dst);
+ break;
I think it does what you want?
Cheers, Roman
More information about the hotspot-dev
mailing list