RISC-V: Refactor riscv mode after for VXRM and FRM
commit880676d603979852f30b76b1e2a3532b95f08048
authorPan Li <pan2.li@intel.com>
Wed, 12 Jul 2023 05:38:42 +0000 (12 13:38 +0800)
committerPan Li <pan2.li@intel.com>
Thu, 13 Jul 2023 10:34:40 +0000 (13 18:34 +0800)
tree8d0a4c5aff03035c5a4b3f502f5596f7104dda93
parent43fefc1f832a80370ea142273ebc1a76005c68a0
RISC-V: Refactor riscv mode after for VXRM and FRM

When investigate the FRM dynmaic rounding mode, we find the global
unknown status is quite different between the fixed-point and
floating-point. Thus, we separate the unknown function with extracting
some inner common functions.

We will also prepare more test cases in another PATCH.

Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/ChangeLog:

* config/riscv/riscv.cc (vxrm_rtx): New static var.
(frm_rtx): Ditto.
(global_state_unknown_p): Removed.
(riscv_entity_mode_after): Removed.
(asm_insn_p): New function.
(vxrm_unknown_p): New function for fixed-point.
(riscv_vxrm_mode_after): Ditto.
(frm_unknown_dynamic_p): New function for floating-point.
(riscv_frm_mode_after): Ditto.
(riscv_mode_after): Leverage new functions.
gcc/config/riscv/riscv.cc