зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1595222 - Don't define an unused |AtomicReturnReg64| on x86. r=lth
Differential Revision: https://phabricator.services.mozilla.com/D52424 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
13580b8fea
Коммит
a12c597a4f
|
@ -135,9 +135,7 @@ static constexpr Register AtomicTemp = edx;
|
|||
static constexpr Register64 AtomicValReg64(edx, eax);
|
||||
static constexpr Register64 AtomicVal2Reg64(ecx, ebx);
|
||||
|
||||
// At the time of writing, ReturnReg64 is not edx:eax, but it is what our C/C++
|
||||
// compilers use.
|
||||
static constexpr Register64 AtomicReturnReg64(edx, eax);
|
||||
// AtomicReturnReg64 is unused on x86.
|
||||
|
||||
#else
|
||||
# error "Unsupported platform"
|
||||
|
@ -432,9 +430,10 @@ static uint32_t GenCmpxchg(MacroAssembler& masm, Scalar::Type size,
|
|||
#if defined(JS_CODEGEN_X86)
|
||||
MOZ_ASSERT(AtomicValReg64 == Register64(edx, eax));
|
||||
MOZ_ASSERT(AtomicVal2Reg64 == Register64(ecx, ebx));
|
||||
masm.lock_cmpxchg8b(edx, eax, ecx, ebx, Operand(addr));
|
||||
|
||||
MOZ_ASSERT(AtomicReturnReg64 == Register64(edx, eax));
|
||||
// The return register edx:eax is a compiler/ABI assumption that is *not*
|
||||
// the same as ReturnReg64, so it's correct not to use that here.
|
||||
masm.lock_cmpxchg8b(edx, eax, ecx, ebx, Operand(addr));
|
||||
#else
|
||||
masm.compareExchange64(sync, addr, AtomicValReg64, AtomicVal2Reg64,
|
||||
AtomicReturnReg64);
|
||||
|
|
Загрузка…
Ссылка в новой задаче