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]

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


On 12/03/13 10:30, Will Newton wrote:

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 without specifiying CPU type.
---
  gas/config/tc-arm.c                    | 2 +-
  gas/testsuite/gas/arm/vstr-thumb-bad.d | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

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..4b78b1c 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
  # source: vstr-bad.s
  # error-output: vstr-thumb-bad.l



I'm not sure that's quite right yet. VFP wasn't available in Thumb mode until the architecture variant ARMv6T2 was introduced, so I think you really need something like -mcpu=arm1156t2f-s rather than no CPU at all.

OK with that change.

R.


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