diff options
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 1f327c352e..8d65720850 100644 --- a/src/corelib/global/qprocessordetection.h +++ b/src/corelib/global/qprocessordetection.h @@ -282,6 +282,20 @@ // Q_BYTE_ORDER not defined, use endianness auto-detection /* + RISC-V family, known variants: 32- and 64-bit + + RISC-V is little-endian. +*/ +#elif defined(__riscv) +# define Q_PROCESSOR_RISCV +# if __riscv_xlen == 64 +# define Q_PROCESSOR_RISCV_64 +# else +# define Q_PROCESSOR_RISCV_32 +# endif +# define Q_BYTE_ORDER Q_LITTLE_ENDIAN + +/* S390 family, known variant: S390X (64-bit) S390 is big-endian. |