[loong64][mips32] Fix implementation of fcopysign in simulator on loong64
FPUCanonalizeOperation will output standard qNaN when the lvalue is nan in simulator, and this implementation is inconsistent with physical machine. Besides, fix a wrong register request in i64_add on mips32. Change-Id: Icddb1fc6d0e03a51d4fb4ba13ecb39f11a645af0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3580103 Auto-Submit: Yu Liu <liuyu@loongson.cn> Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn> Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn> Cr-Commit-Position: refs/heads/main@{#79902}
This commit is contained in:
parent
1b88676f06
commit
9786ac29a5
@ -4272,22 +4272,14 @@ void Simulator::DecodeTypeOp17() {
|
||||
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()));
|
||||
SetFPUFloatResult(fd_reg(), std::copysign(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()));
|
||||
SetFPUDoubleResult(fd_reg(), std::copysign(fj_double(), fk_double()));
|
||||
} break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
|
@ -1022,7 +1022,8 @@ I32_SHIFTOP_I(shr, srl)
|
||||
|
||||
void LiftoffAssembler::emit_i64_addi(LiftoffRegister dst, LiftoffRegister lhs,
|
||||
int64_t imm) {
|
||||
LiftoffRegister imm_reg = GetUnusedRegister(kFpReg, LiftoffRegList{dst, lhs});
|
||||
LiftoffRegister imm_reg =
|
||||
GetUnusedRegister(kGpRegPair, LiftoffRegList{dst, lhs});
|
||||
int32_t imm_low_word = static_cast<int32_t>(imm);
|
||||
int32_t imm_high_word = static_cast<int32_t>(imm >> 32);
|
||||
TurboAssembler::li(imm_reg.low_gp(), imm_low_word);
|
||||
|
Loading…
Reference in New Issue
Block a user