diff --git a/externals/oaknut/include/oaknut/oaknut.hpp b/externals/oaknut/include/oaknut/oaknut.hpp index efb72379..a4e48ee6 100644 --- a/externals/oaknut/include/oaknut/oaknut.hpp +++ b/externals/oaknut/include/oaknut/oaknut.hpp @@ -112,8 +112,8 @@ public: return; if (MovImm16::is_valid(imm)) return MOVZ(wd, imm); - if (MovImm16::is_valid(~static_cast(imm))) - return MOVN(wd, imm); + if (MovImm16::is_valid(~imm)) + return MOVN(wd, ~imm); if (detail::encode_bit_imm(imm)) return ORR(wd, WzrReg{}, imm); @@ -130,7 +130,7 @@ public: if (MovImm16::is_valid(imm)) return MOVZ(xd, imm); if (MovImm16::is_valid(~imm)) - return MOVN(xd, imm); + return MOVN(xd, ~imm); if (detail::encode_bit_imm(imm)) return ORR(xd, ZrReg{}, imm);