From bb442316981ea7583e0762511660cf2dc37b3083 Mon Sep 17 00:00:00 2001 From: msaitoh Date: Fri, 22 Dec 2000 12:06:27 +0000 Subject: [PATCH] fix a range check for 12bit PC relative access --- gnu/dist/gas/config/tc-sh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/dist/gas/config/tc-sh.c b/gnu/dist/gas/config/tc-sh.c index eaa6146eea75..e6b4dfe81c48 100644 --- a/gnu/dist/gas/config/tc-sh.c +++ b/gnu/dist/gas/config/tc-sh.c @@ -1924,7 +1924,7 @@ md_apply_fix (fixP, val) case BFD_RELOC_SH_PCDISP12BY2: val /= 2; - if (val < -0x800 || val >= 0x7ff) + if (val < -0x800 || val > 0x7ff) as_bad_where (fixP->fx_file, fixP->fx_line, "pcrel too far"); buf[lowbyte] = val & 0xff; buf[highbyte] |= (val >> 8) & 0xf;