Commit 9352171e authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC: fix input reg clobbering on atomic64

R=joransiu@ca.ibm.com

Change-Id: Ic9a6a9055e3f05ef64723d995228673ee48eb994
Reviewed-on: https://chromium-review.googlesource.com/c/1296682Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56968}
parent f16c5f8d
...@@ -652,47 +652,47 @@ void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen, Instruction* instr, ...@@ -652,47 +652,47 @@ void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen, Instruction* instr,
__ bne(&binop, cr0); \ __ bne(&binop, cr0); \
} while (false) } while (false)
#define ASSEMBLE_ATOMIC_BINOP_SIGN_EXT(bin_inst, load_inst, \ #define ASSEMBLE_ATOMIC_BINOP_SIGN_EXT(bin_inst, load_inst, store_inst, \
store_inst, ext_instr) \ ext_instr) \
do { \ do { \
MemOperand operand = MemOperand(i.InputRegister(0), i.InputRegister(1)); \ MemOperand operand = MemOperand(i.InputRegister(0), i.InputRegister(1)); \
Label binop; \ Label binop; \
__ bind(&binop); \ __ bind(&binop); \
__ load_inst(i.OutputRegister(), operand); \ __ load_inst(i.OutputRegister(), operand); \
__ ext_instr(i.OutputRegister(), i.OutputRegister()); \ __ ext_instr(i.OutputRegister(), i.OutputRegister()); \
__ bin_inst(i.InputRegister(2), i.OutputRegister(), i.InputRegister(2)); \ __ bin_inst(kScratchReg, i.OutputRegister(), i.InputRegister(2)); \
__ store_inst(i.InputRegister(2), operand); \ __ store_inst(kScratchReg, operand); \
__ bne(&binop, cr0); \ __ bne(&binop, cr0); \
} while (false) } while (false)
#define ASSEMBLE_ATOMIC_COMPARE_EXCHANGE(cmp_inst, load_inst, store_inst) \ #define ASSEMBLE_ATOMIC_COMPARE_EXCHANGE(cmp_inst, load_inst, store_inst) \
do { \ do { \
MemOperand operand = MemOperand(i.InputRegister(0), i.InputRegister(1)); \ MemOperand operand = MemOperand(i.InputRegister(0), i.InputRegister(1)); \
Label loop; \ Label loop; \
Label exit; \ Label exit; \
__ bind(&loop); \ __ bind(&loop); \
__ load_inst(i.OutputRegister(), operand); \ __ load_inst(i.OutputRegister(), operand); \
__ cmp_inst(i.OutputRegister(), i.InputRegister(2), cr0); \ __ cmp_inst(i.OutputRegister(), i.InputRegister(2), cr0); \
__ bne(&exit, cr0); \ __ bne(&exit, cr0); \
__ store_inst(i.InputRegister(3), operand); \ __ store_inst(i.InputRegister(3), operand); \
__ bne(&loop, cr0); \ __ bne(&loop, cr0); \
__ bind(&exit); \ __ bind(&exit); \
} while (false) } while (false)
#define ASSEMBLE_ATOMIC_COMPARE_EXCHANGE_SIGN_EXT(cmp_inst, load_inst, \ #define ASSEMBLE_ATOMIC_COMPARE_EXCHANGE_SIGN_EXT(cmp_inst, load_inst, \
store_inst, ext_instr) \ store_inst, ext_instr) \
do { \ do { \
MemOperand operand = MemOperand(i.InputRegister(0), i.InputRegister(1)); \ MemOperand operand = MemOperand(i.InputRegister(0), i.InputRegister(1)); \
Label loop; \ Label loop; \
Label exit; \ Label exit; \
__ bind(&loop); \ __ bind(&loop); \
__ load_inst(i.OutputRegister(), operand); \ __ load_inst(i.OutputRegister(), operand); \
__ ext_instr(i.OutputRegister(), i.OutputRegister()); \ __ ext_instr(i.OutputRegister(), i.OutputRegister()); \
__ cmp_inst(i.OutputRegister(), i.InputRegister(2)); \ __ cmp_inst(i.OutputRegister(), i.InputRegister(2)); \
__ bne(&exit, cr0); \ __ bne(&exit, cr0); \
__ store_inst(i.InputRegister(3), operand); \ __ store_inst(i.InputRegister(3), operand); \
__ bne(&loop, cr0); \ __ bne(&loop, cr0); \
__ bind(&exit); \ __ bind(&exit); \
} while (false) } while (false)
void CodeGenerator::AssembleDeconstructFrame() { void CodeGenerator::AssembleDeconstructFrame() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment