This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH, ARM] MSR/MRS assembly and disassembly tweaks
- From: Julian Brown <julian at codesourcery dot com>
- To: Paul Carroll <pcarroll at codesourcery dot com>
- Cc: Tejas Belagod <tejas dot belagod at arm dot com>, binutils at sourceware dot org, Nick Clifton <nickc at redhat dot com>
- Date: Wed, 13 Apr 2011 14:19:49 +0100
- Subject: Re: [PATCH, ARM] MSR/MRS assembly and disassembly tweaks
- References: <1302626484.21908.5.camel@e102484-lin.cambridge.arm.com> <4DA52786.5090107@codesourcery.com>
On Tue, 12 Apr 2011 22:33:10 -0600
Paul Carroll <pcarroll@codesourcery.com> wrote:
> On 12:59 PM, Tejas Belagod wrote:
> > Hi Julian,
> >
> > This patch seems to break one of the existing tests - msr-imm.s.
> > Basically it now thinks these instructions are illegal.
> >
> > $ as-new -march=mv7-a t.s
> > t.s: Assembler messages:
> > t.s:5: Error: syntax error -- `msr APSR_nzcvqg,#0x00000004'
> > t.s:6: Error: syntax error -- `msr APSR_g,#0x00000000'
> > t.s:7: Error: syntax error -- `msr APSR_nzcvq,#0x00000004'
> Actually, I believe the 4 new gas test failures in the ARM toolkit
> arise from changes for bug patch 12296, where include/opcode/arm.h
> was modified to add ARM_EXT_OS to the ARM_AEXT_V7_ARM definition. I
> saw this issue when comparing two source pulls, one from Saturday and
> one from Monday.
Agreed -- AFAICT, adding ARM_EXT_OS to the ARM_AEXT_V7_ARM definition
was wrong. The "OS extension" bit only applies to V6M architecture
processors.
The syntax errors happen because the test in parse_psr:
bfd_boolean m_profile = ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_m);
returns TRUE for e.g. ARMv7-A cores, since the feature arm_ext_m is
defined as:
static const arm_feature_set arm_ext_m =
ARM_FEATURE (ARM_EXT_V6M | ARM_EXT_OS | ARM_EXT_V7M, 0);
So: either ARM_EXT_OS is wrong for arm_ext_m, or ARM_EXT_OS must not be
set for non-M cores. I think the latter is true.
Thoughts?
Julian