Skip to content

Commit

Permalink
Rename bitmanip constraints
Browse files Browse the repository at this point in the history
Files Changed:

 * constraints.md: Change contraint names.
 * corev.md: Likewise.
  • Loading branch information
Mary Bennett committed Nov 2, 2023
1 parent 4a6bad0 commit b14af4e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
7 changes: 1 addition & 6 deletions gcc/config/riscv/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,11 @@
(and (match_test "IN_RANGE (ival, 0, 1073741823)")
(match_test "exact_log2 (ival + 1) != -1"))))

(define_constraint "M"
(define_constraint "MVs10"
"A 10-bit unsigned immediate for CORE-V bitmanip."
(and (match_code "const_int")
(match_test "IN_RANGE (ival, 0, 1023)")))

(define_constraint "N"
"A 2-bit unsigned immediate for CORE-V bitmanip."
(and (match_code "const_int")
(match_test "IN_RANGE (ival, 0, 3)")))

(define_constraint "CVs6"
"A 6-bit signed immediate for SIMD."
(and (match_code "const_int")
Expand Down
12 changes: 6 additions & 6 deletions gcc/config/riscv/corev.md
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@
(define_expand "riscv_cv_bitmanip_extract"
[(set (match_operand:SI 0 "register_operand" "=r,r")
(unspec:SI [(match_operand:SI 1 "register_operand" "r,r")
(match_operand:HI 2 "bit_extract_operand" "M,r")]
(match_operand:HI 2 "bit_extract_operand" "MVs10,r")]
UNSPEC_CV_BITMANIP_EXTRACT))]

"TARGET_XCVBITMANIP && !TARGET_64BIT"
Expand Down Expand Up @@ -972,7 +972,7 @@
(define_expand "riscv_cv_bitmanip_extractu"
[(set (match_operand:SI 0 "register_operand" "=r,r")
(unspec:SI [(match_operand:SI 1 "register_operand" "r,r")
(match_operand:HI 2 "bit_extract_operand" "M,r")]
(match_operand:HI 2 "bit_extract_operand" "MVs10,r")]
UNSPEC_CV_BITMANIP_EXTRACTU))]

"TARGET_XCVBITMANIP && !TARGET_64BIT"
Expand Down Expand Up @@ -1024,7 +1024,7 @@
(define_expand "riscv_cv_bitmanip_insert"
[(set (match_operand:SI 0 "register_operand" "=r,r")
(unspec:SI [(match_operand:SI 1 "register_operand" "r,r")
(match_operand:HI 2 "bit_extract_operand" "M,r")
(match_operand:HI 2 "bit_extract_operand" "MVs10,r")
(match_operand:SI 3 "register_operand" "0,0")]
UNSPEC_CV_BITMANIP_INSERT))]

Expand Down Expand Up @@ -1077,7 +1077,7 @@
(define_expand "riscv_cv_bitmanip_bclr"
[(set (match_operand:SI 0 "register_operand" "=r,r")
(unspec:SI [(match_operand:SI 1 "register_operand" "r,r")
(match_operand:HI 2 "bit_extract_operand" "M,r")]
(match_operand:HI 2 "bit_extract_operand" "MVs10,r")]
UNSPEC_CV_BITMANIP_BCLR))]

"TARGET_XCVBITMANIP && !TARGET_64BIT"
Expand Down Expand Up @@ -1127,7 +1127,7 @@
(define_expand "riscv_cv_bitmanip_bset"
[(set (match_operand:SI 0 "register_operand" "=r,r")
(unspec:SI [(match_operand:SI 1 "register_operand" "r,r")
(match_operand:HI 2 "bit_extract_operand" "M,r")]
(match_operand:HI 2 "bit_extract_operand" "MVs10,r")]
UNSPEC_CV_BITMANIP_BSET))]

"TARGET_XCVBITMANIP && !TARGET_64BIT"
Expand Down Expand Up @@ -1207,7 +1207,7 @@
[(set (match_operand:SI 0 "register_operand" "=r")
(unspec:SI [(match_operand:SI 1 "register_operand" "r")
(match_operand:QI 2 "const_csr_operand" "K")
(match_operand:QI 3 "const_int2_operand" "N")]
(match_operand:QI 3 "const_int2_operand" "D03")]
UNSPEC_CV_BITMANIP_BITREV))]

"TARGET_XCVBITMANIP && !TARGET_64BIT"
Expand Down

0 comments on commit b14af4e

Please sign in to comment.