Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/gas/config fix a range check for 12bit PC relative ...



details:   https://anonhg.NetBSD.org/src/rev/967cb1c7df49
branches:  trunk
changeset: 501020:967cb1c7df49
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Dec 22 12:06:27 2000 +0000

description:
fix a range check for 12bit PC relative access

diffstat:

 gnu/dist/gas/config/tc-sh.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 0a2e00e20ec8 -r 967cb1c7df49 gnu/dist/gas/config/tc-sh.c
--- a/gnu/dist/gas/config/tc-sh.c       Fri Dec 22 11:38:42 2000 +0000
+++ b/gnu/dist/gas/config/tc-sh.c       Fri Dec 22 12:06:27 2000 +0000
@@ -1924,7 +1924,7 @@
 
     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;



Home | Main Index | Thread Index | Old Index