Ghidra is a software reverse engineering (SRE) framework
SuperH4: Ensure we divide with `f/` when converting to radian
LemonHaze674e917829bc
diff --git a/Ghidra/Processors/SuperH4/data/languages/SuperH4.sinc b/Ghidra/Processors/SuperH4/data/languages/SuperH4.sincindex a518c24e29..7f0c908f78 100644--- a/Ghidra/Processors/SuperH4/data/languages/SuperH4.sinc+++ b/Ghidra/Processors/SuperH4/data/languages/SuperH4.sinc@@ -1514,7 +1514,7 @@ define pcodeop cos;# arch # arch_sh2a_or_sh3e_up:fsca FPUL,FRN_1 isOP_0=0xF & FPUL & FRN_1 & FRN_2 & OP_4=0xFD {- if (( $(FPSCR_PR) == 0 )) goto inst_next;+ if (( $(FPSCR_PR) == 0 )) goto inst_next;angle:4 = int2float(0 :4); # floatoffset:4 = 0x00010000; # long@@ -1525,7 +1525,7 @@ define pcodeop cos;pi:4 = 0x40490fdb; # 3.1415927.. as 32-bit floatpi2:4 = int2float(2 :4) f* pi; # multiply pi by 2 (2pi)- angle = (pi2 f* angle) / offset; # convert to radian+ angle = (pi2 f* angle) f/ offset; # convert to radianlocal _sin:4 = sin(angle); # call fake sin & coslocal _cos:4 = cos(angle);