RFR: JDK-8203157: Object equals abstraction for BarrierSetAssembler
aph at redhat.com
Mon Jun 11 17:11:29 UTC 2018
On 06/11/2018 04:56 PM, Andrew Haley wrote:
> On 06/08/2018 09:17 PM, Roman Kennke wrote:
>> Why is it better? And how would I do that? It sounds like a fairly
>> complex undertaking for a special case. Notice that if the oop doesn't
>> qualify as immediate operand (quite likely for an oop?) it used to be
>> moved into rscratch1 anyway a few lines below.
> Sorry for the slow reply. I'm looking now.
OK. The problem is that this is a very bad code smell:
__ cmpoop(reg1, rscratch1);
I can't tell that this is correct. rscratch1 is used by assembler
macros, and I don't know if some other GC (e.g. ZGC) might need to use
rscratch1 inside cmpoop. The risk here is obvious. The Right Thing
to do IMO is to generate a scratch register for pointer comparisons.
Unless, I guess, we know that cmpoop never ever needs a scratch
register for any forseeable garbage collector.
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-dev