fix floats in bailouts from POWER9 JIT project (branching adjust under separate investigation)

This commit is contained in:
Cameron Kaiser 2022-04-30 17:41:09 -07:00
parent b5e7c95469
commit 6cae6ac238
1 changed files with 6 additions and 0 deletions

View File

@ -1949,9 +1949,15 @@ SnapshotIterator::allocationValue(const RValueAllocation& alloc, ReadMethod rm)
} pun;
MOZ_ASSERT(alloc.fpuReg().isSingle());
pun.d = fromRegister(alloc.fpuReg());
#ifdef JS_CODEGEN_PPC_OSX
// The register is always written as a double, so we need to cast
// it down.
return Float32Value((float)pun.d);
#else
// The register contains the encoding of a float32. We just read
// the bits without making any conversion.
return Float32Value(pun.f);
#endif
}
case RValueAllocation::ANY_FLOAT_STACK: