[PATCH gas/m68k] Fix a register range check
authorGunther Nikl <gnikl@justmail.de>
Thu, 2 Apr 2020 07:57:45 +0000 (08:57 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 2 Apr 2020 07:57:45 +0000 (08:57 +0100)
       * config/tc-m68k.c (m68k_ip): Fix range check for index register
       with a suppressed address register.

gas/ChangeLog
gas/config/tc-m68k.c

index ef0217e5d70aa1a83da637d91428ff686311b6f2..83108d362c236cf7074c697901ad7fbaf4bb5859 100644 (file)
@@ -1,3 +1,8 @@
+2020-04-02  Gunther Nikl  <gnikl@justmail.de>
+
+       * config/tc-m68k.c (m68k_ip): Fix range check for index register
+       with a suppressed address register.
+
 2020-04-01  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gas/25756
index 5483f8e017af0b0c1b144ea77cdb270383818e2d..490df5dbf5f150505c63335ce693510a8b282dd4 100644 (file)
@@ -2794,7 +2794,7 @@ m68k_ip (char *instring)
                      && opP->index.reg <= ZDATA7)
                    nextword |= (opP->index.reg - ZDATA0) << 12;
                  else if (opP->index.reg >= ZADDR0
-                          || opP->index.reg <= ZADDR7)
+                          && opP->index.reg <= ZADDR7)
                    nextword |= (opP->index.reg - ZADDR0 + 8) << 12;
                }