[PATCH xserver] Add definitions for the AArch64 architecture

Thierry Reding thierry.reding at avionic-design.de
Thu Jan 3 12:48:22 PST 2013


On Thu, Jan 03, 2013 at 04:33:03PM +0100, Thomas Petazzoni wrote:
> AArch64 is the new 64 bits architecture from ARM, for which a few
> definitions are needed in the X.org server to make it build properly.
> 
> Like for the ARM 32 bits architecture, we for now assume that AArch64
> will be used in Little Endian mode for Linux.

Is there a reason for doing so? It should be possible to get this
information from predefined preprocessor macros:

	$ arm-unknown-linux-gnueabi-gcc -mlittle-endian -dM -E - < /dev/null | grep -i arm
	#define __ARMEL__ 1
	#define __ARM_ARCH_5T__ 1
	#define __ARM_PCS 1
	#define __arm__ 1
	#define __ARM_EABI__ 1

	$ arm-unknown-linux-gnueabi-gcc -mbig-endian -dM -E - < /dev/null | grep -i arm
	#define __ARM_ARCH_5T__ 1
	#define __ARMEB__ 1
	#define __ARM_PCS 1
	#define __arm__ 1
	#define __ARM_EABI__ 1

So it should be possible to make the byte order conditional on __ARMEL__
and __ARMEB__ respectively. Alternatively there is __BYTE_ORDER__ which
is defined to __ORDER_LITTLE_ENDIAN__ and __ORDER_BIG_ENDIAN__ for
-mlittle-endian and -mbig-endian respectively.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130103/54148fb7/attachment-0001.pgp>


More information about the xorg-devel mailing list