Adds handling for AArch64 exclusive loads that discard a value by targeting the zero register. Without this fix, we loop forever in the store since we load the real value and compare it to the zero we recorded. Our fix is to replace the zero register with a scratch register so that we record the actual value at load time. For the same-block optimized case, we instead simply skip the value comparison check at the store.
Adds a test of every size and destination zero variant. This test spins (at multiple points) without the fix.
Fixes #5245 (closed)
Activity
requested review from @abhinav92003
- Last updated by Derek Bruening
3391 3427 instr_create_restore_from_tls(dcontext, swap_reg, swap_slot)); 3392 3428 } 3393 3429 } 3430 if (xzr_restore) Not at L3325. Possibly at 3370, but not for the A64 base==sp case: so it gets complicated. I don't think it saves anything to do it early: the slot count is fixed (these are DR's core scratch slots) and we are not out of them here (we do run out for a case in #5247 (closed)). So it would add complexity for no gain: so I would prefer to leave it.
843 881 END_FUNC(FUNCNAME) 844 882 #undef FUNCNAME 845 883 884 #ifdef AARCH64 885 /* int ldstex_inc32_with_xzr(two_counters_t *counter) 886 */ - Last updated by Derek Bruening