diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h index 5605a1f7ddcf..72b6ed18f421 100644 --- a/gcc/config/riscv/riscv.h +++ b/gcc/config/riscv/riscv.h @@ -115,7 +115,7 @@ along with GCC; see the file COPYING3. If not see #define FLOAT_TYPE_SIZE 32 #define DOUBLE_TYPE_SIZE 64 -#define LONG_DOUBLE_TYPE_SIZE 128 +#define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_64 ? 64 : 128) /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY BITS_PER_WORD diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt index cfd0335d082c..97e4f80181cf 100644 --- a/gcc/config/riscv/riscv.opt +++ b/gcc/config/riscv/riscv.opt @@ -88,6 +88,14 @@ mstrict-align Target Report Mask(STRICT_ALIGN) Save Do not generate unaligned memory accesses. +mlong-double-64 +Target Report RejectNegative Mask(LONG_DOUBLE_64) +Use 64-bit long double. + +mlong-double-128 +Target Report RejectNegative InverseMask(LONG_DOUBLE_64) +Use 128-bit long double. + Enum Name(code_model) Type(enum riscv_code_model) Known code models (for use with the -mcmodel= option):