IR: Add IR instruction VectorZeroUpper
This commit is contained in:
parent
da3e9a5704
commit
285fd22c30
4 changed files with 17 additions and 0 deletions
|
@ -367,5 +367,16 @@ void EmitX64::EmitVectorBroadcast64(EmitContext& ctx, IR::Inst* inst) {
|
|||
ctx.reg_alloc.DefineValue(inst, a);
|
||||
}
|
||||
|
||||
|
||||
void EmitX64::EmitVectorZeroUpper(EmitContext& ctx, IR::Inst* inst) {
|
||||
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||
|
||||
Xbyak::Xmm a = ctx.reg_alloc.UseScratchXmm(args[0]);
|
||||
|
||||
code->movq(a, a); // TODO: !IsLastUse
|
||||
|
||||
ctx.reg_alloc.DefineValue(inst, a);
|
||||
}
|
||||
|
||||
} // namespace BackendX64
|
||||
} // namespace Dynarmic
|
||||
|
|
|
@ -761,6 +761,10 @@ U128 IREmitter::VectorPairedAdd64(const U128& a, const U128& b) {
|
|||
return Inst<U128>(Opcode::VectorPairedAdd64, a, b);
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorZeroUpper(const U128& a) {
|
||||
return Inst<U128>(Opcode::VectorZeroUpper, a);
|
||||
}
|
||||
|
||||
U32 IREmitter::FPAbs32(const U32& a) {
|
||||
return Inst<U32>(Opcode::FPAbs32, a);
|
||||
}
|
||||
|
|
|
@ -204,6 +204,7 @@ public:
|
|||
U128 VectorPairedAdd16(const U128& a, const U128& b);
|
||||
U128 VectorPairedAdd32(const U128& a, const U128& b);
|
||||
U128 VectorPairedAdd64(const U128& a, const U128& b);
|
||||
U128 VectorZeroUpper(const U128& a);
|
||||
|
||||
U32 FPAbs32(const U32& a);
|
||||
U64 FPAbs64(const U64& a);
|
||||
|
|
|
@ -189,6 +189,7 @@ OPCODE(VectorPairedAdd8, T::U128, T::U128, T::U128
|
|||
OPCODE(VectorPairedAdd16, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorPairedAdd32, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorPairedAdd64, T::U128, T::U128, T::U128 )
|
||||
OPCODE(VectorZeroUpper, T::U128, T::U128 )
|
||||
|
||||
// Floating-point operations
|
||||
OPCODE(FPAbs32, T::U32, T::U32 )
|
||||
|
|
Loading…
Reference in a new issue