[aarch64-port-dev ] RFR: 8216350: AArch64: monitor unlock fast path not called

Nick Gasson (Arm Technology China) Nick.Gasson at arm.com
Tue Jan 8 09:00:25 UTC 2019


Hi Andrew,

On 08/01/2019 16:49, Andrew Haley wrote:
> 
> Thanks. How does this compare with the x86 code?
> 

In macroAssembler_x86.cpp MacroAssembler::fast_lock the _LP64 version 
also uses markOopDesc::unused_mark()

   // Unconditionally set box->_displaced_header = 
markOopDesc::unused_mark().
   // Without cast to int32_t movptr will destroy r10 which is typically 
obj.
   movptr(Address(boxReg, 0), 
(int32_t)intptr_t(markOopDesc::unused_mark()));

(The !_LP64 version uses the literal "3" which is just 
markOopDesc::unused_mark anyway.)

And then in the x86 fast_unlock they are testing the same bit as AArch64:

   testptr(tmpReg, markOopDesc::monitor_value);    // Inflated?

Thanks,
Nick


More information about the aarch64-port-dev mailing list