diff options
author | WANG Xuerui <git@xen0n.name> | 2022-10-25 14:36:52 +0800 |
---|---|---|
committer | WANG Xuerui <git@xen0n.name> | 2022-12-04 16:14:43 +0800 |
commit | bdc16f086f1664b56d8add0691c9a80d7997efd9 (patch) | |
tree | 13bd26ccab93fe2623f161ec21712dfcc7c076e8 /src/corelib/global/qprocessordetection.h | |
parent | 6da057d811fd9494e1c173ba38d54bc3e9810f41 (diff) |
Add LoongArch detection
- detect the LoongArch architecture, define Q_PROCESSOR_LOONGARCH and
Q_PROCESSOR_LOONGARCH_{32,64} appropriately
- document the macros as being available starting from 6.5
- add LoongArch ELF support in QElfParser
Change-Id: I438146af49ec3adacacec84c27c9f4abaa542830
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qprocessordetection.h')
-rw-r--r-- | src/corelib/global/qprocessordetection.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h index 1b6139152e..6ca1d23933 100644 --- a/src/corelib/global/qprocessordetection.h +++ b/src/corelib/global/qprocessordetection.h @@ -200,6 +200,20 @@ // Q_BYTE_ORDER not defined, use endianness auto-detection /* + LoongArch family, known variants: 32- and 64-bit + + LoongArch is little-endian. +*/ +#elif defined(__loongarch__) +# define Q_PROCESSOR_LOONGARCH +# if __loongarch_grlen == 64 +# define Q_PROCESSOR_LOONGARCH_64 +# else +# define Q_PROCESSOR_LOONGARCH_32 +# endif +# define Q_BYTE_ORDER Q_LITTLE_ENDIAN + +/* Motorola 68000 family, no revisions or variants M68K is big-endian. |