diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-03 23:45:56 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-03 23:45:56 +0000 |
commit | fe644b69d013e77c7fc2db2a9863969d4f564561 (patch) | |
tree | a2cb1398bd46b8decaea84f1b7de8c7cd35e6046 /gcc/config/arm/crypto.md | |
parent | 90079d10dd355193fe289fa0bfcb0d7be880d45a (diff) | |
parent | 04e0495a6da35f3b0bcedbd75908cb6e9ba8ff8f (diff) | |
download | gcc-fe644b69d013e77c7fc2db2a9863969d4f564561.tar.gz |
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@206327 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/crypto.md')
-rw-r--r-- | gcc/config/arm/crypto.md | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/gcc/config/arm/crypto.md b/gcc/config/arm/crypto.md new file mode 100644 index 00000000000..9f249803d22 --- /dev/null +++ b/gcc/config/arm/crypto.md @@ -0,0 +1,86 @@ +;; ARMv8-A crypto patterns. +;; Copyright (C) 2013-2014 Free Software Foundation, Inc. +;; Contributed by ARM Ltd. + +;; This file is part of GCC. + +;; GCC is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published +;; by the Free Software Foundation; either version 3, or (at your +;; option) any later version. + +;; GCC is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GCC; see the file COPYING3. If not see +;; <http://www.gnu.org/licenses/>. + +(define_insn "crypto_<crypto_pattern>" + [(set (match_operand:<crypto_mode> 0 "register_operand" "=w") + (unspec:<crypto_mode> [(match_operand:<crypto_mode> 1 + "register_operand" "w")] + CRYPTO_UNARY))] + "TARGET_CRYPTO" + "<crypto_pattern>.<crypto_size_sfx>\\t%q0, %q1" + [(set_attr "type" "<crypto_type>")] +) + +(define_insn "crypto_<crypto_pattern>" + [(set (match_operand:<crypto_mode> 0 "register_operand" "=w") + (unspec:<crypto_mode> [(match_operand:<crypto_mode> 1 "register_operand" "0") + (match_operand:<crypto_mode> 2 "register_operand" "w")] + CRYPTO_BINARY))] + "TARGET_CRYPTO" + "<crypto_pattern>.<crypto_size_sfx>\\t%q0, %q2" + [(set_attr "type" "<crypto_type>")] +) + +(define_insn "crypto_<crypto_pattern>" + [(set (match_operand:<crypto_mode> 0 "register_operand" "=w") + (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))] + "TARGET_CRYPTO" + "<crypto_pattern>.<crypto_size_sfx>\\t%q0, %q2, %q3" + [(set_attr "type" "<crypto_type>")] +) + +(define_insn "crypto_sha1h" + [(set (match_operand:V4SI 0 "register_operand" "=w") + (zero_extend:V4SI + (unspec:SI [(vec_select:SI + (match_operand:V4SI 1 "register_operand" "w") + (parallel [(match_operand:SI 2 "immediate_operand" "i")]))] + UNSPEC_SHA1H)))] + "TARGET_CRYPTO" + "sha1h.32\\t%q0, %q1" + [(set_attr "type" "crypto_sha1_fast")] +) + +(define_insn "crypto_vmullp64" + [(set (match_operand:TI 0 "register_operand" "=w") + (unspec:TI [(match_operand:DI 1 "register_operand" "w") + (match_operand:DI 2 "register_operand" "w")] + UNSPEC_VMULLP64))] + "TARGET_CRYPTO" + "vmull.p64\\t%q0, %P1, %P2" + [(set_attr "type" "neon_mul_d_long")] +) + +(define_insn "crypto_<crypto_pattern>" + [(set (match_operand:V4SI 0 "register_operand" "=w") + (unspec:<crypto_mode> + [(match_operand:<crypto_mode> 1 "register_operand" "0") + (vec_select:SI + (match_operand:<crypto_mode> 2 "register_operand" "w") + (parallel [(match_operand:SI 4 "immediate_operand" "i")])) + (match_operand:<crypto_mode> 3 "register_operand" "w")] + CRYPTO_SELECTING))] + "TARGET_CRYPTO" + "<crypto_pattern>.<crypto_size_sfx>\\t%q0, %q2, %q3" + [(set_attr "type" "<crypto_type>")] +) |