gte_neon: fix broken ir0 saturation flag
authornotaz <notasas@gmail.com>
Sat, 12 Apr 2025 23:25:23 +0000 (02:25 +0300)
committernotaz <notasas@gmail.com>
Sat, 12 Apr 2025 23:25:23 +0000 (02:25 +0300)
a 14 year old bug...
notaz/pcsx_rearmed#371

libpcsxcore/gte_neon.S

index 7d97ff3..356f27d 100644 (file)
@@ -272,7 +272,7 @@ FUNCTION(gteRTPS_neon): @ r0=CP2 (d,c),
     subs        r2, r4, #1
     orrvs       lr, #(1<<15)   @ F
     orrvs       lr, #(1<<31)
-    cmp         r4, #0x1000
+    cmp         r4, #0x1000<<12
     orrhi       lr, #(1<<12)   @ limH
 
     str         lr, [r0, #4*(32+31)] @ gteFLAG
@@ -512,7 +512,7 @@ FUNCTION(gteRTPT_neon): @ r0=CP2 (d,c),
     subs        r2, r4, #1
     orrvs       lr, #(1<<15)
     orrvs       lr, #(1<<31)   @ F
-    cmp         r4, #0x1000
+    cmp         r4, #0x1000<<12
     orrhi       lr, #(1<<12)   @ limH
 
     str         lr, [r0, #4*(32+31)] @ gteFLAG