diff options
Diffstat (limited to 'gcc/config/riscv/iterators.md')
-rw-r--r-- | gcc/config/riscv/iterators.md | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/gcc/config/riscv/iterators.md b/gcc/config/riscv/iterators.md index a7694137685..8a9d1986b4a 100644 --- a/gcc/config/riscv/iterators.md +++ b/gcc/config/riscv/iterators.md @@ -75,6 +75,8 @@ ;; Iterator for floating-point modes that can be loaded into X registers. (define_mode_iterator SOFTF [SF (DF "TARGET_64BIT") (HF "TARGET_ZFHMIN")]) +;; Iterator for floating-point modes of BF16 +(define_mode_iterator HFBF [HF BF]) ;; ------------------------------------------------------------------- ;; Mode attributes @@ -148,6 +150,14 @@ ;; to use the same template. (define_code_iterator any_extend [sign_extend zero_extend]) +;; These code iterators allow unsigned and signed extraction to be generated +;; from the same template. +(define_code_iterator any_extract [sign_extract zero_extract]) +(define_code_attr extract_sidi_shift [(sign_extract "sraiw") + (zero_extract "srliw")]) +(define_code_attr extract_shift [(sign_extract "ashiftrt") + (zero_extract "lshiftrt")]) + ;; This code iterator allows the two right shift instructions to be ;; generated from the same template. (define_code_iterator any_shiftrt [ashiftrt lshiftrt]) @@ -196,6 +206,13 @@ (define_code_iterator bitmanip_rotate [rotate rotatert]) +;; These code iterators allow the signed and unsigned fix operations to use +;; the same template. +(define_code_iterator fix_ops [fix unsigned_fix]) + +(define_code_attr fix_uns [(fix "fix") (unsigned_fix "fixuns")]) + + ;; ------------------------------------------------------------------- ;; Code Attributes ;; ------------------------------------------------------------------- @@ -246,6 +263,8 @@ (us_minus "ussub") (sign_extend "extend") (zero_extend "zero_extend") + (sign_extract "extract") + (zero_extract "zero_extract") (fix "fix_trunc") (unsigned_fix "fixuns_trunc")]) @@ -312,11 +331,6 @@ ;; Int Iterators. ;; ------------------------------------------------------------------- -;; Iterator and attributes for floating-point rounding instructions. -(define_int_iterator RINT [UNSPEC_LRINT UNSPEC_LROUND]) -(define_int_attr rint_pattern [(UNSPEC_LRINT "rint") (UNSPEC_LROUND "round")]) -(define_int_attr rint_rm [(UNSPEC_LRINT "dyn") (UNSPEC_LROUND "rmm")]) - ;; Iterator and attributes for quiet comparisons. (define_int_iterator QUIET_COMPARISON [UNSPEC_FLT_QUIET UNSPEC_FLE_QUIET]) (define_int_attr quiet_pattern [(UNSPEC_FLT_QUIET "lt") (UNSPEC_FLE_QUIET "le")]) |