mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 04:30:10 +00:00
The longbranch macros did not work with numeric addresses
git-svn-id: svn://svn.cc65.org/cc65/trunk@1039 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
f0ed4af252
commit
46209118b1
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
/* common */
|
/* common */
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
/* ca65 */
|
/* ca65 */
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "scanner.h"
|
#include "scanner.h"
|
||||||
@ -72,7 +72,10 @@ static const char MacGeneric [] = /* Generic macros */
|
|||||||
|
|
||||||
static const char MacLongBranch [] = /* Long branch macros */
|
static const char MacLongBranch [] = /* Long branch macros */
|
||||||
".macro jeq Target\n"
|
".macro jeq Target\n"
|
||||||
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
" .if .match(Target, 0)\n"
|
||||||
|
" bne *+5\n"
|
||||||
|
" jmp Target\n"
|
||||||
|
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
||||||
" beq Target\n"
|
" beq Target\n"
|
||||||
" .else\n"
|
" .else\n"
|
||||||
" bne *+5\n"
|
" bne *+5\n"
|
||||||
@ -80,7 +83,10 @@ static const char MacLongBranch [] = /* Long branch macros */
|
|||||||
" .endif\n"
|
" .endif\n"
|
||||||
".endmacro\n"
|
".endmacro\n"
|
||||||
".macro jne Target\n"
|
".macro jne Target\n"
|
||||||
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
" .if .match(Target, 0)\n"
|
||||||
|
" beq *+5\n"
|
||||||
|
" jmp Target\n"
|
||||||
|
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
||||||
" bne Target\n"
|
" bne Target\n"
|
||||||
" .else\n"
|
" .else\n"
|
||||||
" beq *+5\n"
|
" beq *+5\n"
|
||||||
@ -88,7 +94,10 @@ static const char MacLongBranch [] = /* Long branch macros */
|
|||||||
" .endif\n"
|
" .endif\n"
|
||||||
".endmacro\n"
|
".endmacro\n"
|
||||||
".macro jmi Target\n"
|
".macro jmi Target\n"
|
||||||
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
" .if .match(Target, 0)\n"
|
||||||
|
" bpl *+5\n"
|
||||||
|
" jmp Target\n"
|
||||||
|
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
||||||
" bmi Target\n"
|
" bmi Target\n"
|
||||||
" .else\n"
|
" .else\n"
|
||||||
" bpl *+5\n"
|
" bpl *+5\n"
|
||||||
@ -96,7 +105,10 @@ static const char MacLongBranch [] = /* Long branch macros */
|
|||||||
" .endif\n"
|
" .endif\n"
|
||||||
".endmacro\n"
|
".endmacro\n"
|
||||||
".macro jpl Target\n"
|
".macro jpl Target\n"
|
||||||
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
" .if .match(Target, 0)\n"
|
||||||
|
" bmi *+5\n"
|
||||||
|
" jmp Target\n"
|
||||||
|
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
||||||
" bpl Target\n"
|
" bpl Target\n"
|
||||||
" .else\n"
|
" .else\n"
|
||||||
" bmi *+5\n"
|
" bmi *+5\n"
|
||||||
@ -104,7 +116,10 @@ static const char MacLongBranch [] = /* Long branch macros */
|
|||||||
" .endif\n"
|
" .endif\n"
|
||||||
".endmacro\n"
|
".endmacro\n"
|
||||||
".macro jcs Target\n"
|
".macro jcs Target\n"
|
||||||
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
" .if .match(Target, 0)\n"
|
||||||
|
" bcc *+5\n"
|
||||||
|
" jmp Target\n"
|
||||||
|
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
||||||
" bcs Target\n"
|
" bcs Target\n"
|
||||||
" .else\n"
|
" .else\n"
|
||||||
" bcc *+5\n"
|
" bcc *+5\n"
|
||||||
@ -112,7 +127,10 @@ static const char MacLongBranch [] = /* Long branch macros */
|
|||||||
" .endif\n"
|
" .endif\n"
|
||||||
".endmacro\n"
|
".endmacro\n"
|
||||||
".macro jcc Target\n"
|
".macro jcc Target\n"
|
||||||
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
" .if .match(Target, 0)\n"
|
||||||
|
" bcs *+5\n"
|
||||||
|
" jmp Target\n"
|
||||||
|
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
||||||
" bcc Target\n"
|
" bcc Target\n"
|
||||||
" .else\n"
|
" .else\n"
|
||||||
" bcs *+5\n"
|
" bcs *+5\n"
|
||||||
@ -120,7 +138,10 @@ static const char MacLongBranch [] = /* Long branch macros */
|
|||||||
" .endif\n"
|
" .endif\n"
|
||||||
".endmacro\n"
|
".endmacro\n"
|
||||||
".macro jvs Target\n"
|
".macro jvs Target\n"
|
||||||
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
" .if .match(Target, 0)\n"
|
||||||
|
" bvc *+5\n"
|
||||||
|
" jmp Target\n"
|
||||||
|
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
||||||
" bvs Target\n"
|
" bvs Target\n"
|
||||||
" .else\n"
|
" .else\n"
|
||||||
" bvc *+5\n"
|
" bvc *+5\n"
|
||||||
@ -128,7 +149,10 @@ static const char MacLongBranch [] = /* Long branch macros */
|
|||||||
" .endif\n"
|
" .endif\n"
|
||||||
".endmacro\n"
|
".endmacro\n"
|
||||||
".macro jvc Target\n"
|
".macro jvc Target\n"
|
||||||
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
" .if .match(Target, 0)\n"
|
||||||
|
" bvs *+5\n"
|
||||||
|
" jmp Target\n"
|
||||||
|
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
|
||||||
" bvc Target\n"
|
" bvc Target\n"
|
||||||
" .else\n"
|
" .else\n"
|
||||||
" bvs *+5\n"
|
" bvs *+5\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user