aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorclaziss <claziss@synopsys.com>2018-07-23 11:09:43 +0200
committerClaudiu Zissulescu <claziss@gmail.com>2018-07-23 11:09:43 +0200
commitf02806be1ff3d25fdf4d9e06ced33c4b138458aa (patch)
tree86003c4f1031168ccd1a13494ef075bf39476dbb /gas
parent898ade12ee835c3a55460ae4fe311f40a01cf586 (diff)
downloadgdb-f02806be1ff3d25fdf4d9e06ced33c4b138458aa.zip
gdb-f02806be1ff3d25fdf4d9e06ced33c4b138458aa.tar.gz
gdb-f02806be1ff3d25fdf4d9e06ced33c4b138458aa.tar.bz2
[ARC] Fix case-sensitivity for extension instructions.
In ARC assembler, we accept case insensitive mnemonics, but this was not the case for extension instruction, fix it and add a test. gas/ Claudiu Zissulescu <claziss@synopsys.com> * config/tc-arc.c (tokenize_extinsn): Convert to lower case the name of extension instructions. * testsuite/gas/arc/textinsn_case.d: New file. * testsuite/gas/arc/textinsn_case.s: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-arc.c4
-rw-r--r--gas/testsuite/gas/arc/textinsn_case.d9
-rw-r--r--gas/testsuite/gas/arc/textinsn_case.s6
4 files changed, 26 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 5df35569..dbaa02d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2018-07-23 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * config/tc-arc.c (tokenize_extinsn): Convert to lower case the
+ name of extension instructions.
+ * testsuite/gas/arc/textinsn_case.d: New file.
+ * testsuite/gas/arc/textinsn_case.s: Likewise.
+
2018-07-22 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (build_vex_prefix): Determine vector
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index cd90fdf..a1ce34d 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -4369,6 +4369,10 @@ tokenize_extinsn (extInstruction_t *einsn)
insn_name = xstrdup (p);
restore_line_pointer (c);
+ /* Convert to lower case. */
+ for (p = insn_name; *p; ++p)
+ *p = TOLOWER (*p);
+
/* 2nd: get major opcode. */
if (*input_line_pointer != ',')
{
diff --git a/gas/testsuite/gas/arc/textinsn_case.d b/gas/testsuite/gas/arc/textinsn_case.d
new file mode 100644
index 0000000..f7ef91f
--- /dev/null
+++ b/gas/testsuite/gas/arc/textinsn_case.d
@@ -0,0 +1,9 @@
+#objdump: -d
+
+.*: +file format .*arc.*
+
+
+Disassembly of section .text:
+
+[0-9a-f]+ <test>:
+\s+[0-9a-f]+:\s+3a25 00c1\s+aes_qroundf\s+r1,r2,r3
diff --git a/gas/testsuite/gas/arc/textinsn_case.s b/gas/testsuite/gas/arc/textinsn_case.s
new file mode 100644
index 0000000..4d04968
--- /dev/null
+++ b/gas/testsuite/gas/arc/textinsn_case.s
@@ -0,0 +1,6 @@
+ .cpu em
+ .extInstruction aes_qRoundF, 7, 0x25, SUFFIX_COND, SYNTAX_3OP
+
+ .text
+test:
+ aes_qRoundF r1,r2,r3