From 1e1ba436f81e6fcbd7fb8f0792b9bc645f39016b Mon Sep 17 00:00:00 2001 From: ghidorahrex Date: Fri, 4 Nov 2022 19:33:15 +0000 Subject: [PATCH] GP-2374: Fix for movua and fsca --- .../SuperH4/data/languages/SuperH4.sinc | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Ghidra/Processors/SuperH4/data/languages/SuperH4.sinc b/Ghidra/Processors/SuperH4/data/languages/SuperH4.sinc index 67d7c11734..039d05ffdb 100644 --- a/Ghidra/Processors/SuperH4/data/languages/SuperH4.sinc +++ b/Ghidra/Processors/SuperH4/data/languages/SuperH4.sinc @@ -1529,8 +1529,8 @@ define pcodeop cos; fraction = fraction & FPUL; # extract sub-rotation angle = int2float(fraction); # convert to float - pi:4 = 0x40c90fdb; # 6.2831855.. as 32-bit float - angle = (pi f* angle) f/ int2float(65536 :4); # convert to radian + two_pi:4 = 0x40c90fdb; # 6.2831855.. as 32-bit float + angle = (two_pi f* angle) f/ int2float(65536 :4); # convert to radian local _sin:4 = sin(angle); # call fake sin & cos local _cos:4 = cos(angle); @@ -2326,24 +2326,25 @@ define pcodeop mac_wOp; N_0t = zext($(T_FLAG)); } - # Move Unaligned Long # pattern 0100mmmm10101001 # text movua.l @,R0 # arch -:movua.l M_0t_at,r0 is OP_0=0x4 & M_0t_at & r0 & OP_4=0xA9 { - r0 = (*:4 ( M_0t_at )); +:movua.l N_0t_at,r0 is OP_0=0x4 & N_0t_at & r0 & OP_4=0xA9 { + r0 = (*:4 ( N_0t_at )); } # Move Unaligned Long Pointer # pattern 0100mmmm11101001 # text movua.l @+,R0 # arch -:movua.l M_0t_at,r0 is OP_0=0x4 & M_0t_at & r0 & OP_4=0xE9 { - r0 = (*:4 ( M_0t_at )); - - if (M_0t_at == 0) goto inst_next; - M_0t_at = M_0t_at + 4; +:movua.l N_0t_at,r0 is OP_0=0x4 & N_0t_at & r0 & OP_4=0xE9 { + r0 = (*:4 ( N_0t_at )); + N_0t_at = N_0t_at + 4; +} + +:movua.l N_0t_at,r0 is OP_0=0x4 & N_0t_at & N_0=0 & r0 & OP_4=0xE9 { + r0 = (*:4 ( N_0t_at )); } # Double-Precision Multiplication