mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-29 17:48:37 +00:00
Add V_CVT_F64_I32 (#1219)
This commit is contained in:
parent
5e26294e27
commit
54dafce541
|
@ -170,6 +170,7 @@ public:
|
|||
void V_CVT_FLR_I32_F32(const GcnInst& inst);
|
||||
void V_CVT_OFF_F32_I4(const GcnInst& inst);
|
||||
void V_CVT_F32_UBYTE(u32 index, const GcnInst& inst);
|
||||
void V_CVT_F64_I32(const GcnInst& inst);
|
||||
void V_FRACT_F32(const GcnInst& inst);
|
||||
void V_TRUNC_F32(const GcnInst& inst);
|
||||
void V_CEIL_F32(const GcnInst& inst);
|
||||
|
|
|
@ -123,6 +123,8 @@ void Translator::EmitVectorAlu(const GcnInst& inst) {
|
|||
return V_CVT_F32_UBYTE(2, inst);
|
||||
case Opcode::V_CVT_F32_UBYTE3:
|
||||
return V_CVT_F32_UBYTE(3, inst);
|
||||
case Opcode::V_CVT_F64_I32:
|
||||
return V_CVT_F64_I32(inst);
|
||||
case Opcode::V_FRACT_F32:
|
||||
return V_FRACT_F32(inst);
|
||||
case Opcode::V_TRUNC_F32:
|
||||
|
@ -662,6 +664,11 @@ void Translator::V_CVT_F32_UBYTE(u32 index, const GcnInst& inst) {
|
|||
SetDst(inst.dst[0], ir.ConvertUToF(32, 32, byte));
|
||||
}
|
||||
|
||||
void Translator::V_CVT_F64_I32(const GcnInst& inst) {
|
||||
const IR::U32 src0{GetSrc(inst.src[0])};
|
||||
SetDst64(inst.dst[0], ir.ConvertSToF(64, 32, src0));
|
||||
}
|
||||
|
||||
void Translator::V_FRACT_F32(const GcnInst& inst) {
|
||||
const IR::F32 src0{GetSrc<IR::F32>(inst.src[0])};
|
||||
SetDst(inst.dst[0], ir.Fract(src0));
|
||||
|
|
Loading…
Reference in a new issue