annotate gcc/config/rs6000/dfp.md @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 ;; Decimal Floating Point (DFP) patterns.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 ;; Copyright (C) 2007-2018 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 ;; Contributed by Ben Elliston (bje@au.ibm.com) and Peter Bergner
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 ;; (bergner@vnet.ibm.com).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 ;; This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 ;; GCC is free software; you can redistribute it and/or modify it
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 ;; under the terms of the GNU General Public License as published
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 ;; by the Free Software Foundation; either version 3, or (at your
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 ;; option) any later version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 ;; License for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 ;; You should have received a copy of the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 ;; along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 ;; <http://www.gnu.org/licenses/>.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 ;;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 ;; UNSPEC usage
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 ;;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
111
kono
parents: 63
diff changeset
26 (define_c_enum "unspec"
kono
parents: 63
diff changeset
27 [UNSPEC_MOVSD_LOAD
kono
parents: 63
diff changeset
28 UNSPEC_MOVSD_STORE
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 ])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 (define_insn "movsd_store"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 [(set (match_operand:DD 0 "nonimmediate_operand" "=m")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
34 (unspec:DD [(match_operand:SD 1 "input_operand" "d")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 UNSPEC_MOVSD_STORE))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 "(gpc_reg_operand (operands[0], DDmode)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 || gpc_reg_operand (operands[1], SDmode))
111
kono
parents: 63
diff changeset
38 && TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 "stfd%U0%X0 %1,%0"
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
40 [(set_attr "type" "fpstore")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 (define_insn "movsd_load"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 [(set (match_operand:SD 0 "nonimmediate_operand" "=f")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 (unspec:SD [(match_operand:DD 1 "input_operand" "m")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 UNSPEC_MOVSD_LOAD))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 "(gpc_reg_operand (operands[0], SDmode)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 || gpc_reg_operand (operands[1], DDmode))
111
kono
parents: 63
diff changeset
48 && TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 "lfd%U1%X1 %0,%1"
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
50 [(set_attr "type" "fpload")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 ;; Hardware support for decimal floating point operations.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 (define_insn "extendsddd2"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
55 [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 (float_extend:DD (match_operand:SD 1 "gpc_reg_operand" "f")))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 "dctdp %0,%1"
111
kono
parents: 63
diff changeset
59 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 (define_expand "extendsdtd2"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
62 [(set (match_operand:TD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
63 (float_extend:TD (match_operand:SD 1 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 rtx tmp = gen_reg_rtx (DDmode);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 emit_insn (gen_extendsddd2 (tmp, operands[1]));
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 emit_insn (gen_extendddtd2 (operands[0], tmp));
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 DONE;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 })
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 (define_insn "truncddsd2"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 [(set (match_operand:SD 0 "gpc_reg_operand" "=f")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
74 (float_truncate:SD (match_operand:DD 1 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 "drsp %0,%1"
111
kono
parents: 63
diff changeset
77 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78
111
kono
parents: 63
diff changeset
79 (define_insn "negdd2"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
80 [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
81 (neg:DD (match_operand:DD 1 "gpc_reg_operand" "d")))]
111
kono
parents: 63
diff changeset
82 "TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 "fneg %0,%1"
111
kono
parents: 63
diff changeset
84 [(set_attr "type" "fpsimple")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85
111
kono
parents: 63
diff changeset
86 (define_insn "absdd2"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
87 [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
88 (abs:DD (match_operand:DD 1 "gpc_reg_operand" "d")))]
111
kono
parents: 63
diff changeset
89 "TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 "fabs %0,%1"
111
kono
parents: 63
diff changeset
91 [(set_attr "type" "fpsimple")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 (define_insn "*nabsdd2_fpr"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
94 [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
95 (neg:DD (abs:DD (match_operand:DD 1 "gpc_reg_operand" "d"))))]
111
kono
parents: 63
diff changeset
96 "TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 "fnabs %0,%1"
111
kono
parents: 63
diff changeset
98 [(set_attr "type" "fpsimple")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99
111
kono
parents: 63
diff changeset
100 (define_insn "negtd2"
kono
parents: 63
diff changeset
101 [(set (match_operand:TD 0 "gpc_reg_operand" "=d,d")
kono
parents: 63
diff changeset
102 (neg:TD (match_operand:TD 1 "gpc_reg_operand" "0,d")))]
kono
parents: 63
diff changeset
103 "TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 "@
111
kono
parents: 63
diff changeset
105 fneg %0,%1
kono
parents: 63
diff changeset
106 fneg %0,%1\;fmr %L0,%L1"
kono
parents: 63
diff changeset
107 [(set_attr "type" "fpsimple")
kono
parents: 63
diff changeset
108 (set_attr "length" "4,8")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109
111
kono
parents: 63
diff changeset
110 (define_insn "abstd2"
kono
parents: 63
diff changeset
111 [(set (match_operand:TD 0 "gpc_reg_operand" "=d,d")
kono
parents: 63
diff changeset
112 (abs:TD (match_operand:TD 1 "gpc_reg_operand" "0,d")))]
kono
parents: 63
diff changeset
113 "TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 "@
111
kono
parents: 63
diff changeset
115 fabs %0,%1
kono
parents: 63
diff changeset
116 fabs %0,%1\;fmr %L0,%L1"
kono
parents: 63
diff changeset
117 [(set_attr "type" "fpsimple")
kono
parents: 63
diff changeset
118 (set_attr "length" "4,8")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 (define_insn "*nabstd2_fpr"
111
kono
parents: 63
diff changeset
121 [(set (match_operand:TD 0 "gpc_reg_operand" "=d,d")
kono
parents: 63
diff changeset
122 (neg:TD (abs:TD (match_operand:TD 1 "gpc_reg_operand" "0,d"))))]
kono
parents: 63
diff changeset
123 "TARGET_HARD_FLOAT"
kono
parents: 63
diff changeset
124 "@
kono
parents: 63
diff changeset
125 fnabs %0,%1
kono
parents: 63
diff changeset
126 fnabs %0,%1\;fmr %L0,%L1"
kono
parents: 63
diff changeset
127 [(set_attr "type" "fpsimple")
kono
parents: 63
diff changeset
128 (set_attr "length" "4,8")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 ;; Hardware support for decimal floating point operations.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 (define_insn "extendddtd2"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
133 [(set (match_operand:TD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
134 (float_extend:TD (match_operand:DD 1 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 "dctqpq %0,%1"
111
kono
parents: 63
diff changeset
137 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
138
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 ;; The result of drdpq is an even/odd register pair with the converted
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 ;; value in the even register and zero in the odd register.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 ;; FIXME: Avoid the register move by using a reload constraint to ensure
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 ;; that the result is the first of the pair receiving the result of drdpq.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
143
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 (define_insn "trunctddd2"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
145 [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
146 (float_truncate:DD (match_operand:TD 1 "gpc_reg_operand" "d")))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
147 (clobber (match_scratch:TD 2 "=d"))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 "drdpq %2,%1\;fmr %0,%2"
111
kono
parents: 63
diff changeset
150 [(set_attr "type" "dfp")
kono
parents: 63
diff changeset
151 (set_attr "length" "8")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
152
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 (define_insn "adddd3"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
154 [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
155 (plus:DD (match_operand:DD 1 "gpc_reg_operand" "%d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
156 (match_operand:DD 2 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 "dadd %0,%1,%2"
111
kono
parents: 63
diff changeset
159 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 (define_insn "addtd3"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
162 [(set (match_operand:TD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
163 (plus:TD (match_operand:TD 1 "gpc_reg_operand" "%d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
164 (match_operand:TD 2 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 "daddq %0,%1,%2"
111
kono
parents: 63
diff changeset
167 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
168
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 (define_insn "subdd3"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
170 [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
171 (minus:DD (match_operand:DD 1 "gpc_reg_operand" "d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
172 (match_operand:DD 2 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 "dsub %0,%1,%2"
111
kono
parents: 63
diff changeset
175 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
176
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 (define_insn "subtd3"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
178 [(set (match_operand:TD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
179 (minus:TD (match_operand:TD 1 "gpc_reg_operand" "d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
180 (match_operand:TD 2 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
182 "dsubq %0,%1,%2"
111
kono
parents: 63
diff changeset
183 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 (define_insn "muldd3"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
186 [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
187 (mult:DD (match_operand:DD 1 "gpc_reg_operand" "%d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
188 (match_operand:DD 2 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 "dmul %0,%1,%2"
111
kono
parents: 63
diff changeset
191 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
192
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 (define_insn "multd3"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
194 [(set (match_operand:TD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
195 (mult:TD (match_operand:TD 1 "gpc_reg_operand" "%d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
196 (match_operand:TD 2 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 "dmulq %0,%1,%2"
111
kono
parents: 63
diff changeset
199 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 (define_insn "divdd3"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
202 [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
203 (div:DD (match_operand:DD 1 "gpc_reg_operand" "d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
204 (match_operand:DD 2 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 "ddiv %0,%1,%2"
111
kono
parents: 63
diff changeset
207 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 (define_insn "divtd3"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
210 [(set (match_operand:TD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
211 (div:TD (match_operand:TD 1 "gpc_reg_operand" "d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
212 (match_operand:TD 2 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 "ddivq %0,%1,%2"
111
kono
parents: 63
diff changeset
215 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
216
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 (define_insn "*cmpdd_internal1"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 [(set (match_operand:CCFP 0 "cc_reg_operand" "=y")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
219 (compare:CCFP (match_operand:DD 1 "gpc_reg_operand" "d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
220 (match_operand:DD 2 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 "dcmpu %0,%1,%2"
111
kono
parents: 63
diff changeset
223 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
224
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 (define_insn "*cmptd_internal1"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 [(set (match_operand:CCFP 0 "cc_reg_operand" "=y")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
227 (compare:CCFP (match_operand:TD 1 "gpc_reg_operand" "d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
228 (match_operand:TD 2 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 "dcmpuq %0,%1,%2"
111
kono
parents: 63
diff changeset
231 [(set_attr "type" "dfp")])
kono
parents: 63
diff changeset
232
kono
parents: 63
diff changeset
233 (define_insn "floatdidd2"
kono
parents: 63
diff changeset
234 [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
kono
parents: 63
diff changeset
235 (float:DD (match_operand:DI 1 "gpc_reg_operand" "d")))]
kono
parents: 63
diff changeset
236 "TARGET_DFP && TARGET_POPCNTD"
kono
parents: 63
diff changeset
237 "dcffix %0,%1"
kono
parents: 63
diff changeset
238 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
239
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 (define_insn "floatditd2"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
241 [(set (match_operand:TD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
242 (float:TD (match_operand:DI 1 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 "dcffixq %0,%1"
111
kono
parents: 63
diff changeset
245 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
246
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 ;; Convert a decimal64 to a decimal64 whose value is an integer.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 ;; This is the first stage of converting it to an integer type.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
249
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 (define_insn "ftruncdd2"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
251 [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
252 (fix:DD (match_operand:DD 1 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 "drintn. 0,%0,%1,1"
111
kono
parents: 63
diff changeset
255 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
256
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
257 ;; Convert a decimal64 whose value is an integer to an actual integer.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
258 ;; This is the second stage of converting decimal float to integer type.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
259
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
260 (define_insn "fixdddi2"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
261 [(set (match_operand:DI 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
262 (fix:DI (match_operand:DD 1 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
263 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
264 "dctfix %0,%1"
111
kono
parents: 63
diff changeset
265 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
266
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
267 ;; Convert a decimal128 to a decimal128 whose value is an integer.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 ;; This is the first stage of converting it to an integer type.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
269
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
270 (define_insn "ftrunctd2"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
271 [(set (match_operand:TD 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
272 (fix:TD (match_operand:TD 1 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
274 "drintnq. 0,%0,%1,1"
111
kono
parents: 63
diff changeset
275 [(set_attr "type" "dfp")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
276
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
277 ;; Convert a decimal128 whose value is an integer to an actual integer.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 ;; This is the second stage of converting decimal float to integer type.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
279
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
280 (define_insn "fixtddi2"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
281 [(set (match_operand:DI 0 "gpc_reg_operand" "=d")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
282 (fix:DI (match_operand:TD 1 "gpc_reg_operand" "d")))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 "TARGET_DFP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 "dctfixq %0,%1"
111
kono
parents: 63
diff changeset
285 [(set_attr "type" "dfp")])
kono
parents: 63
diff changeset
286
kono
parents: 63
diff changeset
287
kono
parents: 63
diff changeset
288 ;; Decimal builtin support
kono
parents: 63
diff changeset
289
kono
parents: 63
diff changeset
290 (define_c_enum "unspec"
kono
parents: 63
diff changeset
291 [UNSPEC_DDEDPD
kono
parents: 63
diff changeset
292 UNSPEC_DENBCD
kono
parents: 63
diff changeset
293 UNSPEC_DXEX
kono
parents: 63
diff changeset
294 UNSPEC_DIEX
kono
parents: 63
diff changeset
295 UNSPEC_DSCLI
kono
parents: 63
diff changeset
296 UNSPEC_DTSTSFI
kono
parents: 63
diff changeset
297 UNSPEC_DSCRI])
kono
parents: 63
diff changeset
298
kono
parents: 63
diff changeset
299 (define_code_iterator DFP_TEST [eq lt gt unordered])
kono
parents: 63
diff changeset
300
kono
parents: 63
diff changeset
301 (define_mode_iterator D64_D128 [DD TD])
kono
parents: 63
diff changeset
302
kono
parents: 63
diff changeset
303 (define_mode_attr dfp_suffix [(DD "")
kono
parents: 63
diff changeset
304 (TD "q")])
kono
parents: 63
diff changeset
305
kono
parents: 63
diff changeset
306 (define_insn "dfp_ddedpd_<mode>"
kono
parents: 63
diff changeset
307 [(set (match_operand:D64_D128 0 "gpc_reg_operand" "=d")
kono
parents: 63
diff changeset
308 (unspec:D64_D128 [(match_operand:QI 1 "const_0_to_3_operand" "i")
kono
parents: 63
diff changeset
309 (match_operand:D64_D128 2 "gpc_reg_operand" "d")]
kono
parents: 63
diff changeset
310 UNSPEC_DDEDPD))]
kono
parents: 63
diff changeset
311 "TARGET_DFP"
kono
parents: 63
diff changeset
312 "ddedpd<dfp_suffix> %1,%0,%2"
kono
parents: 63
diff changeset
313 [(set_attr "type" "dfp")])
kono
parents: 63
diff changeset
314
kono
parents: 63
diff changeset
315 (define_insn "dfp_denbcd_<mode>"
kono
parents: 63
diff changeset
316 [(set (match_operand:D64_D128 0 "gpc_reg_operand" "=d")
kono
parents: 63
diff changeset
317 (unspec:D64_D128 [(match_operand:QI 1 "const_0_to_1_operand" "i")
kono
parents: 63
diff changeset
318 (match_operand:D64_D128 2 "gpc_reg_operand" "d")]
kono
parents: 63
diff changeset
319 UNSPEC_DENBCD))]
kono
parents: 63
diff changeset
320 "TARGET_DFP"
kono
parents: 63
diff changeset
321 "denbcd<dfp_suffix> %1,%0,%2"
kono
parents: 63
diff changeset
322 [(set_attr "type" "dfp")])
kono
parents: 63
diff changeset
323
kono
parents: 63
diff changeset
324 (define_insn "dfp_dxex_<mode>"
kono
parents: 63
diff changeset
325 [(set (match_operand:DI 0 "gpc_reg_operand" "=d")
kono
parents: 63
diff changeset
326 (unspec:DI [(match_operand:D64_D128 1 "gpc_reg_operand" "d")]
kono
parents: 63
diff changeset
327 UNSPEC_DXEX))]
kono
parents: 63
diff changeset
328 "TARGET_DFP"
kono
parents: 63
diff changeset
329 "dxex<dfp_suffix> %0,%1"
kono
parents: 63
diff changeset
330 [(set_attr "type" "dfp")])
kono
parents: 63
diff changeset
331
kono
parents: 63
diff changeset
332 (define_insn "dfp_diex_<mode>"
kono
parents: 63
diff changeset
333 [(set (match_operand:D64_D128 0 "gpc_reg_operand" "=d")
kono
parents: 63
diff changeset
334 (unspec:D64_D128 [(match_operand:DI 1 "gpc_reg_operand" "d")
kono
parents: 63
diff changeset
335 (match_operand:D64_D128 2 "gpc_reg_operand" "d")]
kono
parents: 63
diff changeset
336 UNSPEC_DXEX))]
kono
parents: 63
diff changeset
337 "TARGET_DFP"
kono
parents: 63
diff changeset
338 "diex<dfp_suffix> %0,%1,%2"
kono
parents: 63
diff changeset
339 [(set_attr "type" "dfp")])
kono
parents: 63
diff changeset
340
kono
parents: 63
diff changeset
341 (define_expand "dfptstsfi_<code>_<mode>"
kono
parents: 63
diff changeset
342 [(set (match_dup 3)
kono
parents: 63
diff changeset
343 (compare:CCFP
kono
parents: 63
diff changeset
344 (unspec:D64_D128
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
345 [(match_operand:SI 1 "const_int_operand")
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
346 (match_operand:D64_D128 2 "gpc_reg_operand")]
111
kono
parents: 63
diff changeset
347 UNSPEC_DTSTSFI)
kono
parents: 63
diff changeset
348 (match_dup 4)))
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
349 (set (match_operand:SI 0 "register_operand")
111
kono
parents: 63
diff changeset
350 (DFP_TEST:SI (match_dup 3)
kono
parents: 63
diff changeset
351 (const_int 0)))
kono
parents: 63
diff changeset
352 ]
kono
parents: 63
diff changeset
353 "TARGET_P9_MISC"
kono
parents: 63
diff changeset
354 {
kono
parents: 63
diff changeset
355 operands[3] = gen_reg_rtx (CCFPmode);
kono
parents: 63
diff changeset
356 operands[4] = const0_rtx;
kono
parents: 63
diff changeset
357 })
kono
parents: 63
diff changeset
358
kono
parents: 63
diff changeset
359 (define_insn "*dfp_sgnfcnc_<mode>"
kono
parents: 63
diff changeset
360 [(set (match_operand:CCFP 0 "" "=y")
kono
parents: 63
diff changeset
361 (compare:CCFP
kono
parents: 63
diff changeset
362 (unspec:D64_D128 [(match_operand:SI 1 "const_int_operand" "n")
kono
parents: 63
diff changeset
363 (match_operand:D64_D128 2 "gpc_reg_operand" "d")]
kono
parents: 63
diff changeset
364 UNSPEC_DTSTSFI)
kono
parents: 63
diff changeset
365 (match_operand:SI 3 "zero_constant" "j")))]
kono
parents: 63
diff changeset
366 "TARGET_P9_MISC"
kono
parents: 63
diff changeset
367 {
kono
parents: 63
diff changeset
368 /* If immediate operand is greater than 63, it will behave as if
kono
parents: 63
diff changeset
369 the value had been 63. The code generator does not support
kono
parents: 63
diff changeset
370 immediate operand values greater than 63. */
kono
parents: 63
diff changeset
371 if (!(IN_RANGE (INTVAL (operands[1]), 0, 63)))
kono
parents: 63
diff changeset
372 operands[1] = GEN_INT (63);
kono
parents: 63
diff changeset
373 return "dtstsfi<dfp_suffix> %0,%1,%2";
kono
parents: 63
diff changeset
374 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
375 [(set_attr "type" "fp")])
111
kono
parents: 63
diff changeset
376
kono
parents: 63
diff changeset
377 (define_insn "dfp_dscli_<mode>"
kono
parents: 63
diff changeset
378 [(set (match_operand:D64_D128 0 "gpc_reg_operand" "=d")
kono
parents: 63
diff changeset
379 (unspec:D64_D128 [(match_operand:D64_D128 1 "gpc_reg_operand" "d")
kono
parents: 63
diff changeset
380 (match_operand:QI 2 "immediate_operand" "i")]
kono
parents: 63
diff changeset
381 UNSPEC_DSCLI))]
kono
parents: 63
diff changeset
382 "TARGET_DFP"
kono
parents: 63
diff changeset
383 "dscli<dfp_suffix> %0,%1,%2"
kono
parents: 63
diff changeset
384 [(set_attr "type" "dfp")])
kono
parents: 63
diff changeset
385
kono
parents: 63
diff changeset
386 (define_insn "dfp_dscri_<mode>"
kono
parents: 63
diff changeset
387 [(set (match_operand:D64_D128 0 "gpc_reg_operand" "=d")
kono
parents: 63
diff changeset
388 (unspec:D64_D128 [(match_operand:D64_D128 1 "gpc_reg_operand" "d")
kono
parents: 63
diff changeset
389 (match_operand:QI 2 "immediate_operand" "i")]
kono
parents: 63
diff changeset
390 UNSPEC_DSCRI))]
kono
parents: 63
diff changeset
391 "TARGET_DFP"
kono
parents: 63
diff changeset
392 "dscri<dfp_suffix> %0,%1,%2"
kono
parents: 63
diff changeset
393 [(set_attr "type" "dfp")])