This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v3, ARM] Fix error handling for pc-relative vstr in Thumb mode.


2013-03-12  Will Newton  <will.newton@linaro.org>

	* config/tc-arm.c (do_neon_ldr_str): Fix error check for PC register
	in vstr in Thumb mode for pre-ARMv7 cores.

gas/testsuite/ChangeLog:

2013-03-12  Will Newton  <will.newton@linaro.org>

	* gas/arm/vstr-thumb-bad.d: Assemble with -mcpu=arm1156t2f-s.
---
 gas/config/tc-arm.c                    | 2 +-
 gas/testsuite/gas/arm/vstr-thumb-bad.d | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Changes in v3:

 - Specify -mcpu=arm1156t2f-s rather than no CPU type.

Changes in v2:

 - There already was a test for this but it was testing the case where ARMv7 is enabled, so reuse that test.

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index ff8505c..9c1dc87 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -15690,7 +15690,7 @@ do_neon_ldr_str (void)
      And is UNPREDICTABLE in thumb mode.  */
   if (!is_ldr
       && inst.operands[1].reg == REG_PC
-      && ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v7))
+      && (ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v7) || thumb_mode))
     {
       if (!thumb_mode && warn_on_deprecated)
 	as_warn (_("Use of PC here is deprecated"));
diff --git a/gas/testsuite/gas/arm/vstr-thumb-bad.d b/gas/testsuite/gas/arm/vstr-thumb-bad.d
index 798f16d..354689f 100644
--- a/gas/testsuite/gas/arm/vstr-thumb-bad.d
+++ b/gas/testsuite/gas/arm/vstr-thumb-bad.d
@@ -1,4 +1,4 @@
 # name: VFP PC-relative VSTR thumb mode
-# as: -mfpu=vfp3 -mthumb -mcpu=cortex-a8
+# as: -mfpu=vfp -mthumb -mcpu=arm1156t2f-s
 # source: vstr-bad.s
 # error-output: vstr-thumb-bad.l
-- 
1.8.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]