[PATCH ARM 1/6]: Architectural Extensions - Infrastructure

Matthew Gretton-Dann matthew.gretton-dann@arm.com
Thu Sep 23 09:18:00 GMT 2010


All,

This patch updates the infrastructure currently in use to allow 
architectural extensions to be specified in the -mcpu and -march 
commandline options.

The patch adds the ability to remove architectural extensions from the
architecture being assembled to.  This is done by pre-pending 'no' to
the extension name.  It also allows us to restrict architecture
extensions to particular architectures.

The patch adds the .arch_extension directive to all architecture
extensions to be specified in an assembler source file.

The patch also applies an ordering restriction on the specification of 
architecture extensions.  The extensions to be added must be listed
before those to be removed, and each set must be in alphabetical order.

So the following will be valid options:
 * -march=armv7-a+mp+sec
 * -mcpu=cortex-a9+sec+nomp

But the following are invalid
 * -march=armv7-a+sec+mp (not alphabetical order)
 * -mcpu=cortex-a9+nomp+sec (removed extensions before added).

I believe that these will not cause too great a restriction on the 
pre-existing extensions as they are not intended to be used together,
and I encountered several issues during development which lead me to 
believe nobody has been using this feature.  (The main issue being that
-march=...+ext wouldn't recognise the architecture).

There are no tests in this patch as the following patches all contain
tests that stress this infrastructure.

Proposed ChangeLog:

gas/ChangeLog:
2010-09-22  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>

	* config/tc-arm.c (md_pseduo_table): Add .arch_extension directive.
	(arm_option_extension_value_table): Add.
	(arm_extensions): Change type.
	(arm_option_cpu_table): Rename...
	(arm_option_fpu_table): ...to this.
	(arm_fpus): Change type.
	(arm_parse_extension): Enforce alphabetical order.  Allow 
	extensions to be removed.
	(arm_parse_arch): Allow extensions to be specified with -march.
	(s_arm_arch_extension): Add.
	(s_arm_fpu): Update for type changes.
	* doc/c-arm.texi: Document changes to infrastructure.

Thanks,

Matt


-- 
Matthew Gretton-Dann
Principal Engineer - PDSW Tools
ARM Ltd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1009-001-arch-extensions-infrastructure.patch
Type: text/x-patch
Size: 10412 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100923/fe28735c/attachment.bin>


More information about the Binutils mailing list