Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
rename v* constraint to C*
Browse files Browse the repository at this point in the history
  • Loading branch information
linsinan1995 authored and sinan-lin committed May 18, 2021
1 parent 4b073d1 commit f149f17
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 78 deletions.
16 changes: 8 additions & 8 deletions gcc/config/riscv/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,32 +107,32 @@
(and (match_code "const_int")
(match_test "ival < (1 << 6) && ival >= 0")))

(define_constraint "v00"
(define_constraint "C00"
"Constant value 1"
(and (match_code "const_int")
(match_test "ival == 0")))

(define_constraint "v01"
(define_constraint "C01"
"Constant value 1"
(and (match_code "const_int")
(match_test "ival == 1")))

(define_constraint "v02"
(define_constraint "C02"
"Constant value 2"
(and (match_code "const_int")
(match_test "ival == 2")))

(define_constraint "v03"
(define_constraint "C03"
"Constant value 3"
(and (match_code "const_int")
(match_test "ival == 3")))

(define_constraint "v04"
(define_constraint "C04"
"Constant value 4"
(and (match_code "const_int")
(match_test "ival == 4")))

(define_constraint "v08"
(define_constraint "C08"
"Constant value 8"
(and (match_code "const_int")
(match_test "ival == 8")))
Expand All @@ -142,12 +142,12 @@
(and (match_code "const_int")
(match_test "(unsigned) exact_log2 (ival) <= 7")))

(define_constraint "v15"
(define_constraint "C15"
"Constant value 15"
(and (match_code "const_int")
(match_test "ival == 15")))

(define_constraint "v16"
(define_constraint "C16"
"Constant value 16"
(and (match_code "const_int")
(match_test "ival == 16")))
24 changes: 12 additions & 12 deletions gcc/config/riscv/predicates.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,10 @@

(define_predicate "imm_1_2_4_8_operand"
(and (match_operand 0 "const_int_operand")
(ior (ior (match_test "satisfies_constraint_v01 (op)")
(match_test "satisfies_constraint_v02 (op)"))
(ior (match_test "satisfies_constraint_v04 (op)")
(match_test "satisfies_constraint_v08 (op)")))))
(ior (ior (match_test "satisfies_constraint_C01 (op)")
(match_test "satisfies_constraint_C02 (op)"))
(ior (match_test "satisfies_constraint_C04 (op)")
(match_test "satisfies_constraint_C08 (op)")))))

(define_predicate "pwr_7_operand"
(and (match_code "const_int")
Expand All @@ -267,20 +267,20 @@

(define_predicate "imm_0_1_operand"
(and (match_operand 0 "const_int_operand")
(ior (match_test "satisfies_constraint_v00 (op)")
(match_test "satisfies_constraint_v01 (op)"))))
(ior (match_test "satisfies_constraint_C00 (op)")
(match_test "satisfies_constraint_C01 (op)"))))

(define_predicate "imm_1_2_operand"
(and (match_operand 0 "const_int_operand")
(ior (match_test "satisfies_constraint_v01 (op)")
(match_test "satisfies_constraint_v02 (op)"))))
(ior (match_test "satisfies_constraint_C01 (op)")
(match_test "satisfies_constraint_C02 (op)"))))

(define_predicate "imm_2_3_operand"
(and (match_operand 0 "const_int_operand")
(ior (match_test "satisfies_constraint_v02 (op)")
(match_test "satisfies_constraint_v03 (op)"))))
(ior (match_test "satisfies_constraint_C02 (op)")
(match_test "satisfies_constraint_C03 (op)"))))

(define_predicate "imm_15_16_operand"
(and (match_operand 0 "const_int_operand")
(ior (match_test "satisfies_constraint_v15 (op)")
(match_test "satisfies_constraint_v16 (op)"))))
(ior (match_test "satisfies_constraint_C15 (op)")
(match_test "satisfies_constraint_C16 (op)"))))
Loading

0 comments on commit f149f17

Please sign in to comment.