[PATCH] Add sh4-nommu-nofpu architecture
Alexandre Oliva
aoliva@redhat.com
Tue Mar 9 22:26:00 GMT 2004
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}
More information about the Binutils
mailing list