summaryrefslogtreecommitdiff
path: root/chromium/v8/src/wasm/baseline/x64/liftoff-assembler-x64.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/v8/src/wasm/baseline/x64/liftoff-assembler-x64.h')
-rw-r--r--chromium/v8/src/wasm/baseline/x64/liftoff-assembler-x64.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/chromium/v8/src/wasm/baseline/x64/liftoff-assembler-x64.h b/chromium/v8/src/wasm/baseline/x64/liftoff-assembler-x64.h
index d2c757ec08e..ea536f54164 100644
--- a/chromium/v8/src/wasm/baseline/x64/liftoff-assembler-x64.h
+++ b/chromium/v8/src/wasm/baseline/x64/liftoff-assembler-x64.h
@@ -529,8 +529,10 @@ void LiftoffAssembler::AtomicAdd(Register dst_addr, Register offset_reg,
void LiftoffAssembler::AtomicSub(Register dst_addr, Register offset_reg,
uintptr_t offset_imm, LiftoffRegister value,
LiftoffRegister result, StoreType type) {
- DCHECK(!cache_state()->is_used(result));
- if (cache_state()->is_used(value)) {
+ LiftoffRegList dont_overwrite = cache_state()->used_registers |
+ LiftoffRegList::ForRegs(dst_addr, offset_reg);
+ DCHECK(!dont_overwrite.has(result));
+ if (dont_overwrite.has(value)) {
// We cannot overwrite {value}, but the {value} register is changed in the
// code we generate. Therefore we copy {value} to {result} and use the
// {result} register in the code below.