[m68k] cleanup arch/cpu selection

Nathan Sidwell nathan@codesourcery.com
Fri Jan 27 12:27:00 GMT 2006


This patch implements -march= and -mcpu= options to m68k's assembler.  It also 
adds a set of -m[no-]foo extension switches.  In addition I've rationalized the 
coldfire bfd_mach enumeration to work along the lines of architectural features, 
rather than chip numbering -- there's an ever increasing number of chips.  I've 
kept the old machine names and old assembler switches for compatibility.

The architectures supported are, 68000, 68010, 68020, 68030, 68040, 68060, 
cpu32, isaa, isaaplus, isab & cfv4e.  (Although coldfire defines architecture 
'families' the chips in a single family can have differening isas and 
extensions.)  The extensions are 68851, 68881, div, usp, float, mac & emac.

I've added .arch and .cpu assembler directives to specify in the assembly file 
itself what chip to target.  CodeSourcery intends to make use of this in 
upcoming gcc patches.  This behaviour is unashamedly copied from the arm 
implementation.

I've defined a set of ef_flag bits to encode the coldfire information such that 
the linker can correctly check object file compatibility.  For compatibility, we 
allow mixing an object file with no ISA specified with an updated one.

I separated out the chip numbering scheme from the architecture feature bit mask 
-- we'd soon run out of bits if we kept going the way we were.  Although I have 
defined a numbering scheme in include/opcode.h, it's only used by the assembler 
to set the control registers.  That use could be simplified by a suitable change 
to the m68k_cpus and m68k_archs array.  I didn't want to do that with this 
patch, as it's already large enough.

I've tested this by building a complete m68k toolchain, but I have no m68k 
hardware to test it.  However, I don't expect a problem there as the changes I 
made would have been excercised by the build process.

ok?

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: all.diff
URL: <https://sourceware.org/pipermail/binutils/attachments/20060127/f9b208ca/attachment.ksh>


More information about the Binutils mailing list