[mips] Fix atomic compare exchange

The input load from the memory has redundant bits, so it
needs to be extracted with an offset;
But the input of InputRegister does not need the offset.

Change-Id: Iea6e9bce981ca8a2d1ee55b10a5c5ff3c205357f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2881383
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#74454}
This commit is contained in:
Liu Yu 2021-05-08 16:14:29 +08:00 committed by V8 LUCI CQ
parent 537fb908eb
commit dc7da91c93
2 changed files with 4 additions and 4 deletions

View File

@ -494,8 +494,8 @@ void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen,
__ Ll(i.TempRegister(2), MemOperand(i.TempRegister(0), 0)); \
__ ExtractBits(i.OutputRegister(0), i.TempRegister(2), i.TempRegister(1), \
size, sign_extend); \
__ ExtractBits(i.InputRegister(2), i.InputRegister(2), i.TempRegister(1), \
size, sign_extend); \
__ ExtractBits(i.InputRegister(2), i.InputRegister(2), zero_reg, size, \
sign_extend); \
__ BranchShort(&exit, ne, i.InputRegister(2), \
Operand(i.OutputRegister(0))); \
__ InsertBits(i.TempRegister(2), i.InputRegister(3), i.TempRegister(1), \

View File

@ -465,8 +465,8 @@ void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen,
__ load_linked(i.TempRegister(2), MemOperand(i.TempRegister(0), 0)); \
__ ExtractBits(i.OutputRegister(0), i.TempRegister(2), i.TempRegister(1), \
size, sign_extend); \
__ ExtractBits(i.InputRegister(2), i.InputRegister(2), i.TempRegister(1), \
size, sign_extend); \
__ ExtractBits(i.InputRegister(2), i.InputRegister(2), zero_reg, size, \
sign_extend); \
__ BranchShort(&exit, ne, i.InputRegister(2), \
Operand(i.OutputRegister(0))); \
__ InsertBits(i.TempRegister(2), i.InputRegister(3), i.TempRegister(1), \