mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 13:42:06 +00:00
[NDS32] Fix clip signed comparison
This commit is contained in:
parent
75048cc19b
commit
6c45eb95c2
@ -675,11 +675,11 @@ GpWordAddress: [+ off] is Imm17s [ off = Imm17s << 2; ] { addr:4 = gp + off; exp
|
|||||||
:clip Rt, Ra, Imm5u is $(I32) & $(ALU_2) & Rt & Ra & Imm5u & $(ALU2Z) & Sub6=0b000101
|
:clip Rt, Ra, Imm5u is $(I32) & $(ALU_2) & Rt & Ra & Imm5u & $(ALU2Z) & Sub6=0b000101
|
||||||
{
|
{
|
||||||
local upper:4 = (1 << Imm5u) - 1;
|
local upper:4 = (1 << Imm5u) - 1;
|
||||||
if(Ra <= upper) goto <elif>;
|
if(Ra s<= upper) goto <elif>;
|
||||||
Rt = upper;
|
Rt = upper;
|
||||||
goto <end>;
|
goto <end>;
|
||||||
<elif>
|
<elif>
|
||||||
if(Ra >= 0) goto <else>;
|
if(Ra s>= 0) goto <else>;
|
||||||
Rt = 0;
|
Rt = 0;
|
||||||
goto <end>;
|
goto <end>;
|
||||||
<else>
|
<else>
|
||||||
|
Loading…
Reference in New Issue
Block a user