From 6345c4ee259f14c113927febe43ee5588c79d03a Mon Sep 17 00:00:00 2001 From: uz Date: Tue, 17 Jul 2012 18:30:05 +0000 Subject: [PATCH] Fixed an error in the macro package that prevented the macros to work correctly. The short forms of the jumps were never choosen. The error was introduced with release 3176 in 2004(!) and reported by thefox. git-svn-id: svn://svn.cc65.org/cc65/trunk@5787 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/macpack/longbranch.mac | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ca65/macpack/longbranch.mac b/src/ca65/macpack/longbranch.mac index b053202ce..d6f6cde8a 100644 --- a/src/ca65/macpack/longbranch.mac +++ b/src/ca65/macpack/longbranch.mac @@ -2,7 +2,7 @@ .if .match(Target, 0) bne *+5 jmp Target - .elseif .def(Target) .and .const(Target) .and ((*+2)-(Target) <= 127) + .elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127) beq Target .else bne *+5 @@ -13,7 +13,7 @@ .if .match(Target, 0) beq *+5 jmp Target - .elseif .def(Target) .and .const(Target) .and ((*+2)-(Target) <= 127) + .elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127) bne Target .else beq *+5 @@ -24,7 +24,7 @@ .if .match(Target, 0) bpl *+5 jmp Target - .elseif .def(Target) .and .const(Target) .and ((*+2)-(Target) <= 127) + .elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127) bmi Target .else bpl *+5 @@ -35,7 +35,7 @@ .if .match(Target, 0) bmi *+5 jmp Target - .elseif .def(Target) .and .const(Target) .and ((*+2)-(Target) <= 127) + .elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127) bpl Target .else bmi *+5 @@ -46,7 +46,7 @@ .if .match(Target, 0) bcc *+5 jmp Target - .elseif .def(Target) .and .const(Target) .and ((*+2)-(Target) <= 127) + .elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127) bcs Target .else bcc *+5 @@ -57,7 +57,7 @@ .if .match(Target, 0) bcs *+5 jmp Target - .elseif .def(Target) .and .const(Target) .and ((*+2)-(Target) <= 127) + .elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127) bcc Target .else bcs *+5 @@ -68,7 +68,7 @@ .if .match(Target, 0) bvc *+5 jmp Target - .elseif .def(Target) .and .const(Target) .and ((*+2)-(Target) <= 127) + .elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127) bvs Target .else bvc *+5 @@ -79,7 +79,7 @@ .if .match(Target, 0) bvs *+5 jmp Target - .elseif .def(Target) .and .const(Target) .and ((*+2)-(Target) <= 127) + .elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127) bvc Target .else bvs *+5 -- 2.39.5