From dce53adfdf3154306fc597aaa7364f8bb25e016a Mon Sep 17 00:00:00 2001 From: Luiz Carlos Vartuli <37045052+ziul123@users.noreply.github.com> Date: Sun, 12 Sep 2021 18:28:12 -0300 Subject: [PATCH] Fixed float and double comparison pseudoinstructions The `fgt.* t0, f2, f3` and `fge.* t0, f2, f3` pseudoinstructions were previously defined as just `fle.* t0, f2, f3` and `flt.* t0, f2, f3` respectively, without flipping the float registers. This caused t0 to be set to the opposite value of what it should be. --- src/PseudoOps.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PseudoOps.txt b/src/PseudoOps.txt index d9870286..575f047f 100644 --- a/src/PseudoOps.txt +++ b/src/PseudoOps.txt @@ -261,7 +261,7 @@ lw t1,%lo(label)(t2) ;lw RG1,LL4(RG7) ;#Load from Address flw f1,%lo(label)(t2) ;flw RG1,LL4(RG7) ;#Load from Address flwd f1,%lo(label)(t2) ;fld RG1,LL4(RG7) ;#Load from Address -fgt.s t1, f2, f3 ;fle.s RG1, RG2, RG3 ;#Floating Greater Than: if f1 > f2, set t1 to 1, else set t1 to 0 -fge.s t1, f2, f3 ;flt.s RG1, RG2, RG3 ;#Floating Greater Than or Equal: if f1 >= f2, set t1 to 1, else set t1 to 0 -fgt.d t1, f2, f3 ;fle.d RG1, RG2, RG3 ;#Floating Greater Than (64 bit): if f1 > f2, set t1 to 1, else set t1 to 0 -fge.d t1, f2, f3 ;flt.d RG1, RG2, RG3 ;#Floating Greater Than or Equal (64 bit): if f1 >= f2, set t1 to 1, else set t1 to 0 +fgt.s t1, f2, f3 ;fle.s RG1, RG3, RG2 ;#Floating Greater Than: if f2 > f3, set t1 to 1, else set t1 to 0 +fge.s t1, f2, f3 ;flt.s RG1, RG3, RG2 ;#Floating Greater Than or Equal: if f2 >= f3, set t1 to 1, else set t1 to 0 +fgt.d t1, f2, f3 ;fle.d RG1, RG3, RG2 ;#Floating Greater Than (64 bit): if f2 > f3, set t1 to 1, else set t1 to 0 +fge.d t1, f2, f3 ;flt.d RG1, RG3, RG2 ;#Floating Greater Than or Equal (64 bit): if f2 >= f3, set t1 to 1, else set t1 to 0