This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fold() and target-specific macros


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]