arm: Consistently use crypto_mode attribute in crypto patterns
A couple of patterns in the crypto support code were hard-coding the mode rather than using the iterators. While not incorrect, it was slightly confusing, so adapt those patterns to the style of the rest of the file. Also fix some white space issues. gcc/ChangeLog: * config/arm/crypto.md (crypto_<CYRPTO_AES:crypto_pattern>): Use <crypto_mode> rather than hard-coding the mode. (crypto_<CRYPTO_AESMC:crypto_pattern>): Fix white space. (crypto_<CRYPTO_AES:crypto_pattern>): Likewise. (*aarch32_crypto_aese_fused): Likewise. (*aarch32_crypto_aesd_fused): Likewise. (crypto_<CRYPTO_BINARY:crypto_pattern>): Likewise. (crypto_<CRYPTO_TERNARY:crypto_pattern>): Likewise. (crypto_sha1h_lb): Likewise. (crypto_vmullp64): Likewise. (crypto_<CRYPTO_SELECTING:crypto_pattern>): Likewise. (crypto_<CRYPTO_SELECTING:crypto_pattern>_lb): Likewise.
This commit is contained in:
parent
0042ca7b77
commit
c471ee0f05
@ -30,11 +30,11 @@
|
||||
)
|
||||
|
||||
(define_insn "crypto_<CRYPTO_AES:crypto_pattern>"
|
||||
[(set (match_operand:V16QI 0 "register_operand" "=w")
|
||||
(unspec:V16QI
|
||||
[(xor:V16QI
|
||||
(match_operand:V16QI 1 "register_operand" "%0")
|
||||
(match_operand:V16QI 2 "register_operand" "w"))]
|
||||
[(set (match_operand:<crypto_mode> 0 "register_operand" "=w")
|
||||
(unspec:<crypto_mode>
|
||||
[(xor:<crypto_mode>
|
||||
(match_operand:<crypto_mode> 1 "register_operand" "%0")
|
||||
(match_operand:<crypto_mode> 2 "register_operand" "w"))]
|
||||
CRYPTO_AES))]
|
||||
"TARGET_CRYPTO"
|
||||
"<crypto_pattern>.<crypto_size_sfx>\\t%q0, %q2"
|
||||
@ -49,8 +49,7 @@
|
||||
(define_insn "*aarch32_crypto_aese_fused"
|
||||
[(set (match_operand:V16QI 0 "register_operand" "=w")
|
||||
(unspec:V16QI
|
||||
[(unspec:V16QI
|
||||
[(xor:V16QI
|
||||
[(unspec:V16QI [(xor:V16QI
|
||||
(match_operand:V16QI 1 "register_operand" "%0")
|
||||
(match_operand:V16QI 2 "register_operand" "w"))]
|
||||
UNSPEC_AESE)]
|
||||
@ -70,8 +69,7 @@
|
||||
(define_insn "*aarch32_crypto_aesd_fused"
|
||||
[(set (match_operand:V16QI 0 "register_operand" "=w")
|
||||
(unspec:V16QI
|
||||
[(unspec:V16QI
|
||||
[(xor:V16QI
|
||||
[(unspec:V16QI [(xor:V16QI
|
||||
(match_operand:V16QI 1 "register_operand" "%0")
|
||||
(match_operand:V16QI 2 "register_operand" "w"))]
|
||||
UNSPEC_AESD)]
|
||||
@ -96,7 +94,8 @@
|
||||
|
||||
(define_insn "crypto_<CRYPTO_TERNARY:crypto_pattern>"
|
||||
[(set (match_operand:<crypto_mode> 0 "register_operand" "=w")
|
||||
(unspec:<crypto_mode> [(match_operand:<crypto_mode> 1 "register_operand" "0")
|
||||
(unspec:<crypto_mode>
|
||||
[(match_operand:<crypto_mode> 1 "register_operand" "0")
|
||||
(match_operand:<crypto_mode> 2 "register_operand" "w")
|
||||
(match_operand:<crypto_mode> 3 "register_operand" "w")]
|
||||
CRYPTO_TERNARY))]
|
||||
@ -105,9 +104,10 @@
|
||||
[(set_attr "type" "<crypto_type>")]
|
||||
)
|
||||
|
||||
/* The vec_select operation always selects index 0 from the lower V2SI subreg
|
||||
of the V4SI, adjusted for endianness. Required due to neon_vget_lane and
|
||||
neon_set_lane that change the element ordering in memory for big-endian. */
|
||||
;; The vec_select operation always selects index 0 from the lower V2SI
|
||||
;; subreg of the V4SI, adjusted for endianness. Required due to
|
||||
;; neon_vget_lane and neon_set_lane that change the element ordering
|
||||
;; in memory for big-endian.
|
||||
|
||||
(define_expand "crypto_sha1h"
|
||||
[(set (match_operand:V4SI 0 "register_operand")
|
||||
|
Loading…
Reference in New Issue
Block a user