oaknut: MOV: Fix MOVN case
This commit is contained in:
parent
8649345886
commit
49589168c9
1 changed files with 3 additions and 3 deletions
6
externals/oaknut/include/oaknut/oaknut.hpp
vendored
6
externals/oaknut/include/oaknut/oaknut.hpp
vendored
|
@ -112,8 +112,8 @@ public:
|
||||||
return;
|
return;
|
||||||
if (MovImm16::is_valid(imm))
|
if (MovImm16::is_valid(imm))
|
||||||
return MOVZ(wd, imm);
|
return MOVZ(wd, imm);
|
||||||
if (MovImm16::is_valid(~static_cast<std::uint64_t>(imm)))
|
if (MovImm16::is_valid(~imm))
|
||||||
return MOVN(wd, imm);
|
return MOVN(wd, ~imm);
|
||||||
if (detail::encode_bit_imm(imm))
|
if (detail::encode_bit_imm(imm))
|
||||||
return ORR(wd, WzrReg{}, imm);
|
return ORR(wd, WzrReg{}, imm);
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ public:
|
||||||
if (MovImm16::is_valid(imm))
|
if (MovImm16::is_valid(imm))
|
||||||
return MOVZ(xd, imm);
|
return MOVZ(xd, imm);
|
||||||
if (MovImm16::is_valid(~imm))
|
if (MovImm16::is_valid(~imm))
|
||||||
return MOVN(xd, imm);
|
return MOVN(xd, ~imm);
|
||||||
if (detail::encode_bit_imm(imm))
|
if (detail::encode_bit_imm(imm))
|
||||||
return ORR(xd, ZrReg{}, imm);
|
return ORR(xd, ZrReg{}, imm);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue