]> git.sur5r.net Git - cc65/commitdiff
Added macros for jumps after unsigned compares to the "generic" macro package.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 2 Nov 2009 16:26:46 +0000 (16:26 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 2 Nov 2009 16:26:46 +0000 (16:26 +0000)
Removed BGE/BLT as native instructions for the 65816.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4427 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/instr.c
src/ca65/macpack/generic.mac

index bc6c42667f00a1db7dcd35a6b32af6d16ac05df2..b5839c10abf4ae3e9120a164efe4949e51d36a6f 100644 (file)
@@ -59,7 +59,7 @@
 #include "studyexpr.h"
 #include "symtab.h"
 
-                
+
 
 /*****************************************************************************/
 /*                                 Forwards                                  */
@@ -489,9 +489,7 @@ static const struct {
                { "BCC",  0x0020000, 0x90, 0, PutPCRel8 },
                { "BCS",  0x0020000, 0xb0, 0, PutPCRel8 },
                { "BEQ",  0x0020000, 0xf0, 0, PutPCRel8 },
-               { "BGE",  0x0020000, 0xb0, 0, PutPCRel8 },   /* == BCS */
                { "BIT",  0x0a0006c, 0x00, 2, PutAll },
-               { "BLT",  0x0020000, 0x90, 0, PutPCRel8 },   /* == BCC */
                { "BMI",  0x0020000, 0x30, 0, PutPCRel8 },
                { "BNE",  0x0020000, 0xd0, 0, PutPCRel8 },
                { "BPL",  0x0020000, 0x10, 0, PutPCRel8 },
index 6f88c81591cd239764b0e25b4ef3f1225549ffc7..02eccef5da8e5e3ddd669190a12b8891b857d063 100644 (file)
         .endif
 .endmacro
 
+; bge - jump if unsigned greater or equal
+.macro  bge     Arg
+        bcs     Arg
+.endmacro
+
+; blt - Jump if unsigned less
+.macro  blt     Arg
+        bcc     Arg
+.endmacro
+
+; bgt - jump if unsigned greater
+.macro  bgt     Arg
+        .local  L
+        beq     L
+        bcs     Arg
+L:
+.endmacro
+
+; ble - jump if unsigned less or equal
+.macro  ble     Arg
+        beq     Arg
+        bcc     Arg
+.endmacro
+