This is the mail archive of the 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, ARM] MSR/MRS assembly and disassembly tweaks

On Mon, 18 Apr 2011 14:29:33 +0100
Nick Clifton <> wrote:

> Hi Julian,
> >      gas/
> >      * config/tc-arm.c (parse_psr): Use selected_cpu not
> > cpu_variant to detect M-profile targets.
> >
> >      include/
> >      * opcode/arm.h (ARM_AEXT_V7_ARM): Remove ARM_EXT_OS from
> > bitmask.
> Right - I have applied this patch together with some fixes of my own. 
> (Full patch attached).  We now have zero unexpected failures in the
> GAS testsuite for EABI, ELF and PE based ARM toolchains.

Thanks for this!

> The problem with the SVC test was that removing ARM_EXT_OS from 
> ARM_AEXT_V7_ARM meant that -march=armv7 would select an architecture 
> that included v6m but which did not set ARM_EXT_OS.  This is correct, 
> but the code in do_t_swi() did not allow for this and so triggered a 
> bogus error condition.  I fixed this by extending the test in do_t_swi
> to exclude all v7 and higher architectures.

I don't understand the subtleties of what ARM_EXT_OS is supposed to do
enough to comment on this, I don't think...

> One thing that I am not sure about is the correct name for V7M PSR 
> register 18.  Is it BASEPRI_MASK or BASEPRI_MAX.  Judging by the
> other register names it is BASEPRI_MASK, but I could not find any 
> documentation to confirm this.
> opcodes/ChangeLog
> 2011-04-18  Nick Clifton  <>
> 	* arm-dis.c (psr_name): Revert previous delta.

But I don't think this reversion is right. AFAICT IAPSR, etc. can have
bitmasks specified for the APSR parts. Also AFAICT the name of the
register is BASEPRI_MAX, and any use of BASEPRI_MASK is wrong. See e.g.:



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