From dd22ea4caf92806b566a902f2d15a2bf6f5e6eab Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 15 Jan 1990 11:44:43 +0000 Subject: [PATCH] fixed bug in translation of BR instruction --- mach/vax4/as/mach5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); } } -- 2.34.1