Skip to content

Commit

Permalink
Fixed float and double comparison pseudoinstructions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ziul123 authored and TheThirdOne committed Sep 25, 2021
1 parent f54a2dc commit dce53ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/PseudoOps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dce53ad

Please sign in to comment.