Skip to content

Commit e08ce93

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[vm] Fix clobbered THR/R14 in StoreReleaseLoadAcquire[1204] tests.
TEST=ci Change-Id: I8297d630b47c422b420d3d3bc8d2a6876d446eaf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397421 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Alexander Aprelev <[email protected]>
1 parent 4b2b0a8 commit e08ce93

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

runtime/vm/compiler/assembler/assembler_x64_test.cc

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6229,12 +6229,10 @@ IMMEDIATE_TEST(AddrImmRAXByte,
62296229
__ popq(RAX))
62306230

62316231
ASSEMBLER_TEST_GENERATE(StoreReleaseLoadAcquire, assembler) {
6232-
if (FLAG_target_thread_sanitizer) {
6233-
// On TSAN builds StoreRelease/LoadAcquire will do a runtime
6234-
// call to tell TSAN about our action.
6235-
__ MoveRegister(THR, CallingConventions::kArg2Reg);
6236-
}
6237-
6232+
// On TSAN builds StoreRelease/LoadAcquire will do a runtime
6233+
// call to tell TSAN about our action.
6234+
__ pushq(THR);
6235+
__ MoveRegister(THR, CallingConventions::kArg2Reg);
62386236
__ pushq(RCX);
62396237
__ xorq(RCX, RCX);
62406238
__ pushq(RCX);
@@ -6299,6 +6297,7 @@ ASSEMBLER_TEST_GENERATE(StoreReleaseLoadAcquire, assembler) {
62996297
__ LoadAcquireFromOffset(CallingConventions::kReturnReg, RSP, 0);
63006298
__ popq(RCX);
63016299
__ popq(RCX);
6300+
__ popq(THR);
63026301
__ ret();
63036302
}
63046303

@@ -6308,12 +6307,10 @@ ASSEMBLER_TEST_RUN(StoreReleaseLoadAcquire, test) {
63086307
}
63096308

63106309
ASSEMBLER_TEST_GENERATE(StoreReleaseLoadAcquire1024, assembler) {
6311-
if (FLAG_target_thread_sanitizer) {
6312-
// On TSAN builds StoreRelease/LoadAcquire will do a runtime
6313-
// call to tell TSAN about our action.
6314-
__ MoveRegister(THR, CallingConventions::kArg2Reg);
6315-
}
6316-
6310+
// On TSAN builds StoreRelease/LoadAcquire will do a runtime
6311+
// call to tell TSAN about our action.
6312+
__ pushq(THR);
6313+
__ MoveRegister(THR, CallingConventions::kArg2Reg);
63176314
__ pushq(RCX);
63186315
__ xorq(RCX, RCX);
63196316
__ pushq(RCX);
@@ -6323,6 +6320,7 @@ ASSEMBLER_TEST_GENERATE(StoreReleaseLoadAcquire1024, assembler) {
63236320
__ addq(RSP, Immediate(1024));
63246321
__ popq(RCX);
63256322
__ popq(RCX);
6323+
__ popq(THR);
63266324
__ ret();
63276325
}
63286326

0 commit comments

Comments
 (0)