This patch fixes .arch_extension behaviour.
Currently, context table for '.arch_extension' is only set while
"-march" processing, but it is not set while .arch processing,
so following code is rejected
.syntax unified
.thumb
.arch armv8.1-m.main
.arch_extension mve.fp
unless -march=armv8.1-m.main is given.
Committing on behalf of Vladimir Murzin
gas/ChangeLog:
2019-12-10 Vladimir Murzin <vladimir.murzin@arm.com>
* config/tc-arm.c (s_arm_arch): Set selected_ctx_ext_table.
* testsuite/gas/arm/mve-arch-ext.s: New.
* testsuite/gas/arm/mve-arch-ext.d: New.
+2019-12-10 Vladimir Murzin <vladimir.murzin@arm.com>
+
+ * config/tc-arm.c (s_arm_arch): Set selected_ctx_ext_table.
+ * testsuite/gas/arm/mve-arch-ext.s: New.
+ * testsuite/gas/arm/mve-arch-ext.d: New.
+
2019-12-09 Jan Beulich <jbeulich@suse.com>
* config/tc-i386-intel.c (O_oword_ptr): Move.
if (streq (opt->name, name))
{
selected_arch = opt->value;
+ selected_ctx_ext_table = opt->ext_table;
selected_ext = arm_arch_none;
selected_cpu = selected_arch;
strcpy (selected_cpu_name, opt->name);
--- /dev/null
+# name: MVE context sensitive .arch_extension under no -march
+# objdump: -dr --prefix-addresses --show-raw-insn -marmv8.1-m.main
+
+.*: +file format .*arm.*
+
+Disassembly of section .text:
+0[0-9a-f]+ <[^>]+> ea52 136f asrl r2, r3, #5
--- /dev/null
+.syntax unified
+.thumb
+.arch armv8.1-m.main
+.arch_extension mve
+
+asrl r2, r3, #5