This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fold() and target-specific macros
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Roger Sayle <roger at eyesopen dot com>, gcc at gcc dot gnu dot org
- Date: Sat, 14 Aug 2004 10:15:05 +0200
- Subject: Re: fold() and target-specific macros
- References: <16669.59098.135486.735725@cuddles.cambridge.redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sat, Aug 14, 2004 at 11:18:02AM +0100, Andrew Haley wrote:
> We've been running into a problem where the Java bytecode we generate
> from Java source is different on different targets. Given that
> there's only one Java virtual machine, this is odd. :-)
>
> It's stuff like the code I've attached, which does folding based on
> the characteristics of the back end, in particular BITS_PER_WORD.
>
> I'm not sure what to do with this. Perhaps we should really not be
> trying to do this for the Java VM, or maybe we could do something
> really simple like disabling target-specific folders when not actually
> generating target-specific code.
I fear there are many target macros which get used with -femit-class-files,
e.g. all the floating point stuff etc.
Say the 0x7ff8000000000000 vs. 0x7fffffffffffffff NaN you worked on
yesterday.
One drastic solution could be to use separate backends for
gcj and for gcj -C, where jc1 would be as it is now and jcb1 or whatever
would use a config/bytecode/ target files rather than the selected target.
The drawbacks would be big (e.g. libbackend.a would need to be built twice,
increased Makefile complexity, etc.), the advantage would be that it would
certainly be completely target independent.
Jakub