[PATCH, ARM] MSR/MRS assembly and disassembly tweaks

Nick Clifton nickc@redhat.com
Mon Apr 18 13:29:00 GMT 2011


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.

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.

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.

Cheers
   Nick

gas/ChangeLog
2011-04-18  Julian Brown  <julian@codesourcery.com>
	    Nick Clifton  <nickc@redhat.com>

	* config/tc-arm.c (parse_psr): Use selected_cpu not cpu_variant to
	detect M-profile targets.
	(do_t_swi): Exclude v7 and higher variants from arm_ext_os test.
	(v7m_psrs): Fix typo: basepri_max should be basepri_mask.

gas/testsuite/ChangeLog
2011-04-18  Nick Clifton  <nickc@redhat.com>

	* gas/arm/arch7.s: Fix typo basepri_max should be basepri_mask.
	* gas/arm/mrs-msr-thumb-v7e-m.s: Likewise.
	* gas/arm/arch7.d: Update expected disassembly.
	* gas/arm/attr-march-armv7.d: Remove Microcontroller tag.
	* gas/arm/blx-bad.d: Only run for ELF based targets.
	* gas/arm/mrs-msr-thumb-v6t2.d: Likewise.
	* gas/arm/vldm-arm.d: Likewise.
	* gas/arm/mrs-msr-thumb-v7-m.d: Likewise.
	Remove qualifiers from PSR and IAPSR regsiter names.
	* gas/arm/mrs-msr-thumb-v7e-m.d: Likewise.
	* gas/arm/thumb2_bcond.d: Update expected disassembly to allow for
	relaxing of branch insns.
	* gas/arm/thumb32.d: Fix whitespace problems in disassembly.

opcodes/ChangeLog
2011-04-18  Nick Clifton  <nickc@redhat.com>

	* arm-dis.c (psr_name): Revert previous delta.

include/opcode/ChangeLog
2011-04-18  Julian Brown  <julian@codesourcery.com>

	* arm.h (ARM_AEXT_V7_ARM): Remove ARM_EXT_OS from bitmask.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm.patch
Type: text/x-diff
Size: 14185 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20110418/3ab61afc/attachment.bin>


More information about the Binutils mailing list