mirror of
https://github.com/azahar-emu/dynarmic
synced 2025-11-14 19:09:59 +01:00
Implement *MULH
This commit is contained in:
parent
5b6e2add82
commit
bdc1b0f590
@ -1051,18 +1051,24 @@ void EmitIR<IR::Opcode::Mul64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR
|
|||||||
|
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::SignedMultiplyHigh64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
void EmitIR<IR::Opcode::SignedMultiplyHigh64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
(void)code;
|
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||||
(void)ctx;
|
auto Xresult = ctx.reg_alloc.WriteX(inst);
|
||||||
(void)inst;
|
auto Xop1 = ctx.reg_alloc.ReadX(args[0]);
|
||||||
ASSERT_FALSE("Unimplemented");
|
auto Xop2 = ctx.reg_alloc.ReadX(args[1]);
|
||||||
|
RegAlloc::Realize(Xresult, Xop1, Xop2);
|
||||||
|
|
||||||
|
code.SMULH(Xresult, Xop1, Xop2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::UnsignedMultiplyHigh64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
void EmitIR<IR::Opcode::UnsignedMultiplyHigh64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
(void)code;
|
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||||
(void)ctx;
|
auto Xresult = ctx.reg_alloc.WriteX(inst);
|
||||||
(void)inst;
|
auto Xop1 = ctx.reg_alloc.ReadX(args[0]);
|
||||||
ASSERT_FALSE("Unimplemented");
|
auto Xop2 = ctx.reg_alloc.ReadX(args[1]);
|
||||||
|
RegAlloc::Realize(Xresult, Xop1, Xop2);
|
||||||
|
|
||||||
|
code.UMULH(Xresult, Xop1, Xop2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user