arm: fix array-out-of-bounds upon register parsing error
authorJan Beulich <jbeulich@suse.com>
Thu, 10 Jun 2021 10:39:40 +0000 (12:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 10 Jun 2021 10:39:40 +0000 (12:39 +0200)
Despite the comment ahead of the enum explicitly pointing out the need
to also update the corresponding array, 1b8833198c0 ("Add support for
MVE instructions: vcmp and vpt") failed to do so. Oddly enough the issue
appears to be spotted only by rather old gcc (4.3-ish in my case).

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

index 7133c3742351fd479597f623c6e0fa880864f4ec..ab12ba558f163f4ab66fe1e68f6bbeff2da031ac 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-10  Jan Beulich  <jbeulich@suse.com>
+
+       * config/tc-arm.c (reg_expected_msgs): Add REG_TYPE_ZR entry.
+
 2021-06-10  Jan Beulich  <jbeulich@suse.com>
 
        * config/tc-i386.c (optimize_encoding): Suppress LEA conversion
index 1e2ac65d422cb7829cde5c9f03bcc57ef297e2c5..895718c99206a2d5f655a528859a7b4b93f77b73 100644 (file)
@@ -729,7 +729,8 @@ const char * const reg_expected_msgs[] =
   [REG_TYPE_MMXWCG] = N_("iWMMXt scalar register expected"),
   [REG_TYPE_XSCALE] = N_("XScale accumulator register expected"),
   [REG_TYPE_MQ]            = N_("MVE vector register expected"),
-  [REG_TYPE_RNB]    = ""
+  [REG_TYPE_RNB]    = "",
+  [REG_TYPE_ZR]     = N_("ZR register expected"),
 };
 
 /* Some well known registers that we refer to directly elsewhere.  */
This page took 0.034884 seconds and 4 git commands to generate.