patch: alpha haifa abort

Paul Koning pkoning@xedia.com
Mon Jan 5 11:34:00 GMT 1998


>>>>> "John" == John Carr <jfc@tiac.net> writes:

 >> or do you want both __load_big_endian() and __load_little_endian()
 >> with GCC creating a no-op load for the case matching the target's
 >> byte-endianness?

 John> I want explicitly big- and little-endian loads and stores.  I
 John> think it is rare to want to swap bytes regardless of the
 John> current byte order.  Usually one is doing networking
 John> (big-endian) or PCI (little-endian) and wants to write in a
 John> specific byte order.

A different approach that might be nice to have: rather than have big
and little endian load/store intrinsics, how about explicitly little
and big endian integer data types?  Or, I suppose, it's best to have
both, since the intrinsic is a way to make "ntoh" faster, and the
datatype is a way to avoid that syntactic clutter in the first place.

I did this sort of thing recently for a device driver, by defining
"little endian int" as a class with appropriate conversion operators.
Works almost as nicely as having it builtin, the major drawback is
that the debug display is ugly.

	paul



More information about the Gcc mailing list