From: ceriel Date: Mon, 8 Dec 1986 10:39:13 +0000 (+0000) Subject: Only call "newrelo" when needed. X-Git-Tag: release-5-5~5111 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=a6ecac6f1d8c5dc4367eb92e941e38d0096a954e;p=ack.git Only call "newrelo" when needed. --- diff --git a/mach/6809/as/mach4.c b/mach/6809/as/mach4.c index deb9a0178..8ea2aba3d 100644 --- a/mach/6809/as/mach4.c +++ b/mach/6809/as/mach4.c @@ -35,7 +35,8 @@ operation { emit1(0x10); emit1($1); $2.val -= (DOTVAL+2); #ifdef RELOCATION - newrelo($2.typ, RELPC|RELO2|RELBR); + if (rflag != 0 && PASS_RELO) + newrelo($2.typ, RELPC|RELO2|RELBR); #endif emit2($2.val); } @@ -44,7 +45,8 @@ operation { emit1($1); $2.val -= (DOTVAL+2); #ifdef RELOCATION - newrelo($2.typ, RELPC|RELO2|RELBR); + if (rflag != 0 && PASS_RELO) + newrelo($2.typ, RELPC|RELO2|RELBR); #endif emit2($2.val); } @@ -52,7 +54,8 @@ operation IMMED '#' expr { emit1($1); #ifdef RELOCATION - newrelo($3.typ, RELO1); + if (rflag != 0 && PASS_RELO) + newrelo($3.typ, RELO1); #endif emit1($3.val); } @@ -64,13 +67,15 @@ operation case 0x0C: case 0x0E: #ifdef RELOCATION - newrelo($3.typ, RELO2|RELBR); + if (rflag != 0 && PASS_RELO) + newrelo($3.typ, RELO2|RELBR); #endif emit2($3.val); - break; + break; default: #ifdef RELOCATION - newrelo($3.typ, RELO1); + if (rflag != 0 && PASS_RELO) + newrelo($3.typ, RELO1); #endif emit1($3.val); break; @@ -83,7 +88,8 @@ operation else emit1or2($1 - 0x10); #ifdef RELOCATION - newrelo($3.typ, RELO1); + if (rflag != 0 && PASS_RELO) + newrelo($3.typ, RELO1); #endif emit1($3.val); } @@ -91,7 +97,8 @@ operation XOP '>' expr { emit1or2($1 + 0x10); #ifdef RELOCATION - newrelo($3.typ, RELO2|RELBR); + if (rflag != 0 && PASS_RELO) + newrelo($3.typ, RELO2|RELBR); #endif emit2($3.val); } @@ -129,7 +136,8 @@ operation { emit1or2($1); emit1(0x9F); #ifdef RELOCATION - newrelo($3.typ, RELO2|RELBR); + if (rflag != 0 && PASS_RELO) + newrelo($3.typ, RELO2|RELBR); #endif emit2($3.val); } @@ -158,7 +166,8 @@ operation } else { emit1or2($1 + 0x10); #ifdef RELOCATION - newrelo($2.typ, RELO2|RELBR); + if (rflag != 0 && PASS_RELO) + newrelo($2.typ, RELO2|RELBR); #endif emit2($2.val); } diff --git a/mach/6809/as/mach5.c b/mach/6809/as/mach5.c index 9f6eab7fe..ad2f7a4f2 100644 --- a/mach/6809/as/mach5.c +++ b/mach/6809/as/mach5.c @@ -35,7 +35,8 @@ expr_t exp; emit1(opc); if (sm == 0) { #ifdef RELOCATION - newrelo(exp.typ, RELPC|RELO2|RELBR); + if (rflag != 0 && PASS_RELO) + newrelo(exp.typ, RELPC|RELO2|RELBR); #endif emit2(dist); } else @@ -93,7 +94,8 @@ expr_t exp; } else { emit1(0x89 + reg + ind); #ifdef RELOCATION - newrelo(exp.typ, RELO2|RELBR); + if (rflag != 0 && PASS_RELO) + newrelo(exp.typ, RELO2|RELBR); #endif emit2(exp.val); }