diff --git a/src/frontend/A64/translate/impl/impl.cpp b/src/frontend/A64/translate/impl/impl.cpp index 86ae2833..3f056fc9 100644 --- a/src/frontend/A64/translate/impl/impl.cpp +++ b/src/frontend/A64/translate/impl/impl.cpp @@ -116,8 +116,12 @@ u64 TranslatorVisitor::AdvSIMDExpandImm(bool op, Imm<4> cmode, Imm<8> imm8) { return 0; } -IR::U32U64 TranslatorVisitor::I(size_t bitsize, u64 value) { +IR::UAny TranslatorVisitor::I(size_t bitsize, u64 value) { switch (bitsize) { + case 8: + return ir.Imm8(static_cast(value)); + case 16: + return ir.Imm16(static_cast(value)); case 32: return ir.Imm32(static_cast(value)); case 64: diff --git a/src/frontend/A64/translate/impl/impl.h b/src/frontend/A64/translate/impl/impl.h index 2a6295a6..7ed461aa 100644 --- a/src/frontend/A64/translate/impl/impl.h +++ b/src/frontend/A64/translate/impl/impl.h @@ -44,7 +44,7 @@ struct TranslatorVisitor final { boost::optional DecodeBitMasks(bool N, Imm<6> immr, Imm<6> imms, bool immediate); u64 AdvSIMDExpandImm(bool op, Imm<4> cmode, Imm<8> imm8); - IR::U32U64 I(size_t bitsize, u64 value); + IR::UAny I(size_t bitsize, u64 value); IR::UAny X(size_t bitsize, Reg reg); void X(size_t bitsize, Reg reg, IR::U32U64 value); IR::U32U64 SP(size_t bitsize);