Commit 49c95bd9 authored by Liu Yu's avatar Liu Yu Committed by V8 LUCI CQ

[liftoff][loong64][mips64] Implement Atomic ops and ConvertSat ops

Change-Id: I4378e4f99c6b034f7b29782218896d5485178109
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3514656
Auto-Submit: Yu Liu <liuyu@loongson.cn>
Reviewed-by: 's avatarZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#79452}
parent a2ea2cd0
......@@ -443,9 +443,9 @@ FPUCondition FlagsConditionToConditionCmpFPU(bool* predicate,
__ 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), zero_reg, size, \
__ ExtractBits(i.TempRegister(2), i.InputRegister(2), zero_reg, size, \
sign_extend); \
__ BranchShort(&exit, ne, i.InputRegister(2), \
__ BranchShort(&exit, ne, i.TempRegister(2), \
Operand(i.OutputRegister(0))); \
__ InsertBits(i.TempRegister(2), i.InputRegister(3), i.TempRegister(1), \
size); \
......
......@@ -457,9 +457,9 @@ FPUCondition FlagsConditionToConditionCmpFPU(bool* predicate,
__ 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), zero_reg, size, \
__ ExtractBits(i.TempRegister(2), i.InputRegister(2), zero_reg, size, \
sign_extend); \
__ BranchShort(&exit, ne, i.InputRegister(2), \
__ BranchShort(&exit, ne, i.TempRegister(2), \
Operand(i.OutputRegister(0))); \
__ InsertBits(i.TempRegister(2), i.InputRegister(3), i.TempRegister(1), \
size); \
......
......@@ -4267,12 +4267,28 @@ void Simulator::DecodeTypeOp17() {
case FSCALEB_D:
printf("Sim UNIMPLEMENTED: FSCALEB_D\n");
UNIMPLEMENTED();
case FCOPYSIGN_S:
printf("Sim UNIMPLEMENTED: FCOPYSIGN_S\n");
UNIMPLEMENTED();
case FCOPYSIGN_D:
printf("Sim UNIMPLEMENTED: FCOPYSIGN_D\n");
UNIMPLEMENTED();
case FCOPYSIGN_S: {
printf_instr("FCOPYSIGN_S\t %s: %016f, %s, %016f, %s, %016f\n",
FPURegisters::Name(fd_reg()), fd_float(),
FPURegisters::Name(fj_reg()), fj_float(),
FPURegisters::Name(fk_reg()), fk_float());
SetFPUFloatResult(fd_reg(), FPUCanonalizeOperation(
[](float lhs, float rhs) {
return std::copysign(lhs, rhs);
},
fj_float(), fk_float()));
} break;
case FCOPYSIGN_D: {
printf_instr("FCOPYSIGN_d\t %s: %016f, %s, %016f, %s, %016f\n",
FPURegisters::Name(fd_reg()), fd_double(),
FPURegisters::Name(fj_reg()), fj_double(),
FPURegisters::Name(fk_reg()), fk_double());
SetFPUDoubleResult(fd_reg(), FPUCanonalizeOperation(
[](double lhs, double rhs) {
return std::copysign(lhs, rhs);
},
fj_double(), fk_double()));
} break;
default:
UNREACHABLE();
}
......
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