Fix "psb CSYNC" and "bti C".
authorAndrew Pinski <apinski@marvell.com>
Thu, 21 Nov 2019 20:53:02 +0000 (12:53 -0800)
committerAndrew Pinski <apinski@marvell.com>
Mon, 25 Nov 2019 18:27:26 +0000 (18:27 +0000)
psb CYSNC was not finding that CSYNC was a correct spelling.
The problem was upper case version was being put in the
wrong hashtable.  This fixes the problem by using the
correct hashtable.
Also adds testcases for the upper case versions.

        * config/tc-aarch64.c (md_begin): Use correct
        hash table for uppercase version of hint.
        * testsuite/gas/aarch64/system-2.s: Extend psb case to uppercase.
        * testsuite/gas/aarch64/system-2.d: Update.

Change-Id: If43f8b85cacd24840d596c3092b0345e5f212766

gas/ChangeLog
gas/config/tc-aarch64.c
gas/testsuite/gas/aarch64/bti.d
gas/testsuite/gas/aarch64/bti.s
gas/testsuite/gas/aarch64/illegal-bti.l
gas/testsuite/gas/aarch64/system-2.d
gas/testsuite/gas/aarch64/system-2.s

index b3affbbaa170fd73c5cb1d8823b244a5998f25f5..09991524da1cd09872e865e33de598541ca99ac7 100644 (file)
@@ -1,3 +1,10 @@
+2019-11-25  Andrew Pinski  <apinski@marvell.com>
+
+       * config/tc-aarch64.c (md_begin): Use correct
+       hash table for uppercase version of hint.
+       * testsuite/gas/aarch64/system-2.s: Extend psb case to uppercase.
+       * testsuite/gas/aarch64/system-2.d: Update.
+
 2019-11-25  Christian Eggers  <ceggers@gmx.de>
 
        * as.h: Define SEC_OCTETS as SEC_ELF_OCTETS if OBJ_ELF.
index 77a9189e7a46117f70d25b753af743956c764ecd..c2a6a1e75d06a9b439a155bf63e2500373e43ea3 100644 (file)
@@ -8782,12 +8782,15 @@ md_begin (void)
   for (i = 0; aarch64_hint_options[i].name != NULL; i++)
     {
       const char* name = aarch64_hint_options[i].name;
+      const char* upper_name = get_upper_str(name);
 
       checked_hash_insert (aarch64_hint_opt_hsh, name,
                           (void *) (aarch64_hint_options + i));
-      /* Also hash the name in the upper case.  */
-      checked_hash_insert (aarch64_pldop_hsh, get_upper_str (name),
-                          (void *) (aarch64_hint_options + i));
+
+      /* Also hash the name in the upper case if not the same.  */
+      if (strcmp (name, upper_name) != 0)
+       checked_hash_insert (aarch64_hint_opt_hsh, upper_name,
+                            (void *) (aarch64_hint_options + i));
     }
 
   /* Set the cpu variant based on the command-line options.  */
index 4f65ee5485b98f3b2f4ab0f4d4f7caaea8722f17..e1ac7005dff4b3130759eea5fff88f0cea62f66b 100644 (file)
@@ -10,3 +10,6 @@ Disassembly of section \.text:
 .*:    d503245f        bti     c
 .*:    d503249f        bti     j
 .*:    d50324df        bti     jc
+.*:    d503245f        bti     c
+.*:    d503249f        bti     j
+.*:    d50324df        bti     jc
index 42f199d7014bff9e3bd34062a6f53b7e99e14482..528447b4623be5b5d86caea3c7fa8a2d5728bc69 100644 (file)
@@ -6,3 +6,7 @@
        bti c
        bti j
        bti jc
+
+       bti C
+       bti J
+       bti JC
index 354c6f239ac6b5c0a72944c329c4e99c8573d640..d18f8c57d293cedf2d3e79883173eb0c54765a6e 100644 (file)
@@ -3,3 +3,6 @@
 [^:]*:[0-9]+: Error: selected processor does not support `bti c'
 [^:]*:[0-9]+: Error: selected processor does not support `bti j'
 [^:]*:[0-9]+: Error: selected processor does not support `bti jc'
+[^:]*:[0-9]+: Error: selected processor does not support `bti C'
+[^:]*:[0-9]+: Error: selected processor does not support `bti J'
+[^:]*:[0-9]+: Error: selected processor does not support `bti JC'
index bcf2b8eff1fc1f930c733bc1cc8a738718d9809f..7896dfbeffedac6599737abf919ffc0075a866de 100644 (file)
@@ -10,3 +10,4 @@ Disassembly of section \.text:
    4:  d503221f        esb
    8:  d503223f        psb     csync
    c:  d503223f        psb     csync
+  10:  d503223f        psb     csync
index 3402e7622da510429223ae45a0f897a1ff6c21a8..d6194491969790f43b00be950440e960af16504b 100644 (file)
@@ -7,4 +7,5 @@
 
        /* Statistical profiling.  */
        psb csync
+       psb CSYNC
        hint #0x11
This page took 0.039526 seconds and 4 git commands to generate.