Commit 119b4963 by Jim Wilson Committed by Jim Wilson

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.

From-SVN: r264821
parent 5079ff15
2018-10-03 Jim Wilson <jimw@sifive.com>
* 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 <ni1d@arrl.net> 2018-10-03 Paul Koning <ni1d@arrl.net>
Enable LRA register allocator for PDP11. Enable LRA register allocator for PDP11.
...@@ -35,62 +35,65 @@ void ...@@ -35,62 +35,65 @@ void
riscv_cpu_cpp_builtins (cpp_reader *pfile) riscv_cpu_cpp_builtins (cpp_reader *pfile)
{ {
builtin_define ("__riscv"); builtin_define ("__riscv");
if (TARGET_RVC) if (TARGET_RVC)
builtin_define ("__riscv_compressed"); builtin_define ("__riscv_compressed");
if (TARGET_RVE) if (TARGET_RVE)
builtin_define ("__riscv_32e"); builtin_define ("__riscv_32e");
if (TARGET_ATOMIC) if (TARGET_ATOMIC)
builtin_define ("__riscv_atomic"); builtin_define ("__riscv_atomic");
if (TARGET_MUL) if (TARGET_MUL)
builtin_define ("__riscv_mul"); builtin_define ("__riscv_mul");
if (TARGET_DIV) if (TARGET_DIV)
builtin_define ("__riscv_div"); builtin_define ("__riscv_div");
if (TARGET_DIV && TARGET_MUL) if (TARGET_DIV && TARGET_MUL)
builtin_define ("__riscv_muldiv"); builtin_define ("__riscv_muldiv");
builtin_define_with_int_value ("__riscv_xlen", UNITS_PER_WORD * 8); builtin_define_with_int_value ("__riscv_xlen", UNITS_PER_WORD * 8);
if (TARGET_HARD_FLOAT) if (TARGET_HARD_FLOAT)
builtin_define_with_int_value ("__riscv_flen", UNITS_PER_FP_REG * 8); builtin_define_with_int_value ("__riscv_flen", UNITS_PER_FP_REG * 8);
if (TARGET_HARD_FLOAT && TARGET_FDIV) if (TARGET_HARD_FLOAT && TARGET_FDIV)
{ {
builtin_define ("__riscv_fdiv"); builtin_define ("__riscv_fdiv");
builtin_define ("__riscv_fsqrt"); builtin_define ("__riscv_fsqrt");
} }
switch (riscv_abi) switch (riscv_abi)
{ {
case ABI_ILP32:
case ABI_ILP32E: case ABI_ILP32E:
builtin_define ("__riscv_abi_rve");
gcc_fallthrough ();
case ABI_ILP32:
case ABI_LP64: case ABI_LP64:
builtin_define ("__riscv_float_abi_soft"); builtin_define ("__riscv_float_abi_soft");
break; break;
case ABI_ILP32F: case ABI_ILP32F:
case ABI_LP64F: case ABI_LP64F:
builtin_define ("__riscv_float_abi_single"); builtin_define ("__riscv_float_abi_single");
break; break;
case ABI_ILP32D: case ABI_ILP32D:
case ABI_LP64D: case ABI_LP64D:
builtin_define ("__riscv_float_abi_double"); builtin_define ("__riscv_float_abi_double");
break; break;
} }
switch (riscv_cmodel) switch (riscv_cmodel)
{ {
case CM_MEDLOW: case CM_MEDLOW:
builtin_define ("__riscv_cmodel_medlow"); builtin_define ("__riscv_cmodel_medlow");
break; break;
case CM_MEDANY: case CM_MEDANY:
builtin_define ("__riscv_cmodel_medany"); builtin_define ("__riscv_cmodel_medany");
break; break;
case CM_PIC: case CM_PIC:
builtin_define ("__riscv_cmodel_pic"); builtin_define ("__riscv_cmodel_pic");
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment