annotate gcc/config/s390/subst.md @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ;;- Machine description for GNU compiler -- S/390 / zSeries version.
kono
parents:
diff changeset
2 ;; Subst patterns.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
3 ;; Copyright (C) 2016-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
4 ;; Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com)
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 ;; This file is part of GCC.
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 ;; GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
9 ;; the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
10 ;; Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
11 ;; version.
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 ;; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
14 ;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
15 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
16 ;; for more details.
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 ;; You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
19 ;; along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
20 ;; <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 (define_code_iterator SUBST [rotate ashift lshiftrt ashiftrt])
kono
parents:
diff changeset
23 (define_mode_iterator DSI_VI [SI DI V2QI V4QI V8QI V16QI V2HI V4HI V8HI V2SI V4SI V2DI])
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 ; This adds an explicit CC reg set to an operation while keeping the
kono
parents:
diff changeset
26 ; set for the operation result as well.
kono
parents:
diff changeset
27 (define_subst "setcc_subst"
kono
parents:
diff changeset
28 [(set (match_operand:DSI 0 "" "")
kono
parents:
diff changeset
29 (match_operand:DSI 1 "" ""))
kono
parents:
diff changeset
30 (clobber (reg:CC CC_REGNUM))]
kono
parents:
diff changeset
31 "s390_match_ccmode(insn, CCSmode)"
kono
parents:
diff changeset
32 [(set (reg CC_REGNUM)
kono
parents:
diff changeset
33 (compare (match_dup 1) (const_int 0)))
kono
parents:
diff changeset
34 (set (match_dup 0) (match_dup 1))])
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 ; Use this in the insn name.
kono
parents:
diff changeset
37 (define_subst_attr "setcc" "setcc_subst" "" "_cc")
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 ; This adds an explicit CC reg set to an operation while dropping the
kono
parents:
diff changeset
40 ; result of the operation.
kono
parents:
diff changeset
41 (define_subst "cconly_subst"
kono
parents:
diff changeset
42 [(set (match_operand:DSI 0 "" "")
kono
parents:
diff changeset
43 (match_operand:DSI 1 "" ""))
kono
parents:
diff changeset
44 (clobber (reg:CC CC_REGNUM))]
kono
parents:
diff changeset
45 "s390_match_ccmode(insn, CCSmode)"
kono
parents:
diff changeset
46 [(set (reg CC_REGNUM)
kono
parents:
diff changeset
47 (compare (match_dup 1) (const_int 0)))
kono
parents:
diff changeset
48 (clobber (match_scratch:DSI 0 "=d,d"))])
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 (define_subst_attr "cconly" "cconly_subst" "" "_cconly")
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 ; Does transformations to switch between patterns unsing risbg +
kono
parents:
diff changeset
54 ; clobber CC (z10) and risbgn without clobber (zEC12).
kono
parents:
diff changeset
55 (define_subst "clobbercc_or_nocc_subst"
kono
parents:
diff changeset
56 [(set (match_operand 0 "" "") (match_operand 1 "" ""))]
kono
parents:
diff changeset
57 ""
kono
parents:
diff changeset
58 [(set (match_dup 0) (match_dup 1))
kono
parents:
diff changeset
59 (clobber (reg:CC CC_REGNUM))])
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 ; Use this in the insn name to add the target suffix.
kono
parents:
diff changeset
62 (define_subst_attr "clobbercc_or_nocc" "clobbercc_or_nocc_subst"
kono
parents:
diff changeset
63 "_nocc" "_clobbercc")
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65 ; Use this in the condition.
kono
parents:
diff changeset
66 (define_subst_attr "z10_or_zEC12_cond" "clobbercc_or_nocc_subst"
kono
parents:
diff changeset
67 "TARGET_ZEC12" "TARGET_Z10 && ! TARGET_ZEC12")
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 ; Use this instead of the risbg instruction.
kono
parents:
diff changeset
70 (define_subst_attr "risbg_n" "clobbercc_or_nocc_subst"
kono
parents:
diff changeset
71 "risbgn" "risbg")