[aarch64-port-dev ] RFR(XS): 8221995: AARCH64: problems with CAS instructions encoding
Dmitrij Pochepko
dmitrij.pochepko at bell-sw.com
Fri Apr 5 16:15:25 UTC 2019
Thank you for review.
On 05/04/2019 7:12 PM, Andrew Haley wrote:
> Hi,
>
> On 4/5/19 3:03 PM, Dmitrij Pochepko wrote:
>
>> please review small patch for JDK-8221995: AARCH64: problems with CAS
>> instructions encoding
>> webrev: http://cr.openjdk.java.net/~dpochepk/8221995/webrev/
>>
>> Patch fix 3 problems:
>> - specification allows addressing register to be SP, while current
>> hotspot encoding implementation hits assert in this case
>>
>> - specification allows data register(s) to be ZR, while current hotspot
>> encoding implementation hits assert in this case
>> - all pair CAS instructions (CASP*) are encoded incorrectly in bit 23,
>> which leads to another instructions generation instead (CAS*B and CAS*H)
>>
>> Current code shape doesn't generate CAS* instructions using affected
>> cases. That is why these problems wasn't found before.
>>
>> Testing:
>>
>> I generated code with CAS and CASP with and without patch. Patched
>> version hits no asserts while using zr and sp registers. And casp*
>> instruction now generated correctly.
>> CR: https://bugs.openjdk.java.net/browse/JDK-8221995
> It's hard to find a use case for CAS into the stack. I guess that ZR
> as a compare register is reasonable enough, but I think we never
> generate it. I don't think we use CASP at all.
>
> So, I think this makes no difference to the VM, but it's a decent
> cleanup. OK.
>
More information about the aarch64-port-dev
mailing list