This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Add sh4-nommu-nofpu architecture
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Joern Rennecke <renneckej at superh dot com>
- Cc: joern dot rennecke at superh dot com (Joern Rennecke), andrew dot stubbs at superh dot com (Andrew Stubbs), binutils at sources dot redhat dot com (binutils)
- Date: 09 Mar 2004 19:26:54 -0300
- Subject: Re: [PATCH] Add sh4-nommu-nofpu architecture
- Organization: Red Hat Global Engineering Services Compiler Team
- References: <200403081811.i28IBjO07364@chloe.uk.w2k.superh.com>
On Mar 8, 2004, Joern Rennecke <renneckej@superh.com> wrote:
> The crucial test is are they in third-party libraries, or in tools
> used to generate ones?
Tools and, possibly, third-party libraries. We can't tell.
Oh, BTW, we've used number 7 too.
> ! #define EF_SH4_NOMMU_NOFPU 7
This number is a bad idea. Existing tools will take it as a DSP
machine, because of the macro you removed, and report a very confusing
error message.
Also, your code seems to assume there will always be a machine number
that represents a superset of a given collection of machine numbers,
except for DSP/FPU conflicts, but this is not true. SH5 is currently
the only oddball, but there may be others. Ideally, there should be a
way to express `no match' in the table, and have an error be reported,
instead of picking an incorrect match. We used to return -1 from the
merge macro in such cases before; now there's nothing we can do
AFAICT.
Frankly, I'd much rather have a static inline function with all the
code needed to merge two machine numbers than this table that I don't
find particularly appealing, especially with the additional corner
cases handled in sh_elf_merge_private_data. Ideally, the merge
function should be used for other purposes, not only in BFD.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}