[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/12698] New: fails to build with march=all on arm
From: |
address@hidden |
Subject: |
[Bug gas/12698] New: fails to build with march=all on arm |
Date: |
Sun, 24 Apr 2011 22:21:14 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=12698
Summary: fails to build with march=all on arm
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: gas
AssignedTo: address@hidden
ReportedBy: address@hidden
As noticed by debian bug 623964, when building an arm kernel with a snasphot
made on 04/19, compiling head.S is failing with :
Error: selected processor does not support requested special purpose register
-- `mrs r2,cpsr'
It's valid for current head.
To reproduce, create a head.S containing:
mrs r2, cpsr
msr cpsr_c, r2
And then build with ./gas/as-new -march=all -c head.S -o head.o
I believe it's due to this commit :
http://sourceware.org/git/?p=binutils.git;a=commitdiff;h=335cd49156302284cea0438fd068f0a7cc11355a
I've written this workaround:
--- binutils.orig/gas/config/tc-arm.c
+++ binutils/gas/config/tc-arm.c
@@ -5356,6 +5356,11 @@ parse_psr (char **str, bfd_boolean lhs)
bfd_boolean is_apsr = FALSE;
bfd_boolean m_profile = ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_m);
+ /* march=all, will match the m_profile case too, so things like 'mrs
r2,cpsr'
+ * will now fail. Workaround by saying it's not a m profile */
+ if (selected_cpu.core == arm_arch_any.core)
+ m_profile = FALSE;
+
/* CPSR's and SPSR's can now be lowercase. This is just a convenience
feature for ease of use and backwards compatibility. */
p = *str;
It doesn't seem to create any regression but I'm not sure how good is this
patch. At least, I hope it'll help fixing the bug.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug gas/12698] New: fails to build with march=all on arm,
address@hidden <=