diff options
author | Pan Li <pan2.li@intel.com> | 2023-06-09 15:44:57 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2023-06-09 16:13:27 +0800 |
commit | 7f4644f8c683b6a60462a5e10ab67a0598945c37 (patch) | |
tree | bfd3402e6483d3059483bbb58a3f04c106bdb0f0 /gcc | |
parent | 4cf6e322adc19f927859e0a5edfa93cec4b8c844 (diff) | |
download | gcc-7f4644f8c683b6a60462a5e10ab67a0598945c37.zip gcc-7f4644f8c683b6a60462a5e10ab67a0598945c37.tar.gz gcc-7f4644f8c683b6a60462a5e10ab67a0598945c37.tar.bz2 |
RISC-V: Fix one warning of frm enum.
This patch would like to fix one warning similar as below, and add the
link for where the values comes from.
./gcc/config/riscv/riscv-protos.h:260:13: warning: binary constants are
a C++14 feature or GCC extension
FRM_RNE = 0b000,
^~~~~
Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/ChangeLog:
* config/riscv/riscv-protos.h (enum frm_field_enum): Adjust
literal to int.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/riscv/riscv-protos.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/config/riscv/riscv-protos.h b/gcc/config/riscv/riscv-protos.h index 38e4125..66c1f53 100644 --- a/gcc/config/riscv/riscv-protos.h +++ b/gcc/config/riscv/riscv-protos.h @@ -254,15 +254,18 @@ enum vxrm_field_enum VXRM_RDN, VXRM_ROD }; -/* Rounding mode bitfield for floating point FRM. */ +/* Rounding mode bitfield for floating point FRM. The value of enum comes + from the below link. + https://github.com/riscv/riscv-isa-manual/blob/main/src/f-st-ext.adoc#floating-point-control-and-status-register + */ enum frm_field_enum { - FRM_RNE = 0b000, - FRM_RTZ = 0b001, - FRM_RDN = 0b010, - FRM_RUP = 0b011, - FRM_RMM = 0b100, - FRM_DYN = 0b111 + FRM_RNE = 0, /* Aka 0b000. */ + FRM_RTZ = 1, /* Aka 0b001. */ + FRM_RDN = 2, /* Aka 0b010. */ + FRM_RUP = 3, /* Aka 0b011. */ + FRM_RMM = 4, /* Aka 0b100. */ + FRM_DYN = 7, /* Aka 0b111. */ }; opt_machine_mode vectorize_related_mode (machine_mode, scalar_mode, |