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<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::SignExtendByteToWord>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
void EmitIR<IR::Opcode::SignExtendByteToWord>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
(void)code;
|
EmitTwoOp<32>(
|
||||||
(void)ctx;
|
code, ctx, inst,
|
||||||
(void)inst;
|
[&](auto& Wresult, auto& Woperand) { code.SXTB(Wresult, Woperand); });
|
||||||
ASSERT_FALSE("Unimplemented");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::SignExtendHalfToWord>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
void EmitIR<IR::Opcode::SignExtendHalfToWord>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
(void)code;
|
EmitTwoOp<32>(
|
||||||
(void)ctx;
|
code, ctx, inst,
|
||||||
(void)inst;
|
[&](auto& Wresult, auto& Woperand) { code.SXTH(Wresult, Woperand); });
|
||||||
ASSERT_FALSE("Unimplemented");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::SignExtendByteToLong>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
void EmitIR<IR::Opcode::SignExtendByteToLong>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
(void)code;
|
EmitTwoOp<64>(
|
||||||
(void)ctx;
|
code, ctx, inst,
|
||||||
(void)inst;
|
[&](auto& Xresult, auto& Xoperand) { code.SXTB(Xresult, Xoperand->toW()); });
|
||||||
ASSERT_FALSE("Unimplemented");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::SignExtendHalfToLong>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
void EmitIR<IR::Opcode::SignExtendHalfToLong>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
(void)code;
|
EmitTwoOp<64>(
|
||||||
(void)ctx;
|
code, ctx, inst,
|
||||||
(void)inst;
|
[&](auto& Xresult, auto& Xoperand) { code.SXTH(Xresult, Xoperand->toW()); });
|
||||||
ASSERT_FALSE("Unimplemented");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::SignExtendWordToLong>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
void EmitIR<IR::Opcode::SignExtendWordToLong>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
(void)code;
|
EmitTwoOp<64>(
|
||||||
(void)ctx;
|
code, ctx, inst,
|
||||||
(void)inst;
|
[&](auto& Xresult, auto& Xoperand) { code.SXTW(Xresult, Xoperand->toW()); });
|
||||||
ASSERT_FALSE("Unimplemented");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
|
Loading…
Reference in a new issue