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: Bytes order and words order


Neil Booth <neil@daikokuya.co.uk> writes:

| Gabriel Dos Reis wrote:-
| 
| > 
| > Hi,
| > 
| >   Supports for floating-point data types in the C++ runtime system
| > require me to know the bytes and words orders used by the target.  I
| > would like to have means for the front-end or driver to pass those
| > information down to the library.  I think a minimal path would be for
| > CPP to define some macros like
| > 
| >     -D__TARGET_BYTES_ORDER__=__BIG_ENDIAN__ (or __LITTLE_ENDIAN__)
| >     -D__TARGET_WORDS_ORDER__=__BIG_ENDIAN__ (or __LITTLE_ENDIAN__)
| > 
| > with, for example, __LITTLE_ENDIAN__ and __BIG_ENDIAN__ predefined to 0
| > and 1 respectivelly.  The same set of macros would be needed for the
| > host in case of cross-compiling.
| > 
| > I'll also need symbols for the floating-point model used.
| > 
| > Thoughts? Neil?
| 
| I agree with someone else who suggested you drop TARGET_, for
| consistency.  

I'm afraid it is not really about consistency with something else.
The supporting code needs to distinguish about
  (1) the host floating-point types
  (2) the target floating-point types
  
someone else reminded (3) build -- for cross-x-cross.

I would say, that consistency would require the prefix TARGET.
However, I'm not sanguine about it as far as every thing is perfectly
clear. 

I realized that some exisint software were using __LITTLE_ENDIAN, so I
don't know whether I should add a prefix (no, I'm not joking) GCC.
Probably, yes.  Any other suggestion?

-- Gaby


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