diff --git a/f3dex2.s b/f3dex2.s index 414b942..07f7a3f 100644 --- a/f3dex2.s +++ b/f3dex2.s @@ -22,6 +22,24 @@ ori dst, src, 0 .endmacro +// Prohibit macros involving slt; this silently clobbers $1. You can of course +// manually write the slt and branch instructions if you want this behavior. +.macro blt, ra, rb, lbl + .error "blt is a macro using slt, and silently clobbers $1!" +.endmacro + +.macro bgt, ra, rb, lbl + .error "bgt is a macro using slt, and silently clobbers $1!" +.endmacro + +.macro ble, ra, rb, lbl + .error "ble is a macro using slt, and silently clobbers $1!" +.endmacro + +.macro bge, ra, rb, lbl + .error "bge is a macro using slt, and silently clobbers $1!" +.endmacro + // Vector macros .macro vcopy, dst, src vadd dst, src, $v0[0]