mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-22 04:05:39 +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
|
||||
{
|
||||
local upper:4 = (1 << Imm5u) - 1;
|
||||
if(Ra <= upper) goto <elif>;
|
||||
if(Ra s<= upper) goto <elif>;
|
||||
Rt = upper;
|
||||
goto <end>;
|
||||
<elif>
|
||||
if(Ra >= 0) goto <else>;
|
||||
if(Ra s>= 0) goto <else>;
|
||||
Rt = 0;
|
||||
goto <end>;
|
||||
<else>
|
||||
|
Loading…
Reference in New Issue
Block a user