Re: [Predef-contribute] RISC-V architecture defines
Brought to you by:
breese,
tahonermann
|
From: Alibek O. <a1b...@gm...> - 2021-09-04 21:02:41
|
Hi Aaron! predef wiki is stalled but it's legacy lives in my fork, hosted at GitHub: https://github.com/a1batross/predef On RISC-V: I've added info about it in this commit: https://github.com/a1batross/predef/commit/10559927c79894c8550bf1d5003ba6a551f338c9 Though I didn't added every macro as I found official toolchain convention, which at this moment seems to be followed by every compiler vendor. So instead I just linked it. Thanks for your help, Alibek Omarov. пн, 30 авг. 2021 г. в 14:23, Aaron Franke via Predef-contribute < pre...@li...>: > Hello, > > For this page which lists architecture defines: > https://sourceforge.net/p/predef/wiki/Architectures/ > > The page is missing defines for RISC-V. Here they are. These are pulled > from GCC 9.3 and Clang 10.0 on a 64-bit RISC-V virtual machine > (architecture rv64gc). > > GCC: > #define __riscv 1 > #define __riscv_atomic 1UL > #define __riscv_cmodel_pic 1 > #define __riscv_compressed 1 > #define __riscv_div 1 > #define __riscv_fdiv 1 > #define __riscv_flen 64 > #define __riscv_float_abi_double 1 > #define __riscv_fsqrt 1 > #define __riscv_mul 1 > #define __riscv_muldiv 1 > #define __riscv_xlen 64 > > Clang/LLVM: > #define __riscv 1 > #define __riscv_atomic 1 > #define __riscv_cmodel_medlow 1 > #define __riscv_compressed 1 > #define __riscv_div 1 > #define __riscv_fdiv 1 > #define __riscv_flen 64 > #define __riscv_float_abi_double 1 > #define __riscv_fsqrt 1 > #define __riscv_mul 1 > #define __riscv_muldiv 1 > #define __riscv_xlen 64 > > These are defined on both (ignoring the difference for atomic of "1UL" > for GCC and "1" for Clang/LLVM). > #define __riscv 1 > #define __riscv_atomic 1 > #define __riscv_compressed 1 > #define __riscv_div 1 > #define __riscv_fdiv 1 > #define __riscv_flen 64 > #define __riscv_float_abi_double 1 > #define __riscv_fsqrt 1 > #define __riscv_mul 1 > #define __riscv_muldiv 1 > #define __riscv_xlen 64 > > This is unique to GCC: > #define __riscv_cmodel_pic 1 > > This is unique to Clang/LLVM: > #define __riscv_cmodel_medlow 1 > > Please add this information to your list. > > Thanks, > > Aaron Franke > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > Predef-contribute mailing list > Pre...@li... > https://lists.sourceforge.net/lists/listinfo/predef-contribute > |