From: Andre Vieira Date: Tue, 10 Dec 2019 16:10:17 +0000 (+0000) Subject: [gas][arm] Set context table for '.arch_extension' X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=0e7aaa728dc23f81a7809f3c5c9b90e85b978a8a;hp=6c71eb7d70c3678f595cd8e66d78c9da5bd3ef4e;p=deliverable%2Fbinutils-gdb.git [gas][arm] Set context table for '.arch_extension' 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 * 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. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 4d2b7384ec..093219747e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2019-12-10 Vladimir Murzin + + * 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 * config/tc-i386-intel.c (O_oword_ptr): Move. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 28dc624451..c4ffeeec3a 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -32633,6 +32633,7 @@ s_arm_arch (int ignored ATTRIBUTE_UNUSED) 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); diff --git a/gas/testsuite/gas/arm/mve-arch-ext.d b/gas/testsuite/gas/arm/mve-arch-ext.d new file mode 100644 index 0000000000..0c55b38db6 --- /dev/null +++ b/gas/testsuite/gas/arm/mve-arch-ext.d @@ -0,0 +1,7 @@ +# 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 diff --git a/gas/testsuite/gas/arm/mve-arch-ext.s b/gas/testsuite/gas/arm/mve-arch-ext.s new file mode 100644 index 0000000000..bbbb9ee128 --- /dev/null +++ b/gas/testsuite/gas/arm/mve-arch-ext.s @@ -0,0 +1,6 @@ +.syntax unified +.thumb +.arch armv8.1-m.main +.arch_extension mve + +asrl r2, r3, #5