From: ceriel Date: Mon, 15 Jan 1990 11:44:43 +0000 (+0000) Subject: fixed bug in translation of BR instruction X-Git-Tag: release-5-5~1945 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=dd22ea4caf92806b566a902f2d15a2bf6f5e6eab;p=ack.git fixed bug in translation of BR instruction --- diff --git a/mach/vax4/as/mach5.c b/mach/vax4/as/mach5.c index bc191306f..42e3f4b3e 100644 --- a/mach/vax4/as/mach5.c +++ b/mach/vax4/as/mach5.c @@ -213,7 +213,7 @@ branch(opc, exp) exp.val -= DOTGAIN; } if (pass >= PASS_2 && - ((exp.typ & ~S_DOT) != DOTTYP || ! fitw(exp.val))) { + ((exp.typ & ~S_DOT) != DOTTYP || ! fitw(exp.val-1))) { serror("label too far"); } if (small(fitb(exp.val) && ((exp.typ & ~S_DOT) == DOTTYP), 1)) { @@ -222,7 +222,7 @@ branch(opc, exp) } else { emit1(opc|0x20); - emit2((int) exp.val); + emit2((int) (exp.val - 1)); } }