mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
[ARM] Update selected_cpu based on info got during parsing
gas/ * config/tc-arm.c (aeabi_set_public_attributes): Update intended_arch based on the info we got during parsing. (arm_handle_align): Make sure the p2align expanding logic under thumb unchanged. gas/testsuite/ * gas/arm/blx-bl-convert.d: New testcase. * gas/arm/blx-bl-convert.l: Warning expectation. * gas/arm/blx-bl-convert.s: Source file.
This commit is contained in:
parent
614b09cefb
commit
7f78eb340a
@ -1,3 +1,10 @@
|
||||
2014-08-26 Jiong Wang <jiong.wang@arm.com>
|
||||
|
||||
* config/tc-arm.c (aeabi_set_public_attributes): Update selected_cpu
|
||||
based on the info we got during parsing.
|
||||
(arm_handle_align): Make sure the p2align expanding logic under thumb
|
||||
unchanged.
|
||||
|
||||
2014-08-26 Maciej W. Rozycki <macro@codesourcery.com>
|
||||
|
||||
* config/tc-mips.c (macro) <M_SAA_AB>: Remove duplicate code and
|
||||
|
@ -20848,7 +20848,8 @@ arm_handle_align (fragS * fragP)
|
||||
|
||||
if (fragP->tc_frag_data.thumb_mode & (~ MODE_RECORDED))
|
||||
{
|
||||
if (ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v6t2))
|
||||
if (ARM_CPU_HAS_FEATURE (selected_cpu_name[0]
|
||||
? selected_cpu : arm_arch_none, arm_ext_v6t2))
|
||||
{
|
||||
narrow_noop = thumb_noop[1][target_big_endian];
|
||||
noop = wide_thumb_noop[target_big_endian];
|
||||
@ -20862,7 +20863,9 @@ arm_handle_align (fragS * fragP)
|
||||
}
|
||||
else
|
||||
{
|
||||
noop = arm_noop[ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v6k) != 0]
|
||||
noop = arm_noop[ARM_CPU_HAS_FEATURE (selected_cpu_name[0]
|
||||
? selected_cpu : arm_arch_none,
|
||||
arm_ext_v6k) != 0]
|
||||
[target_big_endian];
|
||||
noop_size = 4;
|
||||
#ifdef OBJ_ELF
|
||||
@ -25109,6 +25112,8 @@ aeabi_set_public_attributes (void)
|
||||
if (ARM_CPU_HAS_FEATURE (thumb_arch_used, arm_arch_any))
|
||||
ARM_MERGE_FEATURE_SETS (flags, flags, arm_ext_v4t);
|
||||
|
||||
selected_cpu = flags;
|
||||
|
||||
/* Allow the user to override the reported architecture. */
|
||||
if (object_arch)
|
||||
{
|
||||
|
@ -1,3 +1,9 @@
|
||||
2014-08-26 Jiong Wang <jiong.wang@arm.com>
|
||||
|
||||
* gas/arm/blx-bl-convert.d: New testcase.
|
||||
* gas/arm/blx-bl-convert.l: Warning expectation.
|
||||
* gas/arm/blx-bl-convert.s: Source file.
|
||||
|
||||
2014-08-26 Maciej W. Rozycki <macro@codesourcery.com>
|
||||
|
||||
* gas/mips/l_d.d: Remove ECOFF offset alternatives.
|
||||
|
21
gas/testsuite/gas/arm/blx-bl-convert.d
Normal file
21
gas/testsuite/gas/arm/blx-bl-convert.d
Normal file
@ -0,0 +1,21 @@
|
||||
#name: blx->bl convert under no -march/cpu
|
||||
#error-output: blx-bl-convert.l
|
||||
#objdump: -d
|
||||
|
||||
.*: file format .*
|
||||
|
||||
Disassembly of section \.text:
|
||||
|
||||
00000000 <entry>:
|
||||
0: f000 f800 bl 4 <label>
|
||||
|
||||
00000004 <label>:
|
||||
4: 4770 bx lr
|
||||
\.\.\.
|
||||
|
||||
00000008 <label2>:
|
||||
8: ebffffff bl c <label3>
|
||||
|
||||
0000000c <label3>:
|
||||
c: e12fff1e bx lr
|
||||
|
4
gas/testsuite/gas/arm/blx-bl-convert.l
Normal file
4
gas/testsuite/gas/arm/blx-bl-convert.l
Normal file
@ -0,0 +1,4 @@
|
||||
[^:]*: Assembler messages:
|
||||
[^:]*:7: Warning: blx to Thumb func 'label' from Thumb ISA state changed to bl
|
||||
[^:]*:16: Warning: blx to 'label3' an ARM ISA state function changed to bl
|
||||
|
20
gas/testsuite/gas/arm/blx-bl-convert.s
Normal file
20
gas/testsuite/gas/arm/blx-bl-convert.s
Normal file
@ -0,0 +1,20 @@
|
||||
.syntax unified
|
||||
|
||||
.thumb
|
||||
.type entry, %function
|
||||
.global entry
|
||||
entry:
|
||||
blx label
|
||||
|
||||
.type label, %function
|
||||
label:
|
||||
bx lr
|
||||
|
||||
.arm
|
||||
.type label2, %function
|
||||
label2:
|
||||
blx label3
|
||||
|
||||
.type label3, %function
|
||||
label3:
|
||||
bx lr
|
Loading…
Reference in New Issue
Block a user