From 6c45eb95c233578c8904a9399d97c46f69805f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20COCAULT?= Date: Sat, 18 Apr 2020 18:23:24 +0200 Subject: [PATCH] [NDS32] Fix clip signed comparison --- Ghidra/Processors/NDS32/data/languages/nds32.sinc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ghidra/Processors/NDS32/data/languages/nds32.sinc b/Ghidra/Processors/NDS32/data/languages/nds32.sinc index 6134a7c63a..60e8635faf 100644 --- a/Ghidra/Processors/NDS32/data/languages/nds32.sinc +++ b/Ghidra/Processors/NDS32/data/languages/nds32.sinc @@ -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 ; + if(Ra s<= upper) goto ; Rt = upper; goto ; - if(Ra >= 0) goto ; + if(Ra s>= 0) goto ; Rt = 0; goto ;