Commit fee0051b authored by Junliang Yan's avatar Junliang Yan Committed by V8 LUCI CQ

ppc: [liftoff] fix Float copysign operation

Change-Id: Icdef3916993e14e39ef9da70af128b9fde2d3b60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3158323Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76797}
parent de46367d
......@@ -3056,6 +3056,11 @@ void TurboAssembler::DivF32(DoubleRegister dst, DoubleRegister lhs,
frsp(dst, dst, r);
}
void TurboAssembler::CopySignF64(DoubleRegister dst, DoubleRegister lhs,
DoubleRegister rhs, RCBit r) {
fcpsgn(dst, rhs, lhs, r);
}
void MacroAssembler::CmpSmiLiteral(Register src1, Smi smi, Register scratch,
CRegister cr) {
#if defined(V8_COMPRESS_POINTERS) || defined(V8_31BIT_SMIS_ON_64BIT_ARCH)
......
......@@ -279,6 +279,8 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
RCBit r = LeaveRC);
void DivF32(DoubleRegister dst, DoubleRegister lhs, DoubleRegister rhs,
RCBit r = LeaveRC);
void CopySignF64(DoubleRegister dst, DoubleRegister lhs, DoubleRegister rhs,
RCBit r = LeaveRC);
void Push(Register src) { push(src); }
// Push a handle.
......
......@@ -3688,7 +3688,7 @@ void Simulator::ExecuteGeneric(Instruction* instr) {
int fra = instr->RAValue();
double frb_val = get_double_from_d_register(frb);
double fra_val = get_double_from_d_register(fra);
double frt_val = std::copysign(fra_val, frb_val);
double frt_val = std::copysign(frb_val, fra_val);
set_d_register_from_double(frt, frt_val);
return;
}
......
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