From: ceriel Date: Thu, 6 Aug 1987 11:17:30 +0000 (+0000) Subject: some nofits are actually errors X-Git-Tag: release-5-5~3943 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=7f7f9b36cd883798f8757d8e8ea3088b8e8f0146;p=ack.git some nofits are actually errors --- diff --git a/mach/m68k2/as/mach0.c b/mach/m68k2/as/mach0.c index c2b6cc8ce..258b8032b 100644 --- a/mach/m68k2/as/mach0.c +++ b/mach/m68k2/as/mach0.c @@ -15,6 +15,9 @@ #define WORDS_REVERSED /* high order word has lowest address */ #define LISTING /* enable listing facilities */ #define RELOCATION /* generate relocatable code */ +#define DEBUG 0 + +#define Xfit(f) if (!(f)) Xnofit(); #undef valu_t #define valu_t long diff --git a/mach/m68k2/as/mach4.c b/mach/m68k2/as/mach4.c index 4e97d9bb1..1085b8cf7 100644 --- a/mach/m68k2/as/mach4.c +++ b/mach/m68k2/as/mach4.c @@ -23,7 +23,7 @@ operation { branch($1, $2);} | DBR DREG ',' expr { $4.val -= (DOTVAL+2); - fit(fitw($4.val)); + Xfit(fitw($4.val)); emit2($1 | $2); #ifdef RELOCATION newrelo($4.typ, RELPC|RELO2|RELBR|RELWR); @@ -102,7 +102,7 @@ operation | UNLK AREG { emit2(047130 | $2);} | TRAP '#' absexp - { fit(fit4($3)); emit2(047100|low4($3));} + { Xfit(fit4($3)); emit2(047100|low4($3));} | RTD imm { test68010(); emit2(047164); diff --git a/mach/m68k2/as/mach5.c b/mach/m68k2/as/mach5.c index 766496202..14743bc0d 100644 --- a/mach/m68k2/as/mach5.c +++ b/mach/m68k2/as/mach5.c @@ -23,19 +23,17 @@ ea_1(sz, bits) if (bits) serror("bad addressing categorie"); if (flag & FITW) - if ( + Xfit ( ! fitw(exp_1.val) && (mrg_1 != 074 || ! fit16(exp_1.val)) - ) - nofit(); + ) ; if (flag & FITB) { - if ( + Xfit ( ! fitb(exp_1.val) && (mrg_1 != 074 || ! fit8(exp_1.val)) - ) - nofit(); + ); if (mrg_1 == 074) exp_1.val &= 0xFF; } @@ -60,7 +58,7 @@ ea_2(sz, bits) index(hibyte) { - fit(fitb(exp_2.val)); + Xfit(fitb(exp_2.val)); exp_2.val = hibyte | lowb(exp_2.val); } @@ -92,12 +90,12 @@ shift_op(opc, sz) return; } if (mrg_2 < 010) { - fit(fit3(exp_1.val)); + Xfit(fit3(exp_1.val)); emit2((opc&0170430) | sz | low3(exp_1.val)<<9 | mrg_2); return; } checksize(sz, 2); - fit(exp_1.val == 1); + Xfit(exp_1.val == 1); emit2((opc&0177700) | mrg_2); ea_2(SIZE_W, MEM|ALT); } @@ -359,7 +357,7 @@ expr_t exp; else emit2(opc | lowb(exp.val)); } else { - fit(fitw(exp.val)); + Xfit(fitw(exp.val)); emit2(opc); #ifdef RELOCATION newrelo(exp.typ, RELPC|RELO2|RELBR|RELWR); @@ -455,3 +453,8 @@ ea73(ri, sz) checksize(sz, 2|4); index(ri<<12 | (sz&0200)<<4); } + +Xnofit() +{ + if (pass == PASS_3) serror("too big"); +}