зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1700458 - Fix fcvtn/fcvtxn when dst == src. r=nbp
Patch sync from 202f1c03f4
Differential Revision: https://phabricator.services.mozilla.com/D109542
This commit is contained in:
Родитель
1dcdf4e04c
Коммит
2fb73f392b
|
@ -2148,6 +2148,17 @@ LogicVRegister Simulator::ins_immediate(VectorFormat vform,
|
|||
}
|
||||
|
||||
|
||||
LogicVRegister Simulator::mov(VectorFormat vform,
|
||||
LogicVRegister dst,
|
||||
const LogicVRegister& src) {
|
||||
dst.ClearForWrite(vform);
|
||||
for (int lane = 0; lane < LaneCountFromFormat(vform); lane++) {
|
||||
dst.SetUint(vform, lane, src.Uint(vform, lane));
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
|
||||
|
||||
LogicVRegister Simulator::movi(VectorFormat vform,
|
||||
LogicVRegister dst,
|
||||
uint64_t imm) {
|
||||
|
@ -4303,17 +4314,20 @@ LogicVRegister Simulator::fcvtl2(VectorFormat vform,
|
|||
LogicVRegister Simulator::fcvtn(VectorFormat vform,
|
||||
LogicVRegister dst,
|
||||
const LogicVRegister& src) {
|
||||
SimVRegister tmp;
|
||||
LogicVRegister srctmp = mov(kFormat2D, tmp, src);
|
||||
dst.ClearForWrite(vform);
|
||||
if (LaneSizeInBitsFromFormat(vform) == kHRegSize) {
|
||||
for (int i = 0; i < LaneCountFromFormat(vform); i++) {
|
||||
dst.SetFloat(i,
|
||||
Float16ToRawbits(
|
||||
FPToFloat16(src.Float<float>(i), FPTieEven, ReadDN())));
|
||||
Float16ToRawbits(FPToFloat16(srctmp.Float<float>(i),
|
||||
FPTieEven,
|
||||
ReadDN())));
|
||||
}
|
||||
} else {
|
||||
VIXL_ASSERT(LaneSizeInBitsFromFormat(vform) == kSRegSize);
|
||||
for (int i = 0; i < LaneCountFromFormat(vform); i++) {
|
||||
dst.SetFloat(i, FPToFloat(src.Float<double>(i), FPTieEven, ReadDN()));
|
||||
dst.SetFloat(i, FPToFloat(srctmp.Float<double>(i), FPTieEven, ReadDN()));
|
||||
}
|
||||
}
|
||||
return dst;
|
||||
|
@ -4344,10 +4358,12 @@ LogicVRegister Simulator::fcvtn2(VectorFormat vform,
|
|||
LogicVRegister Simulator::fcvtxn(VectorFormat vform,
|
||||
LogicVRegister dst,
|
||||
const LogicVRegister& src) {
|
||||
SimVRegister tmp;
|
||||
LogicVRegister srctmp = mov(kFormat2D, tmp, src);
|
||||
dst.ClearForWrite(vform);
|
||||
VIXL_ASSERT(LaneSizeInBitsFromFormat(vform) == kSRegSize);
|
||||
for (int i = 0; i < LaneCountFromFormat(vform); i++) {
|
||||
dst.SetFloat(i, FPToFloat(src.Float<double>(i), FPRoundOdd, ReadDN()));
|
||||
dst.SetFloat(i, FPToFloat(srctmp.Float<double>(i), FPRoundOdd, ReadDN()));
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
|
|
|
@ -1574,6 +1574,9 @@ class Simulator : public DecoderVisitor {
|
|||
LogicVRegister dup_immediate(VectorFormat vform,
|
||||
LogicVRegister dst,
|
||||
uint64_t imm);
|
||||
LogicVRegister mov(VectorFormat vform,
|
||||
LogicVRegister dst,
|
||||
const LogicVRegister& src);
|
||||
LogicVRegister movi(VectorFormat vform,
|
||||
LogicVRegister dst,
|
||||
uint64_t imm);
|
||||
|
|
Загрузка…
Ссылка в новой задаче