emit_arm64_data_processing: Implement SignExtend
This commit is contained in:
parent
777d9a1045
commit
7ed217ff77
1 changed files with 15 additions and 20 deletions
|
@ -932,42 +932,37 @@ void EmitIR<IR::Opcode::Not64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR
|
|||
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::SignExtendByteToWord>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
(void)code;
|
||||
(void)ctx;
|
||||
(void)inst;
|
||||
ASSERT_FALSE("Unimplemented");
|
||||
EmitTwoOp<32>(
|
||||
code, ctx, inst,
|
||||
[&](auto& Wresult, auto& Woperand) { code.SXTB(Wresult, Woperand); });
|
||||
}
|
||||
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::SignExtendHalfToWord>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
(void)code;
|
||||
(void)ctx;
|
||||
(void)inst;
|
||||
ASSERT_FALSE("Unimplemented");
|
||||
EmitTwoOp<32>(
|
||||
code, ctx, inst,
|
||||
[&](auto& Wresult, auto& Woperand) { code.SXTH(Wresult, Woperand); });
|
||||
}
|
||||
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::SignExtendByteToLong>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
(void)code;
|
||||
(void)ctx;
|
||||
(void)inst;
|
||||
ASSERT_FALSE("Unimplemented");
|
||||
EmitTwoOp<64>(
|
||||
code, ctx, inst,
|
||||
[&](auto& Xresult, auto& Xoperand) { code.SXTB(Xresult, Xoperand->toW()); });
|
||||
}
|
||||
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::SignExtendHalfToLong>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
(void)code;
|
||||
(void)ctx;
|
||||
(void)inst;
|
||||
ASSERT_FALSE("Unimplemented");
|
||||
EmitTwoOp<64>(
|
||||
code, ctx, inst,
|
||||
[&](auto& Xresult, auto& Xoperand) { code.SXTH(Xresult, Xoperand->toW()); });
|
||||
}
|
||||
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::SignExtendWordToLong>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
(void)code;
|
||||
(void)ctx;
|
||||
(void)inst;
|
||||
ASSERT_FALSE("Unimplemented");
|
||||
EmitTwoOp<64>(
|
||||
code, ctx, inst,
|
||||
[&](auto& Xresult, auto& Xoperand) { code.SXTW(Xresult, Xoperand->toW()); });
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Reference in a new issue