From ac37b9e58f592a29b6b409d5c03ace5f4ad8374b Mon Sep 17 00:00:00 2001 From: wilson Date: Wed, 3 Oct 2018 19:09:32 +0000 Subject: [PATCH] RISC-V: Add macro for ilp32e ABI. Cleanup white space. gcc/ * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E, also define __riscv_abi_rve. Delete trailing white space. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264821 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/riscv/riscv-c.c | 27 +++++++++++++++------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6bec9842ae8..8e7cb548c15 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-10-03 Jim Wilson + + * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E, + also define __riscv_abi_rve. Delete trailing white space. + 2018-10-03 Paul Koning Enable LRA register allocator for PDP11. diff --git a/gcc/config/riscv/riscv-c.c b/gcc/config/riscv/riscv-c.c index 513f974d9aa..d3ecd0796e8 100644 --- a/gcc/config/riscv/riscv-c.c +++ b/gcc/config/riscv/riscv-c.c @@ -35,62 +35,65 @@ void riscv_cpu_cpp_builtins (cpp_reader *pfile) { builtin_define ("__riscv"); - + if (TARGET_RVC) builtin_define ("__riscv_compressed"); - + if (TARGET_RVE) builtin_define ("__riscv_32e"); if (TARGET_ATOMIC) builtin_define ("__riscv_atomic"); - + if (TARGET_MUL) builtin_define ("__riscv_mul"); if (TARGET_DIV) builtin_define ("__riscv_div"); if (TARGET_DIV && TARGET_MUL) builtin_define ("__riscv_muldiv"); - + builtin_define_with_int_value ("__riscv_xlen", UNITS_PER_WORD * 8); if (TARGET_HARD_FLOAT) builtin_define_with_int_value ("__riscv_flen", UNITS_PER_FP_REG * 8); - + if (TARGET_HARD_FLOAT && TARGET_FDIV) { builtin_define ("__riscv_fdiv"); builtin_define ("__riscv_fsqrt"); } - + switch (riscv_abi) { - case ABI_ILP32: case ABI_ILP32E: + builtin_define ("__riscv_abi_rve"); + gcc_fallthrough (); + + case ABI_ILP32: case ABI_LP64: builtin_define ("__riscv_float_abi_soft"); break; - + case ABI_ILP32F: case ABI_LP64F: builtin_define ("__riscv_float_abi_single"); break; - + case ABI_ILP32D: case ABI_LP64D: builtin_define ("__riscv_float_abi_double"); break; } - + switch (riscv_cmodel) { case CM_MEDLOW: builtin_define ("__riscv_cmodel_medlow"); break; - + case CM_MEDANY: builtin_define ("__riscv_cmodel_medany"); break; - + case CM_PIC: builtin_define ("__riscv_cmodel_pic"); break; -- 2.11.4.GIT