Skip to content

Commit

Permalink
Add fgt.s, fge.s and todo for gcc compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
TheThirdOne committed Oct 13, 2019
1 parent 0ebea26 commit 66f1f42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions PseudoOps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,6 @@ lui t1,%hi(label) ;lui RG1,LH4 ;#Load Upper Address : Set t1 to upper 2
addi t1,t2,%lo(label) ;addi RG1,RG2,LL5 ;#Load Lower Address : Set t1 to t2 + lower 12-bit label's address
lw t1,%lo(label)(t2) ;lw RG1,LL4(RG7) ;#Load from Address
flw f1,%lo(label)(t2) ;flw RG1,LL4(RG7) ;#Load from Address

fgt.s t1, f2, f3 ;fle.s t1, f3, f2 ;#Floating Greater Than: if f1 > f2, set t1 to 1, else set t1 to 0
fge.s t1, f2, f3 ;flt.s t1, f3, f2 ;#Floating Greater Than or Equal: if f1 >= f2, set t1 to 1, else set t1 to 0
2 changes: 2 additions & 0 deletions rars/assembler/Assembler.java
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,8 @@ private void transferGlobals() {
errors.add(new ErrorMessage(fileCurrentlyBeingAssembled, label.getSourceLine(),
label.getStartPos(), "\"" + label.getValue()
+ "\" declared global label but not defined."));
// TODO: allow this case, but check later to see if all requested globals are actually implemented in other files
// GCC outputs assembly that uses this
} else {
if (Globals.symbolTable.getAddress(label.getValue()) != SymbolTable.NOT_FOUND) {
errors.add(new ErrorMessage(fileCurrentlyBeingAssembled, label.getSourceLine(),
Expand Down

0 comments on commit 66f1f42

Please sign in to comment.