Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 262603 | Differences between
and this patch

Collapse All | Expand All

(-)a/gcc/config.gcc (-5 / +5 lines)
Lines 1074-1080 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i Link Here
1074
			tmake_file="${tmake_file} i386/t-linux64"
1074
			tmake_file="${tmake_file} i386/t-linux64"
1075
			need_64bit_hwint=yes
1075
			need_64bit_hwint=yes
1076
			case X"${with_cpu}" in
1076
			case X"${with_cpu}" in
1077
			Xgeneric|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
1077
			Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
1078
				;;
1078
				;;
1079
			X)
1079
			X)
1080
				if test x$with_cpu_64 = x; then
1080
				if test x$with_cpu_64 = x; then
Lines 1083-1089 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i Link Here
1083
				;;
1083
				;;
1084
			*)
1084
			*)
1085
				echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1085
				echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1086
				echo "generic core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx" 1>&2
1086
				echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx" 1>&2
1087
				exit 1
1087
				exit 1
1088
				;;
1088
				;;
1089
			esac
1089
			esac
Lines 1189-1195 i[34567]86-*-solaris2*) Link Here
1189
		need_64bit_hwint=yes
1189
		need_64bit_hwint=yes
1190
		use_gcc_stdint=wrap
1190
		use_gcc_stdint=wrap
1191
		case X"${with_cpu}" in
1191
		case X"${with_cpu}" in
1192
		Xgeneric|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
1192
		Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
1193
			;;
1193
			;;
1194
		X)
1194
		X)
1195
			if test x$with_cpu_64 = x; then
1195
			if test x$with_cpu_64 = x; then
Lines 1198-1204 i[34567]86-*-solaris2*) Link Here
1198
			;;
1198
			;;
1199
		*)
1199
		*)
1200
			echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1200
			echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1201
			echo "generic core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx" 1>&2
1201
			echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx" 1>&2
1202
			exit 1
1202
			exit 1
1203
			;;
1203
			;;
1204
		esac
1204
		esac
Lines 2801-2807 case "${target}" in Link Here
2801
				esac
2801
				esac
2802
				# OK
2802
				# OK
2803
				;;
2803
				;;
2804
			"" | amdfam10 | barcelona | k8 | opteron | athlon64 | athlon-fx | nocona | core2 | generic)
2804
			"" | amdfam10 | barcelona | k8 | opteron | athlon64 | athlon-fx | nocona | core2 | atom | generic)
2805
				# OK
2805
				# OK
2806
				;;
2806
				;;
2807
			*)
2807
			*)
(-)a/gcc/config/i386/atom.md (+770 lines)
Line 0 Link Here
1
;; Atom Scheduling
2
;; Copyright (C) 2009 Free Software Foundation, Inc.
3
;;
4
;; This file is part of GCC.
5
;;
6
;; GCC is free software; you can redistribute it and/or modify
7
;; it under the terms of the GNU General Public License as published by
8
;; the Free Software Foundation; either version 3, or (at your option)
9
;; any later version.
10
;;
11
;; GCC is distributed in the hope that it will be useful,
12
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
;; GNU General Public License for more details.
15
;;
16
;; You should have received a copy of the GNU General Public License
17
;; along with GCC; see the file COPYING3.  If not see
18
;; <http://www.gnu.org/licenses/>.
19
;;
20
;; Atom is an in-order core with two integer pipelines.
21
22
23
(define_attr "atom_unit" "sishuf,simul,jeu,complex,other" 
24
  (const_string "other"))
25
26
(define_attr "atom_sse_attr" "rcp,movdup,lfence,fence,prefetch,sqrt,mxcsr,other"
27
  (const_string "other"))
28
29
(define_automaton "atom")
30
31
;;  Atom has two ports: port 0 and port 1 connecting to all execution units
32
(define_cpu_unit "atom-port-0,atom-port-1" "atom")
33
34
;;  EU: Execution Unit
35
;;  Atom EUs are connected by port 0 or port 1. 
36
37
(define_cpu_unit "atom-eu-0, atom-eu-1,
38
                  atom-imul-1, atom-imul-2, atom-imul-3, atom-imul-4"
39
                  "atom")
40
41
;; Some EUs have duplicated copied and can be accessed via either
42
;; port 0 or port 1
43
;; (define_reservation "atom-port-either" "(atom-port-0 | atom-port-1)")
44
45
;;; Some instructions is dual-pipe execution, need both ports
46
;;; Complex multi-op macro-instructoins need both ports and all EUs
47
(define_reservation "atom-port-dual" "(atom-port-0 + atom-port-1)")
48
(define_reservation "atom-all-eu" "(atom-eu-0 + atom-eu-1 + 
49
                                    atom-imul-1 + atom-imul-2 + atom-imul-3 +
50
                                    atom-imul-4)")
51
52
;;; Most of simple instructions have 1 cycle latency. Some of them
53
;;; issue in port 0, some in port 0 and some in either port.
54
(define_reservation "atom-simple-0" "(atom-port-0 + atom-eu-0)")
55
(define_reservation "atom-simple-1" "(atom-port-1 + atom-eu-1)")
56
(define_reservation "atom-simple-either" "(atom-simple-0 | atom-simple-1)")
57
58
;;; Some insn issues in port 0 with 3 cycle latency and 1 cycle tput
59
(define_reservation "atom-eu-0-3-1" "(atom-port-0 + atom-eu-0, nothing*2)")
60
61
;;; fmul insn can have 4 or 5 cycles latency
62
(define_reservation "atom-fmul-5c" "(atom-port-0 + atom-eu-0), nothing*4")
63
(define_reservation "atom-fmul-4c" "(atom-port-0 + atom-eu-0), nothing*3")
64
65
;;; fadd can has 5 cycles latency depends on instruction forms
66
(define_reservation "atom-fadd-5c" "(atom-port-1 + atom-eu-1), nothing*5")
67
68
;;; imul insn has 5 cycles latency
69
(define_reservation "atom-imul-32" 
70
                    "atom-imul-1, atom-imul-2, atom-imul-3, atom-imul-4, 
71
                     atom-port-0")
72
;;; imul instruction excludes other non-FP instructions.
73
(exclusion_set "atom-eu-0, atom-eu-1" 
74
               "atom-imul-1, atom-imul-2, atom-imul-3, atom-imul-4")
75
76
;;; dual-execution instructions can have 1,2,4,5 cycles latency depends on 
77
;;; instruction forms
78
(define_reservation "atom-dual-1c" "(atom-port-dual + atom-eu-0 + atom-eu-1)")
79
(define_reservation "atom-dual-2c"
80
                    "(atom-port-dual + atom-eu-0 + atom-eu-1, nothing)")
81
(define_reservation "atom-dual-5c"
82
                    "(atom-port-dual + atom-eu-0 + atom-eu-1, nothing*4)")
83
84
;;; Complex macro-instruction has variants of latency, and uses both ports.
85
(define_reservation "atom-complex" "(atom-port-dual + atom-all-eu)")
86
87
(define_insn_reservation  "atom_other" 9
88
  (and (eq_attr "cpu" "atom")
89
       (and (eq_attr "type" "other")
90
            (eq_attr "atom_unit" "!jeu")))
91
  "atom-complex, atom-all-eu*8")
92
93
;; return has type "other" with atom_unit "jeu"
94
(define_insn_reservation  "atom_other_2" 1
95
  (and (eq_attr "cpu" "atom")
96
       (and (eq_attr "type" "other")
97
            (eq_attr "atom_unit" "jeu")))
98
  "atom-dual-1c")
99
100
(define_insn_reservation  "atom_multi" 9
101
  (and (eq_attr "cpu" "atom")
102
       (eq_attr "type" "multi"))
103
  "atom-complex, atom-all-eu*8")
104
105
;; Normal alu insns without carry
106
(define_insn_reservation  "atom_alu" 1
107
  (and (eq_attr "cpu" "atom")
108
       (and (eq_attr "type" "alu")
109
            (and (eq_attr "memory" "none")
110
                 (eq_attr "use_carry" "0"))))
111
  "atom-simple-either")
112
113
;; Normal alu insns without carry
114
(define_insn_reservation  "atom_alu_mem" 1
115
  (and (eq_attr "cpu" "atom")
116
       (and (eq_attr "type" "alu")
117
            (and (eq_attr "memory" "!none")
118
                 (eq_attr "use_carry" "0"))))
119
  "atom-simple-either")
120
121
;; Alu insn consuming CF, such as add/sbb
122
(define_insn_reservation  "atom_alu_carry" 1
123
  (and (eq_attr "cpu" "atom")
124
       (and (eq_attr "type" "alu")
125
            (and (eq_attr "memory" "none")
126
                 (eq_attr "use_carry" "1"))))
127
  "atom-simple-either")
128
129
;; Alu insn consuming CF, such as add/sbb
130
(define_insn_reservation  "atom_alu_carry_mem" 1
131
  (and (eq_attr "cpu" "atom")
132
       (and (eq_attr "type" "alu")
133
            (and (eq_attr "memory" "!none")
134
                (eq_attr "use_carry" "1"))))
135
  "atom-simple-either")
136
137
(define_insn_reservation  "atom_alu1" 1
138
  (and (eq_attr "cpu" "atom")
139
       (and (eq_attr "type" "alu1")
140
            (eq_attr "memory" "none")))
141
  "atom-simple-either")
142
143
(define_insn_reservation  "atom_alu1_mem" 1
144
  (and (eq_attr "cpu" "atom")
145
       (and (eq_attr "type" "alu1")
146
            (eq_attr "memory" "!none")))
147
  "atom-simple-either")
148
149
(define_insn_reservation  "atom_negnot" 1
150
  (and (eq_attr "cpu" "atom")
151
       (and (eq_attr "type" "negnot")
152
            (eq_attr "memory" "none")))
153
  "atom-simple-either")
154
155
(define_insn_reservation  "atom_negnot_mem" 1
156
  (and (eq_attr "cpu" "atom")
157
       (and (eq_attr "type" "negnot")
158
            (eq_attr "memory" "!none")))
159
  "atom-simple-either")
160
161
(define_insn_reservation  "atom_imov" 1
162
  (and (eq_attr "cpu" "atom")
163
       (and (eq_attr "type" "imov")
164
            (eq_attr "memory" "none")))
165
  "atom-simple-either")
166
167
(define_insn_reservation  "atom_imov_mem" 1
168
  (and (eq_attr "cpu" "atom")
169
       (and (eq_attr "type" "imov")
170
            (eq_attr "memory" "!none")))
171
  "atom-simple-either")
172
173
;; 16<-16, 32<-32
174
(define_insn_reservation  "atom_imovx" 1
175
  (and (eq_attr "cpu" "atom")
176
       (and (eq_attr "type" "imovx")
177
            (and (eq_attr "memory" "none")
178
                 (ior (and (match_operand:HI 0 "register_operand")
179
                           (match_operand:HI 1 "general_operand"))
180
                      (and (match_operand:SI 0 "register_operand")
181
                           (match_operand:SI 1 "general_operand"))))))
182
  "atom-simple-either")
183
184
;; 16<-16, 32<-32, mem
185
(define_insn_reservation  "atom_imovx_mem" 1
186
  (and (eq_attr "cpu" "atom")
187
       (and (eq_attr "type" "imovx")
188
            (and (eq_attr "memory" "!none")
189
                 (ior (and (match_operand:HI 0 "register_operand")
190
                           (match_operand:HI 1 "general_operand"))
191
                      (and (match_operand:SI 0 "register_operand")
192
                           (match_operand:SI 1 "general_operand"))))))
193
  "atom-simple-either")
194
195
;; 32<-16, 32<-8, 64<-16, 64<-8, 64<-32, 8<-8
196
(define_insn_reservation  "atom_imovx_2" 1
197
  (and (eq_attr "cpu" "atom")
198
       (and (eq_attr "type" "imovx")
199
            (and (eq_attr "memory" "none")
200
                 (ior (match_operand:QI 0 "register_operand")
201
                      (ior (and (match_operand:SI 0 "register_operand")
202
                                (not (match_operand:SI 1 "general_operand")))
203
                           (match_operand:DI 0 "register_operand"))))))
204
  "atom-simple-0")
205
206
;; 32<-16, 32<-8, 64<-16, 64<-8, 64<-32, 8<-8, mem
207
(define_insn_reservation  "atom_imovx_2_mem" 1
208
  (and (eq_attr "cpu" "atom")
209
       (and (eq_attr "type" "imovx")
210
            (and (eq_attr "memory" "!none")
211
                 (ior (match_operand:QI 0 "register_operand")
212
                      (ior (and (match_operand:SI 0 "register_operand")
213
                                (not (match_operand:SI 1 "general_operand")))
214
                           (match_operand:DI 0 "register_operand"))))))
215
  "atom-simple-0")
216
217
;; 16<-8
218
(define_insn_reservation  "atom_imovx_3" 3
219
  (and (eq_attr "cpu" "atom")
220
       (and (eq_attr "type" "imovx")
221
            (and (match_operand:HI 0 "register_operand")
222
                 (match_operand:QI 1 "general_operand"))))
223
  "atom-complex, atom-all-eu*2")
224
225
(define_insn_reservation  "atom_lea" 1
226
  (and (eq_attr "cpu" "atom")
227
       (and (eq_attr "type" "lea")
228
            (eq_attr "mode" "!HI")))
229
  "atom-simple-either")
230
231
;; lea 16bit address is complex insn
232
(define_insn_reservation  "atom_lea_2" 2
233
  (and (eq_attr "cpu" "atom")
234
       (and (eq_attr "type" "lea")
235
            (eq_attr "mode" "HI")))
236
  "atom-complex, atom-all-eu")
237
238
(define_insn_reservation  "atom_incdec" 1
239
  (and (eq_attr "cpu" "atom")
240
       (and (eq_attr "type" "incdec")
241
            (eq_attr "memory" "none")))
242
  "atom-simple-either")
243
244
(define_insn_reservation  "atom_incdec_mem" 1
245
  (and (eq_attr "cpu" "atom")
246
       (and (eq_attr "type" "incdec")
247
            (eq_attr "memory" "!none")))
248
  "atom-simple-either")
249
250
;; simple shift instruction use SHIFT eu, none memory
251
(define_insn_reservation  "atom_ishift" 1
252
  (and (eq_attr "cpu" "atom")
253
       (and (eq_attr "type" "ishift")
254
            (and (eq_attr "memory" "none") (eq_attr "prefix_0f" "0"))))
255
  "atom-simple-0")
256
257
;; simple shift instruction use SHIFT eu, memory
258
(define_insn_reservation  "atom_ishift_mem" 1
259
  (and (eq_attr "cpu" "atom")
260
       (and (eq_attr "type" "ishift")
261
            (and (eq_attr "memory" "!none") (eq_attr "prefix_0f" "0"))))
262
  "atom-simple-0")
263
264
;; DF shift (prefixed with 0f) is complex insn with latency of 7 cycles
265
(define_insn_reservation  "atom_ishift_3" 7
266
  (and (eq_attr "cpu" "atom")
267
       (and (eq_attr "type" "ishift")
268
            (eq_attr "prefix_0f" "1")))
269
  "atom-complex, atom-all-eu*6")
270
271
(define_insn_reservation  "atom_ishift1" 1
272
  (and (eq_attr "cpu" "atom")
273
       (and (eq_attr "type" "ishift1")
274
            (eq_attr "memory" "none")))
275
  "atom-simple-0")
276
277
(define_insn_reservation  "atom_ishift1_mem" 1
278
  (and (eq_attr "cpu" "atom")
279
       (and (eq_attr "type" "ishift1")
280
            (eq_attr "memory" "!none")))
281
  "atom-simple-0")
282
283
(define_insn_reservation  "atom_rotate" 1
284
  (and (eq_attr "cpu" "atom")
285
       (and (eq_attr "type" "rotate")
286
            (eq_attr "memory" "none")))
287
  "atom-simple-0")
288
289
(define_insn_reservation  "atom_rotate_mem" 1
290
  (and (eq_attr "cpu" "atom")
291
       (and (eq_attr "type" "rotate")
292
            (eq_attr "memory" "!none")))
293
  "atom-simple-0")
294
295
(define_insn_reservation  "atom_rotate1" 1
296
  (and (eq_attr "cpu" "atom")
297
       (and (eq_attr "type" "rotate1")
298
            (eq_attr "memory" "none")))
299
  "atom-simple-0")
300
301
(define_insn_reservation  "atom_rotate1_mem" 1
302
  (and (eq_attr "cpu" "atom")
303
       (and (eq_attr "type" "rotate1")
304
            (eq_attr "memory" "!none")))
305
  "atom-simple-0")
306
307
(define_insn_reservation  "atom_imul" 5
308
  (and (eq_attr "cpu" "atom")
309
       (and (eq_attr "type" "imul")
310
            (and (eq_attr "memory" "none") (eq_attr "mode" "SI"))))
311
  "atom-imul-32")
312
313
(define_insn_reservation  "atom_imul_mem" 5
314
  (and (eq_attr "cpu" "atom")
315
       (and (eq_attr "type" "imul")
316
            (and (eq_attr "memory" "!none") (eq_attr "mode" "SI"))))
317
  "atom-imul-32")
318
319
;; latency set to 10 as common 64x64 imul
320
(define_insn_reservation  "atom_imul_3" 10
321
  (and (eq_attr "cpu" "atom")
322
       (and (eq_attr "type" "imul")
323
            (eq_attr "mode" "!SI")))
324
  "atom-complex, atom-all-eu*9")
325
326
(define_insn_reservation  "atom_idiv" 65
327
  (and (eq_attr "cpu" "atom")
328
       (eq_attr "type" "idiv"))
329
  "atom-complex, atom-all-eu*32, nothing*32")
330
331
(define_insn_reservation  "atom_icmp" 1
332
  (and (eq_attr "cpu" "atom")
333
       (and (eq_attr "type" "icmp")
334
            (eq_attr "memory" "none")))
335
  "atom-simple-either")
336
337
(define_insn_reservation  "atom_icmp_mem" 1
338
  (and (eq_attr "cpu" "atom")
339
       (and (eq_attr "type" "icmp")
340
            (eq_attr "memory" "!none")))
341
  "atom-simple-either")
342
343
(define_insn_reservation  "atom_test" 1
344
  (and (eq_attr "cpu" "atom")
345
       (and (eq_attr "type" "test")
346
            (eq_attr "memory" "none")))
347
  "atom-simple-either")
348
349
(define_insn_reservation  "atom_test_mem" 1
350
  (and (eq_attr "cpu" "atom")
351
       (and (eq_attr "type" "test")
352
            (eq_attr "memory" "!none")))
353
  "atom-simple-either")
354
355
(define_insn_reservation  "atom_ibr" 1
356
  (and (eq_attr "cpu" "atom")
357
       (and (eq_attr "type" "ibr")
358
            (eq_attr "memory" "!load")))
359
  "atom-simple-1")
360
361
;; complex if jump target is from address
362
(define_insn_reservation  "atom_ibr_2" 2
363
  (and (eq_attr "cpu" "atom")
364
       (and (eq_attr "type" "ibr")
365
            (eq_attr "memory" "load")))
366
  "atom-complex, atom-all-eu")
367
368
(define_insn_reservation  "atom_setcc" 1
369
  (and (eq_attr "cpu" "atom")
370
       (and (eq_attr "type" "setcc")
371
            (eq_attr "memory" "!store")))
372
  "atom-simple-either")
373
374
;; 2 cycles complex if target is in memory
375
(define_insn_reservation  "atom_setcc_2" 2
376
  (and (eq_attr "cpu" "atom")
377
       (and (eq_attr "type" "setcc")
378
            (eq_attr "memory" "store")))
379
  "atom-complex, atom-all-eu")
380
381
(define_insn_reservation  "atom_icmov" 1
382
  (and (eq_attr "cpu" "atom")
383
       (and (eq_attr "type" "icmov")
384
            (eq_attr "memory" "none")))
385
  "atom-simple-either")
386
387
(define_insn_reservation  "atom_icmov_mem" 1
388
  (and (eq_attr "cpu" "atom")
389
       (and (eq_attr "type" "icmov")
390
            (eq_attr "memory" "!none")))
391
  "atom-simple-either")
392
393
;; UCODE if segreg, ignored
394
(define_insn_reservation  "atom_push" 2
395
  (and (eq_attr "cpu" "atom")
396
       (eq_attr "type" "push"))
397
  "atom-dual-2c")
398
399
;; pop r64 is 1 cycle. UCODE if segreg, ignored
400
(define_insn_reservation  "atom_pop" 1
401
  (and (eq_attr "cpu" "atom")
402
       (and (eq_attr "type" "pop")
403
            (eq_attr "mode" "DI")))
404
  "atom-dual-1c")
405
406
;; pop non-r64 is 2 cycles. UCODE if segreg, ignored
407
(define_insn_reservation  "atom_pop_2" 2
408
  (and (eq_attr "cpu" "atom")
409
       (and (eq_attr "type" "pop")
410
            (eq_attr "mode" "!DI")))
411
  "atom-dual-2c")
412
413
;; UCODE if segreg, ignored
414
(define_insn_reservation  "atom_call" 1
415
  (and (eq_attr "cpu" "atom")
416
       (eq_attr "type" "call"))
417
  "atom-dual-1c")
418
419
(define_insn_reservation  "atom_callv" 1
420
  (and (eq_attr "cpu" "atom")
421
       (eq_attr "type" "callv"))
422
  "atom-dual-1c")
423
424
(define_insn_reservation  "atom_leave" 3
425
  (and (eq_attr "cpu" "atom")
426
       (eq_attr "type" "leave"))
427
  "atom-complex, atom-all-eu*2")
428
429
(define_insn_reservation  "atom_str" 3
430
  (and (eq_attr "cpu" "atom")
431
       (eq_attr "type" "str"))
432
  "atom-complex, atom-all-eu*2")
433
434
(define_insn_reservation  "atom_sselog" 1
435
  (and (eq_attr "cpu" "atom")
436
       (and (eq_attr "type" "sselog")
437
            (eq_attr "memory" "none")))
438
  "atom-simple-either")
439
440
(define_insn_reservation  "atom_sselog_mem" 1
441
  (and (eq_attr "cpu" "atom")
442
       (and (eq_attr "type" "sselog")
443
            (eq_attr "memory" "!none")))
444
  "atom-simple-either")
445
446
(define_insn_reservation  "atom_sselog1" 1
447
  (and (eq_attr "cpu" "atom")
448
       (and (eq_attr "type" "sselog1")
449
            (eq_attr "memory" "none")))
450
  "atom-simple-0")
451
452
(define_insn_reservation  "atom_sselog1_mem" 1
453
  (and (eq_attr "cpu" "atom")
454
       (and (eq_attr "type" "sselog1")
455
            (eq_attr "memory" "!none")))
456
  "atom-simple-0")
457
458
;; not pmad, not psad
459
(define_insn_reservation  "atom_sseiadd" 1
460
  (and (eq_attr "cpu" "atom")
461
       (and (eq_attr "type" "sseiadd")
462
            (and (not (match_operand:V2DI 0 "register_operand"))
463
                 (and (eq_attr "atom_unit" "!simul")
464
                      (eq_attr "atom_unit" "!complex")))))
465
  "atom-simple-either")
466
467
;; pmad, psad and 64
468
(define_insn_reservation  "atom_sseiadd_2" 4
469
  (and (eq_attr "cpu" "atom")
470
       (and (eq_attr "type" "sseiadd")
471
            (and (not (match_operand:V2DI 0 "register_operand"))
472
                 (and (eq_attr "atom_unit" "simul" )
473
                      (eq_attr "mode" "DI")))))
474
  "atom-fmul-4c")
475
476
;; pmad, psad and 128
477
(define_insn_reservation  "atom_sseiadd_3" 5
478
  (and (eq_attr "cpu" "atom")
479
       (and (eq_attr "type" "sseiadd")
480
            (and (not (match_operand:V2DI 0 "register_operand"))
481
                 (and (eq_attr "atom_unit" "simul" )
482
                      (eq_attr "mode" "TI")))))
483
  "atom-fmul-5c")
484
485
;; if paddq(64 bit op), phadd/phsub
486
(define_insn_reservation  "atom_sseiadd_4" 6
487
  (and (eq_attr "cpu" "atom")
488
       (and (eq_attr "type" "sseiadd")
489
            (ior (match_operand:V2DI 0 "register_operand")
490
                 (eq_attr "atom_unit" "complex"))))
491
  "atom-complex, atom-all-eu*5")
492
493
;; if immediate op. 
494
(define_insn_reservation  "atom_sseishft" 1
495
  (and (eq_attr "cpu" "atom")
496
       (and (eq_attr "type" "sseishft")
497
            (and (eq_attr "atom_unit" "!sishuf")
498
                 (match_operand 2 "immediate_operand"))))
499
  "atom-simple-either")
500
501
;; if palignr or psrldq
502
(define_insn_reservation  "atom_sseishft_2" 1
503
  (and (eq_attr "cpu" "atom")
504
       (and (eq_attr "type" "sseishft")
505
            (and (eq_attr "atom_unit" "sishuf")
506
                 (match_operand 2 "immediate_operand"))))
507
  "atom-simple-0")
508
509
;; if reg/mem op
510
(define_insn_reservation  "atom_sseishft_3" 2
511
  (and (eq_attr "cpu" "atom")
512
       (and (eq_attr "type" "sseishft")
513
            (not (match_operand 2 "immediate_operand"))))
514
  "atom-complex, atom-all-eu")
515
516
(define_insn_reservation  "atom_sseimul" 1
517
  (and (eq_attr "cpu" "atom")
518
       (eq_attr "type" "sseimul"))
519
  "atom-simple-0")
520
521
;; rcpss or rsqrtss
522
(define_insn_reservation  "atom_sse" 4
523
  (and (eq_attr "cpu" "atom")
524
       (and (eq_attr "type" "sse")
525
            (and (eq_attr "atom_sse_attr" "rcp") (eq_attr "mode" "SF"))))
526
  "atom-fmul-4c")
527
528
;; movshdup, movsldup. Suggest to type sseishft
529
(define_insn_reservation  "atom_sse_2" 1
530
  (and (eq_attr "cpu" "atom")
531
       (and (eq_attr "type" "sse")
532
            (eq_attr "atom_sse_attr" "movdup")))
533
  "atom-simple-0")
534
535
;; lfence
536
(define_insn_reservation  "atom_sse_3" 1
537
  (and (eq_attr "cpu" "atom")
538
       (and (eq_attr "type" "sse")
539
            (eq_attr "atom_sse_attr" "lfence")))
540
  "atom-simple-either")
541
542
;; sfence,clflush,mfence, prefetch
543
(define_insn_reservation  "atom_sse_4" 1
544
  (and (eq_attr "cpu" "atom")
545
       (and (eq_attr "type" "sse")
546
            (ior (eq_attr "atom_sse_attr" "fence")
547
                 (eq_attr "atom_sse_attr" "prefetch"))))
548
  "atom-simple-0")
549
550
;; rcpps, rsqrtss, sqrt, ldmxcsr
551
(define_insn_reservation  "atom_sse_5" 7
552
  (and (eq_attr "cpu" "atom")
553
       (and (eq_attr "type" "sse")
554
            (ior (ior (eq_attr "atom_sse_attr" "sqrt")
555
                      (eq_attr "atom_sse_attr" "mxcsr"))
556
                 (and (eq_attr "atom_sse_attr" "rcp")
557
                      (eq_attr "mode" "V4SF")))))
558
  "atom-complex, atom-all-eu*6")
559
560
;; xmm->xmm
561
(define_insn_reservation  "atom_ssemov" 1
562
  (and (eq_attr "cpu" "atom")
563
       (and (eq_attr "type" "ssemov")
564
            (and (match_operand 0 "register_operand" "xy") (match_operand 1 "register_operand" "xy"))))
565
  "atom-simple-either")
566
567
;; reg->xmm
568
(define_insn_reservation  "atom_ssemov_2" 1
569
  (and (eq_attr "cpu" "atom")
570
       (and (eq_attr "type" "ssemov")
571
            (and (match_operand 0 "register_operand" "xy") (match_operand 1 "register_operand" "r"))))
572
  "atom-simple-0")
573
574
;; xmm->reg
575
(define_insn_reservation  "atom_ssemov_3" 3
576
  (and (eq_attr "cpu" "atom")
577
       (and (eq_attr "type" "ssemov")
578
            (and (match_operand 0 "register_operand" "r") (match_operand 1 "register_operand" "xy"))))
579
  "atom-eu-0-3-1")
580
581
;; mov mem
582
(define_insn_reservation  "atom_ssemov_4" 1
583
  (and (eq_attr "cpu" "atom")
584
       (and (eq_attr "type" "ssemov")
585
            (and (eq_attr "movu" "0") (eq_attr "memory" "!none"))))
586
  "atom-simple-0")
587
588
;; movu mem
589
(define_insn_reservation  "atom_ssemov_5" 2
590
  (and (eq_attr "cpu" "atom")
591
       (and (eq_attr "type" "ssemov")
592
            (ior (eq_attr "movu" "1") (eq_attr "memory" "!none"))))
593
  "atom-complex, atom-all-eu")
594
595
;; no memory simple
596
(define_insn_reservation  "atom_sseadd" 5
597
  (and (eq_attr "cpu" "atom")
598
       (and (eq_attr "type" "sseadd")
599
            (and (eq_attr "memory" "none")
600
                 (and (eq_attr "mode" "!V2DF")
601
                      (eq_attr "atom_unit" "!complex")))))
602
  "atom-fadd-5c")
603
604
;; memory simple
605
(define_insn_reservation  "atom_sseadd_mem" 5
606
  (and (eq_attr "cpu" "atom")
607
       (and (eq_attr "type" "sseadd")
608
            (and (eq_attr "memory" "!none")
609
                 (and (eq_attr "mode" "!V2DF")
610
                      (eq_attr "atom_unit" "!complex")))))
611
  "atom-dual-5c")
612
613
;; maxps, minps, *pd, hadd, hsub
614
(define_insn_reservation  "atom_sseadd_3" 8
615
  (and (eq_attr "cpu" "atom")
616
       (and (eq_attr "type" "sseadd")
617
            (ior (eq_attr "mode" "V2DF") (eq_attr "atom_unit" "complex"))))
618
  "atom-complex, atom-all-eu*7")
619
620
;; Except dppd/dpps
621
(define_insn_reservation  "atom_ssemul" 5
622
  (and (eq_attr "cpu" "atom")
623
       (and (eq_attr "type" "ssemul")
624
            (eq_attr "mode" "!SF")))
625
  "atom-fmul-5c")
626
627
;; Except dppd/dpps, 4 cycle if mulss
628
(define_insn_reservation  "atom_ssemul_2" 4
629
  (and (eq_attr "cpu" "atom")
630
       (and (eq_attr "type" "ssemul")
631
            (eq_attr "mode" "SF")))
632
  "atom-fmul-4c")
633
634
(define_insn_reservation  "atom_ssecmp" 1
635
  (and (eq_attr "cpu" "atom")
636
       (eq_attr "type" "ssecmp"))
637
  "atom-simple-either")
638
639
(define_insn_reservation  "atom_ssecomi" 10
640
  (and (eq_attr "cpu" "atom")
641
       (eq_attr "type" "ssecomi"))
642
  "atom-complex, atom-all-eu*9")
643
644
;; no memory and cvtpi2ps, cvtps2pi, cvttps2pi
645
(define_insn_reservation  "atom_ssecvt" 5
646
  (and (eq_attr "cpu" "atom")
647
       (and (eq_attr "type" "ssecvt")
648
            (ior (and (match_operand:V2SI 0 "register_operand")
649
                      (match_operand:V4SF 1 "register_operand"))
650
                 (and (match_operand:V4SF 0 "register_operand")
651
                      (match_operand:V2SI 1 "register_operand")))))
652
  "atom-fadd-5c")
653
654
;; memory and cvtpi2ps, cvtps2pi, cvttps2pi
655
(define_insn_reservation  "atom_ssecvt_2" 5
656
  (and (eq_attr "cpu" "atom")
657
       (and (eq_attr "type" "ssecvt")
658
            (ior (and (match_operand:V2SI 0 "register_operand")
659
                      (match_operand:V4SF 1 "memory_operand"))
660
                 (and (match_operand:V4SF 0 "register_operand")
661
                      (match_operand:V2SI 1 "memory_operand")))))
662
  "atom-dual-5c")
663
664
;; otherwise. 7 cycles average for cvtss2sd
665
(define_insn_reservation  "atom_ssecvt_3" 7
666
  (and (eq_attr "cpu" "atom")
667
       (and (eq_attr "type" "ssecvt")
668
            (not (ior (and (match_operand:V2SI 0 "register_operand")
669
                           (match_operand:V4SF 1 "nonimmediate_operand"))
670
                      (and (match_operand:V4SF 0 "register_operand")
671
                           (match_operand:V2SI 1 "nonimmediate_operand"))))))
672
  "atom-complex, atom-all-eu*6")
673
674
;; memory and cvtsi2sd
675
(define_insn_reservation  "atom_sseicvt" 5
676
  (and (eq_attr "cpu" "atom")
677
       (and (eq_attr "type" "sseicvt")
678
            (and (match_operand:V2DF 0 "register_operand")
679
                 (match_operand:SI 1 "memory_operand"))))
680
  "atom-dual-5c")
681
682
;; otherwise. 8 cycles average for cvtsd2si
683
(define_insn_reservation  "atom_sseicvt_2" 8
684
  (and (eq_attr "cpu" "atom")
685
       (and (eq_attr "type" "sseicvt")
686
            (not (and (match_operand:V2DF 0 "register_operand")
687
                      (match_operand:SI 1 "memory_operand")))))
688
  "atom-complex, atom-all-eu*7")
689
690
(define_insn_reservation  "atom_ssediv" 62
691
  (and (eq_attr "cpu" "atom")
692
       (eq_attr "type" "ssediv"))
693
  "atom-complex, atom-all-eu*12, nothing*49")
694
695
;; simple for fmov
696
(define_insn_reservation  "atom_fmov" 1
697
  (and (eq_attr "cpu" "atom")
698
       (and (eq_attr "type" "fmov")
699
            (eq_attr "memory" "none")))
700
  "atom-simple-either")
701
702
;; simple for fmov
703
(define_insn_reservation  "atom_fmov_mem" 1
704
  (and (eq_attr "cpu" "atom")
705
       (and (eq_attr "type" "fmov")
706
            (eq_attr "memory" "!none")))
707
  "atom-simple-either")
708
709
;; Define bypass here
710
711
;; There will be no stall from lea to non-mem EX insns
712
(define_bypass 0 "atom_lea"
713
                 "atom_alu_carry,
714
                  atom_alu,atom_alu1,atom_negnot,atom_imov,atom_imovx,
715
                  atom_incdec, atom_setcc, atom_icmov, atom_pop")
716
717
(define_bypass 0 "atom_lea"
718
                 "atom_alu_mem, atom_alu_carry_mem, atom_alu1_mem,
719
                  atom_imovx_mem, atom_imovx_2_mem,
720
                  atom_imov_mem, atom_icmov_mem, atom_fmov_mem"
721
                 "!ix86_agi_dependent")
722
723
;; There will be 3 cycles stall from EX insns to AGAN insns LEA
724
(define_bypass 4 "atom_alu_carry,
725
                  atom_alu,atom_alu1,atom_negnot,atom_imov,atom_imovx,
726
                  atom_incdec,atom_ishift,atom_ishift1,atom_rotate,
727
                  atom_rotate1, atom_setcc, atom_icmov, atom_pop,
728
                  atom_alu_mem, atom_alu_carry_mem, atom_alu1_mem,
729
                  atom_imovx_mem, atom_imovx_2_mem,
730
                  atom_imov_mem, atom_icmov_mem, atom_fmov_mem"
731
                 "atom_lea")
732
733
;; There will be 3 cycles stall from EX insns to insns need addr calculation
734
(define_bypass 4 "atom_alu_carry,
735
                  atom_alu,atom_alu1,atom_negnot,atom_imov,atom_imovx,
736
                  atom_incdec,atom_ishift,atom_ishift1,atom_rotate,
737
                  atom_rotate1, atom_setcc, atom_icmov, atom_pop,
738
                  atom_imovx_mem, atom_imovx_2_mem,
739
                  atom_alu_mem, atom_alu_carry_mem, atom_alu1_mem,
740
                  atom_imov_mem, atom_icmov_mem, atom_fmov_mem"
741
                 "atom_alu_mem, atom_alu_carry_mem, atom_alu1_mem,
742
                  atom_negnot_mem, atom_imov_mem, atom_incdec_mem,
743
                  atom_imovx_mem, atom_imovx_2_mem,
744
                  atom_imul_mem, atom_icmp_mem,
745
                  atom_test_mem, atom_icmov_mem, atom_sselog_mem,
746
                  atom_sselog1_mem, atom_fmov_mem, atom_sseadd_mem,
747
                  atom_ishift_mem, atom_ishift1_mem, 
748
                  atom_rotate_mem, atom_rotate1_mem"
749
                  "ix86_agi_dependent")
750
751
;; Stall from imul to lea is 8 cycles.
752
(define_bypass 9 "atom_imul, atom_imul_mem" "atom_lea")
753
754
;; Stall from imul to memory address is 8 cycles.
755
(define_bypass 9 "atom_imul, atom_imul_mem" 
756
                 "atom_alu_mem, atom_alu_carry_mem, atom_alu1_mem,
757
                  atom_negnot_mem, atom_imov_mem, atom_incdec_mem,
758
                  atom_ishift_mem, atom_ishift1_mem, atom_rotate_mem,
759
                  atom_rotate1_mem, atom_imul_mem, atom_icmp_mem,
760
                  atom_test_mem, atom_icmov_mem, atom_sselog_mem,
761
                  atom_sselog1_mem, atom_fmov_mem, atom_sseadd_mem"
762
                  "ix86_agi_dependent")
763
764
;; There will be 0 cycle stall from cmp/test to jcc
765
766
;; There will be 1 cycle stall from flag producer to cmov and adc/sbb
767
(define_bypass 2 "atom_icmp, atom_test, atom_alu, atom_alu_carry,
768
                  atom_alu1, atom_negnot, atom_incdec, atom_ishift,
769
                  atom_ishift1, atom_rotate, atom_rotate1"
770
                 "atom_icmov, atom_alu_carry")
(-)a/gcc/config/i386/i386-c.c (+7 lines)
Lines 119-124 ix86_target_macros_internal (int isa_flag, Link Here
119
      def_or_undef (parse_in, "__core2");
119
      def_or_undef (parse_in, "__core2");
120
      def_or_undef (parse_in, "__core2__");
120
      def_or_undef (parse_in, "__core2__");
121
      break;
121
      break;
122
    case PROCESSOR_ATOM:
123
      def_or_undef (parse_in, "__atom");
124
      def_or_undef (parse_in, "__atom__");
125
      break;
122
    /* use PROCESSOR_max to not set/unset the arch macro.  */
126
    /* use PROCESSOR_max to not set/unset the arch macro.  */
123
    case PROCESSOR_max:
127
    case PROCESSOR_max:
124
      break;
128
      break;
Lines 187-192 ix86_target_macros_internal (int isa_flag, Link Here
187
    case PROCESSOR_CORE2:
191
    case PROCESSOR_CORE2:
188
      def_or_undef (parse_in, "__tune_core2__");
192
      def_or_undef (parse_in, "__tune_core2__");
189
      break;
193
      break;
194
    case PROCESSOR_ATOM:
195
      def_or_undef (parse_in, "__tune_atom__");
196
      break;
190
    case PROCESSOR_GENERIC32:
197
    case PROCESSOR_GENERIC32:
191
    case PROCESSOR_GENERIC64:
198
    case PROCESSOR_GENERIC64:
192
      break;
199
      break;
(-)a/gcc/config/i386/i386.c (-27 / +120 lines)
Lines 1036-1041 struct processor_costs core2_cost = { Link Here
1036
  1,                                    /* cond_not_taken_branch_cost.  */
1036
  1,                                    /* cond_not_taken_branch_cost.  */
1037
};
1037
};
1038
1038
1039
static const
1040
struct processor_costs atom_cost = {
1041
  COSTS_N_INSNS (1),			/* cost of an add instruction */
1042
  COSTS_N_INSNS (1) + 1,		/* cost of a lea instruction */
1043
  COSTS_N_INSNS (1),			/* variable shift costs */
1044
  COSTS_N_INSNS (1),			/* constant shift costs */
1045
  {COSTS_N_INSNS (3),			/* cost of starting multiply for QI */
1046
   COSTS_N_INSNS (4),			/*                               HI */
1047
   COSTS_N_INSNS (3),			/*                               SI */
1048
   COSTS_N_INSNS (4),			/*                               DI */
1049
   COSTS_N_INSNS (2)},			/*                               other */
1050
  0,					/* cost of multiply per each bit set */
1051
  {COSTS_N_INSNS (18),			/* cost of a divide/mod for QI */
1052
   COSTS_N_INSNS (26),			/*                          HI */
1053
   COSTS_N_INSNS (42),			/*                          SI */
1054
   COSTS_N_INSNS (74),			/*                          DI */
1055
   COSTS_N_INSNS (74)},			/*                          other */
1056
  COSTS_N_INSNS (1),			/* cost of movsx */
1057
  COSTS_N_INSNS (1),			/* cost of movzx */
1058
  8,					/* "large" insn */
1059
  17,					/* MOVE_RATIO */
1060
  2,					/* cost for loading QImode using movzbl */
1061
  {4, 4, 4},				/* cost of loading integer registers
1062
					   in QImode, HImode and SImode.
1063
					   Relative to reg-reg move (2).  */
1064
  {4, 4, 4},				/* cost of storing integer registers */
1065
  4,					/* cost of reg,reg fld/fst */
1066
  {12, 12, 12},				/* cost of loading fp registers
1067
					   in SFmode, DFmode and XFmode */
1068
  {6, 6, 8},				/* cost of storing fp registers
1069
					   in SFmode, DFmode and XFmode */
1070
  2,					/* cost of moving MMX register */
1071
  {8, 8},				/* cost of loading MMX registers
1072
					   in SImode and DImode */
1073
  {8, 8},				/* cost of storing MMX registers
1074
					   in SImode and DImode */
1075
  2,					/* cost of moving SSE register */
1076
  {8, 8, 8},				/* cost of loading SSE registers
1077
					   in SImode, DImode and TImode */
1078
  {8, 8, 8},				/* cost of storing SSE registers
1079
					   in SImode, DImode and TImode */
1080
  5,					/* MMX or SSE register to integer */
1081
  32,					/* size of l1 cache.  */
1082
  256,					/* size of l2 cache.  */
1083
  64,					/* size of prefetch block */
1084
  6,					/* number of parallel prefetches */
1085
  3,					/* Branch cost */
1086
  COSTS_N_INSNS (8),			/* cost of FADD and FSUB insns.  */
1087
  COSTS_N_INSNS (8),			/* cost of FMUL instruction.  */
1088
  COSTS_N_INSNS (20),			/* cost of FDIV instruction.  */
1089
  COSTS_N_INSNS (8),			/* cost of FABS instruction.  */
1090
  COSTS_N_INSNS (8),			/* cost of FCHS instruction.  */
1091
  COSTS_N_INSNS (40),			/* cost of FSQRT instruction.  */
1092
  {{libcall, {{11, loop}, {-1, rep_prefix_4_byte}}},
1093
   {libcall, {{32, loop}, {64, rep_prefix_4_byte},
1094
          {8192, rep_prefix_8_byte}, {-1, libcall}}}},
1095
  {{libcall, {{8, loop}, {15, unrolled_loop},
1096
          {2048, rep_prefix_4_byte}, {-1, libcall}}},
1097
   {libcall, {{24, loop}, {32, unrolled_loop},
1098
          {8192, rep_prefix_8_byte}, {-1, libcall}}}},
1099
  1,                                    /* scalar_stmt_cost.  */
1100
  1,                                    /* scalar load_cost.  */
1101
  1,                                    /* scalar_store_cost.  */
1102
  1,                                    /* vec_stmt_cost.  */
1103
  1,                                    /* vec_to_scalar_cost.  */
1104
  1,                                    /* scalar_to_vec_cost.  */
1105
  1,                                    /* vec_align_load_cost.  */
1106
  2,                                    /* vec_unalign_load_cost.  */
1107
  1,                                    /* vec_store_cost.  */
1108
  3,                                    /* cond_taken_branch_cost.  */
1109
  1,                                    /* cond_not_taken_branch_cost.  */
1110
};
1111
1039
/* Generic64 should produce code tuned for Nocona and K8.  */
1112
/* Generic64 should produce code tuned for Nocona and K8.  */
1040
static const
1113
static const
1041
struct processor_costs generic64_cost = {
1114
struct processor_costs generic64_cost = {
Lines 1194-1199 const struct processor_costs *ix86_cost = &pentium_cost; Link Here
1194
#define m_PENT4  (1<<PROCESSOR_PENTIUM4)
1267
#define m_PENT4  (1<<PROCESSOR_PENTIUM4)
1195
#define m_NOCONA  (1<<PROCESSOR_NOCONA)
1268
#define m_NOCONA  (1<<PROCESSOR_NOCONA)
1196
#define m_CORE2  (1<<PROCESSOR_CORE2)
1269
#define m_CORE2  (1<<PROCESSOR_CORE2)
1270
#define m_ATOM  (1<<PROCESSOR_ATOM)
1197
1271
1198
#define m_GEODE  (1<<PROCESSOR_GEODE)
1272
#define m_GEODE  (1<<PROCESSOR_GEODE)
1199
#define m_K6  (1<<PROCESSOR_K6)
1273
#define m_K6  (1<<PROCESSOR_K6)
Lines 1231-1240 static unsigned int initial_ix86_tune_features[X86_TUNE_LAST] = { Link Here
1231
  m_486 | m_PENT,
1305
  m_486 | m_PENT,
1232
1306
1233
  /* X86_TUNE_UNROLL_STRLEN */
1307
  /* X86_TUNE_UNROLL_STRLEN */
1234
  m_486 | m_PENT | m_PPRO | m_AMD_MULTIPLE | m_K6 | m_CORE2 | m_GENERIC,
1308
  m_486 | m_PENT | m_ATOM | m_PPRO | m_AMD_MULTIPLE | m_K6
1309
  | m_CORE2 | m_GENERIC,
1235
1310
1236
  /* X86_TUNE_DEEP_BRANCH_PREDICTION */
1311
  /* X86_TUNE_DEEP_BRANCH_PREDICTION */
1237
  m_PPRO | m_K6_GEODE | m_AMD_MULTIPLE | m_PENT4 | m_GENERIC,
1312
  m_ATOM | m_PPRO | m_K6_GEODE | m_AMD_MULTIPLE | m_PENT4 | m_GENERIC,
1238
1313
1239
  /* X86_TUNE_BRANCH_PREDICTION_HINTS: Branch hints were put in P4 based
1314
  /* X86_TUNE_BRANCH_PREDICTION_HINTS: Branch hints were put in P4 based
1240
     on simulation result. But after P4 was made, no performance benefit
1315
     on simulation result. But after P4 was made, no performance benefit
Lines 1246-1257 static unsigned int initial_ix86_tune_features[X86_TUNE_LAST] = { Link Here
1246
  ~m_386,
1321
  ~m_386,
1247
1322
1248
  /* X86_TUNE_USE_SAHF */
1323
  /* X86_TUNE_USE_SAHF */
1249
  m_PPRO | m_K6_GEODE | m_K8 | m_AMDFAM10 | m_PENT4
1324
  m_ATOM | m_PPRO | m_K6_GEODE | m_K8 | m_AMDFAM10 | m_PENT4
1250
  | m_NOCONA | m_CORE2 | m_GENERIC,
1325
  | m_NOCONA | m_CORE2 | m_GENERIC,
1251
1326
1252
  /* X86_TUNE_MOVX: Enable to zero extend integer registers to avoid
1327
  /* X86_TUNE_MOVX: Enable to zero extend integer registers to avoid
1253
     partial dependencies.  */
1328
     partial dependencies.  */
1254
  m_AMD_MULTIPLE | m_PPRO | m_PENT4 | m_NOCONA
1329
  m_AMD_MULTIPLE | m_ATOM | m_PPRO | m_PENT4 | m_NOCONA
1255
  | m_CORE2 | m_GENERIC | m_GEODE /* m_386 | m_K6 */,
1330
  | m_CORE2 | m_GENERIC | m_GEODE /* m_386 | m_K6 */,
1256
1331
1257
  /* X86_TUNE_PARTIAL_REG_STALL: We probably ought to watch for partial
1332
  /* X86_TUNE_PARTIAL_REG_STALL: We probably ought to watch for partial
Lines 1271-1283 static unsigned int initial_ix86_tune_features[X86_TUNE_LAST] = { Link Here
1271
  m_386 | m_486 | m_K6_GEODE,
1346
  m_386 | m_486 | m_K6_GEODE,
1272
1347
1273
  /* X86_TUNE_USE_SIMODE_FIOP */
1348
  /* X86_TUNE_USE_SIMODE_FIOP */
1274
  ~(m_PPRO | m_AMD_MULTIPLE | m_PENT | m_CORE2 | m_GENERIC),
1349
  ~(m_PPRO | m_AMD_MULTIPLE | m_PENT | m_ATOM | m_CORE2 | m_GENERIC),
1275
1350
1276
  /* X86_TUNE_USE_MOV0 */
1351
  /* X86_TUNE_USE_MOV0 */
1277
  m_K6,
1352
  m_K6,
1278
1353
1279
  /* X86_TUNE_USE_CLTD */
1354
  /* X86_TUNE_USE_CLTD */
1280
  ~(m_PENT | m_K6 | m_CORE2 | m_GENERIC),
1355
  ~(m_PENT | m_ATOM | m_K6 | m_CORE2 | m_GENERIC),
1281
1356
1282
  /* X86_TUNE_USE_XCHGB: Use xchgb %rh,%rl instead of rolw/rorw $8,rx.  */
1357
  /* X86_TUNE_USE_XCHGB: Use xchgb %rh,%rl instead of rolw/rorw $8,rx.  */
1283
  m_PENT4,
1358
  m_PENT4,
Lines 1292-1299 static unsigned int initial_ix86_tune_features[X86_TUNE_LAST] = { Link Here
1292
  ~(m_PENT | m_PPRO),
1367
  ~(m_PENT | m_PPRO),
1293
1368
1294
  /* X86_TUNE_PROMOTE_QIMODE */
1369
  /* X86_TUNE_PROMOTE_QIMODE */
1295
  m_K6_GEODE | m_PENT | m_386 | m_486 | m_AMD_MULTIPLE | m_CORE2
1370
  m_K6_GEODE | m_PENT | m_ATOM | m_386 | m_486 | m_AMD_MULTIPLE
1296
  | m_GENERIC /* | m_PENT4 ? */,
1371
  | m_CORE2 | m_GENERIC /* | m_PENT4 ? */,
1297
1372
1298
  /* X86_TUNE_FAST_PREFIX */
1373
  /* X86_TUNE_FAST_PREFIX */
1299
  ~(m_PENT | m_486 | m_386),
1374
  ~(m_PENT | m_486 | m_386),
Lines 1317-1342 static unsigned int initial_ix86_tune_features[X86_TUNE_LAST] = { Link Here
1317
  m_PPRO,
1392
  m_PPRO,
1318
1393
1319
  /* X86_TUNE_ADD_ESP_4: Enable if add/sub is preferred over 1/2 push/pop.  */
1394
  /* X86_TUNE_ADD_ESP_4: Enable if add/sub is preferred over 1/2 push/pop.  */
1320
  m_AMD_MULTIPLE | m_K6_GEODE | m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC,
1395
  m_ATOM | m_AMD_MULTIPLE | m_K6_GEODE | m_PENT4 | m_NOCONA
1396
  | m_CORE2 | m_GENERIC,
1321
1397
1322
  /* X86_TUNE_ADD_ESP_8 */
1398
  /* X86_TUNE_ADD_ESP_8 */
1323
  m_AMD_MULTIPLE | m_PPRO | m_K6_GEODE | m_386
1399
  m_AMD_MULTIPLE | m_ATOM | m_PPRO | m_K6_GEODE | m_386
1324
  | m_486 | m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC,
1400
  | m_486 | m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC,
1325
1401
1326
  /* X86_TUNE_SUB_ESP_4 */
1402
  /* X86_TUNE_SUB_ESP_4 */
1327
  m_AMD_MULTIPLE | m_PPRO | m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC,
1403
  m_AMD_MULTIPLE | m_ATOM | m_PPRO | m_PENT4 | m_NOCONA | m_CORE2
1404
  | m_GENERIC,
1328
1405
1329
  /* X86_TUNE_SUB_ESP_8 */
1406
  /* X86_TUNE_SUB_ESP_8 */
1330
  m_AMD_MULTIPLE | m_PPRO | m_386 | m_486
1407
  m_AMD_MULTIPLE | m_ATOM | m_PPRO | m_386 | m_486
1331
  | m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC,
1408
  | m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC,
1332
1409
1333
  /* X86_TUNE_INTEGER_DFMODE_MOVES: Enable if integer moves are preferred
1410
  /* X86_TUNE_INTEGER_DFMODE_MOVES: Enable if integer moves are preferred
1334
     for DFmode copies */
1411
     for DFmode copies */
1335
  ~(m_AMD_MULTIPLE | m_PENT4 | m_NOCONA | m_PPRO | m_CORE2
1412
  ~(m_AMD_MULTIPLE | m_ATOM | m_PENT4 | m_NOCONA | m_PPRO | m_CORE2
1336
    | m_GENERIC | m_GEODE),
1413
    | m_GENERIC | m_GEODE),
1337
1414
1338
  /* X86_TUNE_PARTIAL_REG_DEPENDENCY */
1415
  /* X86_TUNE_PARTIAL_REG_DEPENDENCY */
1339
  m_AMD_MULTIPLE | m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC,
1416
  m_AMD_MULTIPLE | m_ATOM | m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC,
1340
1417
1341
  /* X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY: In the Generic model we have a
1418
  /* X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY: In the Generic model we have a
1342
     conflict here in between PPro/Pentium4 based chips that thread 128bit
1419
     conflict here in between PPro/Pentium4 based chips that thread 128bit
Lines 1347-1353 static unsigned int initial_ix86_tune_features[X86_TUNE_LAST] = { Link Here
1347
     shows that disabling this option on P4 brings over 20% SPECfp regression,
1424
     shows that disabling this option on P4 brings over 20% SPECfp regression,
1348
     while enabling it on K8 brings roughly 2.4% regression that can be partly
1425
     while enabling it on K8 brings roughly 2.4% regression that can be partly
1349
     masked by careful scheduling of moves.  */
1426
     masked by careful scheduling of moves.  */
1350
  m_PENT4 | m_NOCONA | m_PPRO | m_CORE2 | m_GENERIC | m_AMDFAM10,
1427
  m_ATOM | m_PENT4 | m_NOCONA | m_PPRO | m_CORE2 | m_GENERIC
1428
  | m_AMDFAM10,
1351
1429
1352
  /* X86_TUNE_SSE_UNALIGNED_MOVE_OPTIMAL */
1430
  /* X86_TUNE_SSE_UNALIGNED_MOVE_OPTIMAL */
1353
  m_AMDFAM10,
1431
  m_AMDFAM10,
Lines 1365-1377 static unsigned int initial_ix86_tune_features[X86_TUNE_LAST] = { Link Here
1365
  m_PPRO | m_PENT4 | m_NOCONA,
1443
  m_PPRO | m_PENT4 | m_NOCONA,
1366
1444
1367
  /* X86_TUNE_MEMORY_MISMATCH_STALL */
1445
  /* X86_TUNE_MEMORY_MISMATCH_STALL */
1368
  m_AMD_MULTIPLE | m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC,
1446
  m_AMD_MULTIPLE | m_ATOM | m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC,
1369
1447
1370
  /* X86_TUNE_PROLOGUE_USING_MOVE */
1448
  /* X86_TUNE_PROLOGUE_USING_MOVE */
1371
  m_ATHLON_K8 | m_PPRO | m_CORE2 | m_GENERIC,
1449
  m_ATHLON_K8 | m_ATOM | m_PPRO | m_CORE2 | m_GENERIC,
1372
1450
1373
  /* X86_TUNE_EPILOGUE_USING_MOVE */
1451
  /* X86_TUNE_EPILOGUE_USING_MOVE */
1374
  m_ATHLON_K8 | m_PPRO | m_CORE2 | m_GENERIC,
1452
  m_ATHLON_K8 | m_ATOM | m_PPRO | m_CORE2 | m_GENERIC,
1375
1453
1376
  /* X86_TUNE_SHIFT1 */
1454
  /* X86_TUNE_SHIFT1 */
1377
  ~m_486,
1455
  ~m_486,
Lines 1380-1408 static unsigned int initial_ix86_tune_features[X86_TUNE_LAST] = { Link Here
1380
  m_AMD_MULTIPLE,
1458
  m_AMD_MULTIPLE,
1381
1459
1382
  /* X86_TUNE_INTER_UNIT_MOVES */
1460
  /* X86_TUNE_INTER_UNIT_MOVES */
1383
  ~(m_AMD_MULTIPLE | m_GENERIC),
1461
  ~(m_AMD_MULTIPLE | m_ATOM | m_GENERIC),
1384
1462
1385
  /* X86_TUNE_INTER_UNIT_CONVERSIONS */
1463
  /* X86_TUNE_INTER_UNIT_CONVERSIONS */
1386
  ~(m_AMDFAM10),
1464
  ~(m_AMDFAM10),
1387
1465
1388
  /* X86_TUNE_FOUR_JUMP_LIMIT: Some CPU cores are not able to predict more
1466
  /* X86_TUNE_FOUR_JUMP_LIMIT: Some CPU cores are not able to predict more
1389
     than 4 branch instructions in the 16 byte window.  */
1467
     than 4 branch instructions in the 16 byte window.  */
1390
  m_PPRO | m_AMD_MULTIPLE | m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC,
1468
  m_ATOM | m_PPRO | m_AMD_MULTIPLE | m_PENT4 | m_NOCONA | m_CORE2
1469
  | m_GENERIC,
1391
1470
1392
  /* X86_TUNE_SCHEDULE */
1471
  /* X86_TUNE_SCHEDULE */
1393
  m_PPRO | m_AMD_MULTIPLE | m_K6_GEODE | m_PENT | m_CORE2 | m_GENERIC,
1472
  m_PPRO | m_AMD_MULTIPLE | m_K6_GEODE | m_PENT | m_ATOM | m_CORE2
1473
  | m_GENERIC,
1394
1474
1395
  /* X86_TUNE_USE_BT */
1475
  /* X86_TUNE_USE_BT */
1396
  m_AMD_MULTIPLE | m_CORE2 | m_GENERIC,
1476
  m_AMD_MULTIPLE | m_ATOM | m_CORE2 | m_GENERIC,
1397
1477
1398
  /* X86_TUNE_USE_INCDEC */
1478
  /* X86_TUNE_USE_INCDEC */
1399
  ~(m_PENT4 | m_NOCONA | m_GENERIC),
1479
  ~(m_PENT4 | m_NOCONA | m_GENERIC | m_ATOM),
1400
1480
1401
  /* X86_TUNE_PAD_RETURNS */
1481
  /* X86_TUNE_PAD_RETURNS */
1402
  m_AMD_MULTIPLE | m_CORE2 | m_GENERIC,
1482
  m_AMD_MULTIPLE | m_CORE2 | m_GENERIC,
1403
1483
1404
  /* X86_TUNE_EXT_80387_CONSTANTS */
1484
  /* X86_TUNE_EXT_80387_CONSTANTS */
1405
  m_K6_GEODE | m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_PPRO | m_CORE2 | m_GENERIC,
1485
  m_K6_GEODE | m_ATHLON_K8 | m_ATOM | m_PENT4 | m_NOCONA | m_PPRO
1486
  | m_CORE2 | m_GENERIC,
1406
1487
1407
  /* X86_TUNE_SHORTEN_X87_SSE */
1488
  /* X86_TUNE_SHORTEN_X87_SSE */
1408
  ~m_K8,
1489
  ~m_K8,
Lines 1447-1452 static unsigned int initial_ix86_tune_features[X86_TUNE_LAST] = { Link Here
1447
     with a subsequent conditional jump instruction into a single
1528
     with a subsequent conditional jump instruction into a single
1448
     compare-and-branch uop.  */
1529
     compare-and-branch uop.  */
1449
  m_CORE2,
1530
  m_CORE2,
1531
1532
  /* X86_TUNE_OPT_AGU: Optimize for Address Generation Unit. This flag
1533
     will impact LEA instruction selection. */
1534
  m_ATOM,
1450
};
1535
};
1451
1536
1452
/* Feature tests against the various architecture variations.  */
1537
/* Feature tests against the various architecture variations.  */
Lines 1472-1481 static unsigned int initial_ix86_arch_features[X86_ARCH_LAST] = { Link Here
1472
};
1557
};
1473
1558
1474
static const unsigned int x86_accumulate_outgoing_args
1559
static const unsigned int x86_accumulate_outgoing_args
1475
  = m_AMD_MULTIPLE | m_PENT4 | m_NOCONA | m_PPRO | m_CORE2 | m_GENERIC;
1560
  = m_AMD_MULTIPLE | m_ATOM | m_PENT4 | m_NOCONA | m_PPRO | m_CORE2
1561
    | m_GENERIC;
1476
1562
1477
static const unsigned int x86_arch_always_fancy_math_387
1563
static const unsigned int x86_arch_always_fancy_math_387
1478
  = m_PENT | m_PPRO | m_AMD_MULTIPLE | m_PENT4
1564
  = m_PENT | m_ATOM | m_PPRO | m_AMD_MULTIPLE | m_PENT4
1479
    | m_NOCONA | m_CORE2 | m_GENERIC;
1565
    | m_NOCONA | m_CORE2 | m_GENERIC;
1480
1566
1481
static enum stringop_alg stringop_alg = no_stringop;
1567
static enum stringop_alg stringop_alg = no_stringop;
Lines 1958-1964 static const struct ptt processor_target_table[PROCESSOR_max] = Link Here
1958
  {&core2_cost, 16, 10, 16, 10, 16},
2044
  {&core2_cost, 16, 10, 16, 10, 16},
1959
  {&generic32_cost, 16, 7, 16, 7, 16},
2045
  {&generic32_cost, 16, 7, 16, 7, 16},
1960
  {&generic64_cost, 16, 10, 16, 10, 16},
2046
  {&generic64_cost, 16, 10, 16, 10, 16},
1961
  {&amdfam10_cost, 32, 24, 32, 7, 32}
2047
  {&amdfam10_cost, 32, 24, 32, 7, 32},
2048
  {&atom_cost, 16, 7, 16, 7, 16}
1962
};
2049
};
1963
2050
1964
static const char *const cpu_names[TARGET_CPU_DEFAULT_max] =
2051
static const char *const cpu_names[TARGET_CPU_DEFAULT_max] =
Lines 1976-1981 static const char *const cpu_names[TARGET_CPU_DEFAULT_max] = Link Here
1976
  "prescott",
2063
  "prescott",
1977
  "nocona",
2064
  "nocona",
1978
  "core2",
2065
  "core2",
2066
  "atom",
1979
  "geode",
2067
  "geode",
1980
  "k6",
2068
  "k6",
1981
  "k6-2",
2069
  "k6-2",
Lines 2534-2539 override_options (bool main_args_p) Link Here
2534
      {"core2", PROCESSOR_CORE2, CPU_CORE2,
2622
      {"core2", PROCESSOR_CORE2, CPU_CORE2,
2535
	PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
2623
	PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
2536
	| PTA_SSSE3 | PTA_CX16},
2624
	| PTA_SSSE3 | PTA_CX16},
2625
      {"atom", PROCESSOR_ATOM, CPU_ATOM,
2626
	PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
2627
	| PTA_SSSE3 | PTA_CX16},
2537
      {"geode", PROCESSOR_GEODE, CPU_GEODE,
2628
      {"geode", PROCESSOR_GEODE, CPU_GEODE,
2538
	PTA_MMX | PTA_3DNOW | PTA_3DNOW_A |PTA_PREFETCH_SSE},
2629
	PTA_MMX | PTA_3DNOW | PTA_3DNOW_A |PTA_PREFETCH_SSE},
2539
      {"k6", PROCESSOR_K6, CPU_K6, PTA_MMX},
2630
      {"k6", PROCESSOR_K6, CPU_K6, PTA_MMX},
Lines 19026-19031 ix86_issue_rate (void) Link Here
19026
  switch (ix86_tune)
19117
  switch (ix86_tune)
19027
    {
19118
    {
19028
    case PROCESSOR_PENTIUM:
19119
    case PROCESSOR_PENTIUM:
19120
    case PROCESSOR_ATOM:
19029
    case PROCESSOR_K6:
19121
    case PROCESSOR_K6:
19030
      return 2;
19122
      return 2;
19031
19123
Lines 19226-19231 ix86_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost) Link Here
19226
    case PROCESSOR_ATHLON:
19318
    case PROCESSOR_ATHLON:
19227
    case PROCESSOR_K8:
19319
    case PROCESSOR_K8:
19228
    case PROCESSOR_AMDFAM10:
19320
    case PROCESSOR_AMDFAM10:
19321
    case PROCESSOR_ATOM:
19229
    case PROCESSOR_GENERIC32:
19322
    case PROCESSOR_GENERIC32:
19230
    case PROCESSOR_GENERIC64:
19323
    case PROCESSOR_GENERIC64:
19231
      memory = get_attr_memory (insn);
19324
      memory = get_attr_memory (insn);
(-)a/gcc/config/i386/i386.h (+5 lines)
Lines 231-236 extern const struct processor_costs ix86_size_cost; Link Here
231
#define TARGET_GENERIC64 (ix86_tune == PROCESSOR_GENERIC64)
231
#define TARGET_GENERIC64 (ix86_tune == PROCESSOR_GENERIC64)
232
#define TARGET_GENERIC (TARGET_GENERIC32 || TARGET_GENERIC64)
232
#define TARGET_GENERIC (TARGET_GENERIC32 || TARGET_GENERIC64)
233
#define TARGET_AMDFAM10 (ix86_tune == PROCESSOR_AMDFAM10)
233
#define TARGET_AMDFAM10 (ix86_tune == PROCESSOR_AMDFAM10)
234
#define TARGET_ATOM (ix86_tune == PROCESSOR_ATOM)
234
235
235
/* Feature tests against the various tunings.  */
236
/* Feature tests against the various tunings.  */
236
enum ix86_tune_indices {
237
enum ix86_tune_indices {
Lines 295-300 enum ix86_tune_indices { Link Here
295
  X86_TUNE_USE_VECTOR_FP_CONVERTS,
296
  X86_TUNE_USE_VECTOR_FP_CONVERTS,
296
  X86_TUNE_USE_VECTOR_CONVERTS,
297
  X86_TUNE_USE_VECTOR_CONVERTS,
297
  X86_TUNE_FUSE_CMP_AND_BRANCH,
298
  X86_TUNE_FUSE_CMP_AND_BRANCH,
299
  X86_TUNE_OPT_AGU,
298
300
299
  X86_TUNE_LAST
301
  X86_TUNE_LAST
300
};
302
};
Lines 382-387 extern unsigned char ix86_tune_features[X86_TUNE_LAST]; Link Here
382
	ix86_tune_features[X86_TUNE_USE_VECTOR_CONVERTS]
384
	ix86_tune_features[X86_TUNE_USE_VECTOR_CONVERTS]
383
#define TARGET_FUSE_CMP_AND_BRANCH \
385
#define TARGET_FUSE_CMP_AND_BRANCH \
384
	ix86_tune_features[X86_TUNE_FUSE_CMP_AND_BRANCH]
386
	ix86_tune_features[X86_TUNE_FUSE_CMP_AND_BRANCH]
387
#define TARGET_OPT_AGU ix86_tune_features[X86_TUNE_OPT_AGU]
385
388
386
/* Feature tests against the various architecture variations.  */
389
/* Feature tests against the various architecture variations.  */
387
enum ix86_arch_indices {
390
enum ix86_arch_indices {
Lines 567-572 enum target_cpu_default Link Here
567
  TARGET_CPU_DEFAULT_prescott,
570
  TARGET_CPU_DEFAULT_prescott,
568
  TARGET_CPU_DEFAULT_nocona,
571
  TARGET_CPU_DEFAULT_nocona,
569
  TARGET_CPU_DEFAULT_core2,
572
  TARGET_CPU_DEFAULT_core2,
573
  TARGET_CPU_DEFAULT_atom,
570
574
571
  TARGET_CPU_DEFAULT_geode,
575
  TARGET_CPU_DEFAULT_geode,
572
  TARGET_CPU_DEFAULT_k6,
576
  TARGET_CPU_DEFAULT_k6,
Lines 2272-2277 enum processor_type Link Here
2272
  PROCESSOR_GENERIC32,
2276
  PROCESSOR_GENERIC32,
2273
  PROCESSOR_GENERIC64,
2277
  PROCESSOR_GENERIC64,
2274
  PROCESSOR_AMDFAM10,
2278
  PROCESSOR_AMDFAM10,
2279
  PROCESSOR_ATOM,
2275
  PROCESSOR_max
2280
  PROCESSOR_max
2276
};
2281
};
2277
2282
(-)a/gcc/config/i386/i386.md (-15 / +57 lines)
Lines 316-322 Link Here
316
316
317
317
318
;; Processor type.
318
;; Processor type.
319
(define_attr "cpu" "none,pentium,pentiumpro,geode,k6,athlon,k8,core2,
319
(define_attr "cpu" "none,pentium,pentiumpro,geode,k6,athlon,k8,core2,atom,
320
		    generic64,amdfam10"
320
		    generic64,amdfam10"
321
  (const (symbol_ref "ix86_schedule")))
321
  (const (symbol_ref "ix86_schedule")))
322
322
Lines 612-617 Link Here
612
(define_attr "i387_cw" "trunc,floor,ceil,mask_pm,uninitialized,any"
612
(define_attr "i387_cw" "trunc,floor,ceil,mask_pm,uninitialized,any"
613
  (const_string "any"))
613
  (const_string "any"))
614
614
615
;; Define attribute to classify add/sub insns that consumes carry flag (CF)
616
(define_attr "use_carry" "0,1" (const_string "0"))
617
618
;; Define attribute to indicate unaligned ssemov insns
619
(define_attr "movu" "0,1" (const_string "0"))
620
615
;; Describe a user's asm statement.
621
;; Describe a user's asm statement.
616
(define_asm_attributes
622
(define_asm_attributes
617
  [(set_attr "length" "128")
623
  [(set_attr "length" "128")
Lines 727-732 Link Here
727
(include "k6.md")
733
(include "k6.md")
728
(include "athlon.md")
734
(include "athlon.md")
729
(include "geode.md")
735
(include "geode.md")
736
(include "atom.md")
730
737
731
738
732
;; Operand and operator predicates and constraints
739
;; Operand and operator predicates and constraints
Lines 5816-5821 Link Here
5816
  "TARGET_64BIT && ix86_binary_operator_ok (PLUS, DImode, operands)"
5823
  "TARGET_64BIT && ix86_binary_operator_ok (PLUS, DImode, operands)"
5817
  "adc{q}\t{%2, %0|%0, %2}"
5824
  "adc{q}\t{%2, %0|%0, %2}"
5818
  [(set_attr "type" "alu")
5825
  [(set_attr "type" "alu")
5826
   (set_attr "use_carry" "1")
5819
   (set_attr "pent_pair" "pu")
5827
   (set_attr "pent_pair" "pu")
5820
   (set_attr "mode" "DI")])
5828
   (set_attr "mode" "DI")])
5821
5829
Lines 5890-5895 Link Here
5890
  "ix86_binary_operator_ok (PLUS, QImode, operands)"
5898
  "ix86_binary_operator_ok (PLUS, QImode, operands)"
5891
  "adc{b}\t{%2, %0|%0, %2}"
5899
  "adc{b}\t{%2, %0|%0, %2}"
5892
  [(set_attr "type" "alu")
5900
  [(set_attr "type" "alu")
5901
   (set_attr "use_carry" "1")
5893
   (set_attr "pent_pair" "pu")
5902
   (set_attr "pent_pair" "pu")
5894
   (set_attr "mode" "QI")])
5903
   (set_attr "mode" "QI")])
5895
5904
Lines 5902-5907 Link Here
5902
  "ix86_binary_operator_ok (PLUS, HImode, operands)"
5911
  "ix86_binary_operator_ok (PLUS, HImode, operands)"
5903
  "adc{w}\t{%2, %0|%0, %2}"
5912
  "adc{w}\t{%2, %0|%0, %2}"
5904
  [(set_attr "type" "alu")
5913
  [(set_attr "type" "alu")
5914
   (set_attr "use_carry" "1")
5905
   (set_attr "pent_pair" "pu")
5915
   (set_attr "pent_pair" "pu")
5906
   (set_attr "mode" "HI")])
5916
   (set_attr "mode" "HI")])
5907
5917
Lines 5914-5919 Link Here
5914
  "ix86_binary_operator_ok (PLUS, SImode, operands)"
5924
  "ix86_binary_operator_ok (PLUS, SImode, operands)"
5915
  "adc{l}\t{%2, %0|%0, %2}"
5925
  "adc{l}\t{%2, %0|%0, %2}"
5916
  [(set_attr "type" "alu")
5926
  [(set_attr "type" "alu")
5927
   (set_attr "use_carry" "1")
5917
   (set_attr "pent_pair" "pu")
5928
   (set_attr "pent_pair" "pu")
5918
   (set_attr "mode" "SI")])
5929
   (set_attr "mode" "SI")])
5919
5930
Lines 5927-5932 Link Here
5927
  "TARGET_64BIT && ix86_binary_operator_ok (PLUS, SImode, operands)"
5938
  "TARGET_64BIT && ix86_binary_operator_ok (PLUS, SImode, operands)"
5928
  "adc{l}\t{%2, %k0|%k0, %2}"
5939
  "adc{l}\t{%2, %k0|%k0, %2}"
5929
  [(set_attr "type" "alu")
5940
  [(set_attr "type" "alu")
5941
   (set_attr "use_carry" "1")
5930
   (set_attr "pent_pair" "pu")
5942
   (set_attr "pent_pair" "pu")
5931
   (set_attr "mode" "SI")])
5943
   (set_attr "mode" "SI")])
5932
5944
Lines 6156-6164 Link Here
6156
   (set_attr "mode" "SI")])
6168
   (set_attr "mode" "SI")])
6157
6169
6158
(define_insn "*adddi_1_rex64"
6170
(define_insn "*adddi_1_rex64"
6159
  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,rm,r")
6171
  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,rm,r,r")
6160
	(plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0,r")
6172
	(plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0,r,r")
6161
		 (match_operand:DI 2 "x86_64_general_operand" "rme,re,le")))
6173
		 (match_operand:DI 2 "x86_64_general_operand" "rme,re,0,le")))
6162
   (clobber (reg:CC FLAGS_REG))]
6174
   (clobber (reg:CC FLAGS_REG))]
6163
  "TARGET_64BIT && ix86_binary_operator_ok (PLUS, DImode, operands)"
6175
  "TARGET_64BIT && ix86_binary_operator_ok (PLUS, DImode, operands)"
6164
{
6176
{
Lines 6179-6184 Link Here
6179
	}
6191
	}
6180
6192
6181
    default:
6193
    default:
6194
      /* Use add as much as possible to replace lea for AGU optimization. */
6195
      if (which_alternative == 2 && TARGET_OPT_AGU)
6196
        return "add{q}\t{%1, %0|%0, %1}";
6197
        
6182
      gcc_assert (rtx_equal_p (operands[0], operands[1]));
6198
      gcc_assert (rtx_equal_p (operands[0], operands[1]));
6183
6199
6184
      /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
6200
      /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
Lines 6197-6204 Link Here
6197
    }
6213
    }
6198
}
6214
}
6199
  [(set (attr "type")
6215
  [(set (attr "type")
6200
     (cond [(eq_attr "alternative" "2")
6216
     (cond [(and (eq_attr "alternative" "2") 
6217
                 (eq (symbol_ref "TARGET_OPT_AGU") (const_int 0)))
6201
	      (const_string "lea")
6218
	      (const_string "lea")
6219
            (eq_attr "alternative" "3")
6220
              (const_string "lea")
6202
	    ; Current assemblers are broken and do not allow @GOTOFF in
6221
	    ; Current assemblers are broken and do not allow @GOTOFF in
6203
	    ; ought but a memory context.
6222
	    ; ought but a memory context.
6204
	    (match_operand:DI 2 "pic_symbolic_operand" "")
6223
	    (match_operand:DI 2 "pic_symbolic_operand" "")
Lines 6215-6222 Link Here
6215
	(plus:DI (match_operand:DI 1 "register_operand" "")
6234
	(plus:DI (match_operand:DI 1 "register_operand" "")
6216
		 (match_operand:DI 2 "x86_64_nonmemory_operand" "")))
6235
		 (match_operand:DI 2 "x86_64_nonmemory_operand" "")))
6217
   (clobber (reg:CC FLAGS_REG))]
6236
   (clobber (reg:CC FLAGS_REG))]
6218
  "TARGET_64BIT && reload_completed
6237
  "TARGET_64BIT && reload_completed"
6219
   && true_regnum (operands[0]) != true_regnum (operands[1])"
6220
  [(set (match_dup 0)
6238
  [(set (match_dup 0)
6221
	(plus:DI (match_dup 1)
6239
	(plus:DI (match_dup 1)
6222
		 (match_dup 2)))]
6240
		 (match_dup 2)))]
Lines 6420-6428 Link Here
6420
6438
6421
6439
6422
(define_insn "*addsi_1"
6440
(define_insn "*addsi_1"
6423
  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,rm,r")
6441
  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,rm,r,r")
6424
	(plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0,r")
6442
	(plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0,r,r")
6425
		 (match_operand:SI 2 "general_operand" "g,ri,li")))
6443
		 (match_operand:SI 2 "general_operand" "g,ri,0,li")))
6426
   (clobber (reg:CC FLAGS_REG))]
6444
   (clobber (reg:CC FLAGS_REG))]
6427
  "ix86_binary_operator_ok (PLUS, SImode, operands)"
6445
  "ix86_binary_operator_ok (PLUS, SImode, operands)"
6428
{
6446
{
Lines 6443-6448 Link Here
6443
	}
6461
	}
6444
6462
6445
    default:
6463
    default:
6464
      /* Use add as much as possible to replace lea for AGU optimization. */
6465
      if (which_alternative == 2 && TARGET_OPT_AGU)
6466
        return "add{l}\t{%1, %0|%0, %1}";
6467
6446
      gcc_assert (rtx_equal_p (operands[0], operands[1]));
6468
      gcc_assert (rtx_equal_p (operands[0], operands[1]));
6447
6469
6448
      /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
6470
      /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
Lines 6459-6465 Link Here
6459
    }
6481
    }
6460
}
6482
}
6461
  [(set (attr "type")
6483
  [(set (attr "type")
6462
     (cond [(eq_attr "alternative" "2")
6484
     (cond [(and (eq_attr "alternative" "2") 
6485
                 (eq (symbol_ref "TARGET_OPT_AGU") (const_int 0)))
6486
               (const_string "lea")
6487
            (eq_attr "alternative" "3")
6463
	      (const_string "lea")
6488
	      (const_string "lea")
6464
	    ; Current assemblers are broken and do not allow @GOTOFF in
6489
	    ; Current assemblers are broken and do not allow @GOTOFF in
6465
	    ; ought but a memory context.
6490
	    ; ought but a memory context.
Lines 6477-6484 Link Here
6477
	(plus (match_operand 1 "register_operand" "")
6502
	(plus (match_operand 1 "register_operand" "")
6478
              (match_operand 2 "nonmemory_operand" "")))
6503
              (match_operand 2 "nonmemory_operand" "")))
6479
   (clobber (reg:CC FLAGS_REG))]
6504
   (clobber (reg:CC FLAGS_REG))]
6480
  "reload_completed
6505
  "reload_completed"
6481
   && true_regnum (operands[0]) != true_regnum (operands[1])"
6482
  [(const_int 0)]
6506
  [(const_int 0)]
6483
{
6507
{
6484
  rtx pat;
6508
  rtx pat;
Lines 7580-7585 Link Here
7580
  "TARGET_64BIT && ix86_binary_operator_ok (MINUS, DImode, operands)"
7604
  "TARGET_64BIT && ix86_binary_operator_ok (MINUS, DImode, operands)"
7581
  "sbb{q}\t{%2, %0|%0, %2}"
7605
  "sbb{q}\t{%2, %0|%0, %2}"
7582
  [(set_attr "type" "alu")
7606
  [(set_attr "type" "alu")
7607
   (set_attr "use_carry" "1")
7583
   (set_attr "pent_pair" "pu")
7608
   (set_attr "pent_pair" "pu")
7584
   (set_attr "mode" "DI")])
7609
   (set_attr "mode" "DI")])
7585
7610
Lines 7628-7633 Link Here
7628
  "ix86_binary_operator_ok (MINUS, QImode, operands)"
7653
  "ix86_binary_operator_ok (MINUS, QImode, operands)"
7629
  "sbb{b}\t{%2, %0|%0, %2}"
7654
  "sbb{b}\t{%2, %0|%0, %2}"
7630
  [(set_attr "type" "alu")
7655
  [(set_attr "type" "alu")
7656
   (set_attr "use_carry" "1")
7631
   (set_attr "pent_pair" "pu")
7657
   (set_attr "pent_pair" "pu")
7632
   (set_attr "mode" "QI")])
7658
   (set_attr "mode" "QI")])
7633
7659
Lines 7640-7645 Link Here
7640
  "ix86_binary_operator_ok (MINUS, HImode, operands)"
7666
  "ix86_binary_operator_ok (MINUS, HImode, operands)"
7641
  "sbb{w}\t{%2, %0|%0, %2}"
7667
  "sbb{w}\t{%2, %0|%0, %2}"
7642
  [(set_attr "type" "alu")
7668
  [(set_attr "type" "alu")
7669
   (set_attr "use_carry" "1")
7643
   (set_attr "pent_pair" "pu")
7670
   (set_attr "pent_pair" "pu")
7644
   (set_attr "mode" "HI")])
7671
   (set_attr "mode" "HI")])
7645
7672
Lines 7652-7657 Link Here
7652
  "ix86_binary_operator_ok (MINUS, SImode, operands)"
7679
  "ix86_binary_operator_ok (MINUS, SImode, operands)"
7653
  "sbb{l}\t{%2, %0|%0, %2}"
7680
  "sbb{l}\t{%2, %0|%0, %2}"
7654
  [(set_attr "type" "alu")
7681
  [(set_attr "type" "alu")
7682
   (set_attr "use_carry" "1")
7655
   (set_attr "pent_pair" "pu")
7683
   (set_attr "pent_pair" "pu")
7656
   (set_attr "mode" "SI")])
7684
   (set_attr "mode" "SI")])
7657
7685
Lines 15275-15280 Link Here
15275
  "reload_completed"
15303
  "reload_completed"
15276
  "ret"
15304
  "ret"
15277
  [(set_attr "length" "1")
15305
  [(set_attr "length" "1")
15306
   (set_attr "atom_unit" "jeu")
15278
   (set_attr "length_immediate" "0")
15307
   (set_attr "length_immediate" "0")
15279
   (set_attr "modrm" "0")])
15308
   (set_attr "modrm" "0")])
15280
15309
Lines 15287-15292 Link Here
15287
  "reload_completed"
15316
  "reload_completed"
15288
  "rep\;ret"
15317
  "rep\;ret"
15289
  [(set_attr "length" "1")
15318
  [(set_attr "length" "1")
15319
   (set_attr "atom_unit" "jeu")
15290
   (set_attr "length_immediate" "0")
15320
   (set_attr "length_immediate" "0")
15291
   (set_attr "prefix_rep" "1")
15321
   (set_attr "prefix_rep" "1")
15292
   (set_attr "modrm" "0")])
15322
   (set_attr "modrm" "0")])
Lines 15297-15302 Link Here
15297
  "reload_completed"
15327
  "reload_completed"
15298
  "ret\t%0"
15328
  "ret\t%0"
15299
  [(set_attr "length" "3")
15329
  [(set_attr "length" "3")
15330
   (set_attr "atom_unit" "jeu")
15300
   (set_attr "length_immediate" "2")
15331
   (set_attr "length_immediate" "2")
15301
   (set_attr "modrm" "0")])
15332
   (set_attr "modrm" "0")])
15302
15333
Lines 16418-16423 Link Here
16418
  "TARGET_SSE_MATH"
16449
  "TARGET_SSE_MATH"
16419
  "%vrcpss\t{%1, %d0|%d0, %1}"
16450
  "%vrcpss\t{%1, %d0|%d0, %1}"
16420
  [(set_attr "type" "sse")
16451
  [(set_attr "type" "sse")
16452
   (set_attr "atom_sse_attr" "rcp")
16421
   (set_attr "prefix" "maybe_vex")
16453
   (set_attr "prefix" "maybe_vex")
16422
   (set_attr "mode" "SF")])
16454
   (set_attr "mode" "SF")])
16423
16455
Lines 16777-16782 Link Here
16777
  "TARGET_SSE_MATH"
16809
  "TARGET_SSE_MATH"
16778
  "%vrsqrtss\t{%1, %d0|%d0, %1}"
16810
  "%vrsqrtss\t{%1, %d0|%d0, %1}"
16779
  [(set_attr "type" "sse")
16811
  [(set_attr "type" "sse")
16812
   (set_attr "atom_sse_attr" "rcp")
16780
   (set_attr "prefix" "maybe_vex")
16813
   (set_attr "prefix" "maybe_vex")
16781
   (set_attr "mode" "SF")])
16814
   (set_attr "mode" "SF")])
16782
16815
Lines 16797-16802 Link Here
16797
  "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH"
16830
  "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH"
16798
  "%vsqrts<ssemodefsuffix>\t{%1, %d0|%d0, %1}"
16831
  "%vsqrts<ssemodefsuffix>\t{%1, %d0|%d0, %1}"
16799
  [(set_attr "type" "sse")
16832
  [(set_attr "type" "sse")
16833
   (set_attr "atom_sse_attr" "sqrt")
16800
   (set_attr "prefix" "maybe_vex")
16834
   (set_attr "prefix" "maybe_vex")
16801
   (set_attr "mode" "<MODE>")
16835
   (set_attr "mode" "<MODE>")
16802
   (set_attr "athlon_decode" "*")
16836
   (set_attr "athlon_decode" "*")
Lines 19850-19855 Link Here
19850
  ; Since we don't have the proper number of operands for an alu insn,
19884
  ; Since we don't have the proper number of operands for an alu insn,
19851
  ; fill in all the blanks.
19885
  ; fill in all the blanks.
19852
  [(set_attr "type" "alu")
19886
  [(set_attr "type" "alu")
19887
   (set_attr "use_carry" "1")
19853
   (set_attr "pent_pair" "pu")
19888
   (set_attr "pent_pair" "pu")
19854
   (set_attr "memory" "none")
19889
   (set_attr "memory" "none")
19855
   (set_attr "imm_disp" "false")
19890
   (set_attr "imm_disp" "false")
Lines 19865-19870 Link Here
19865
  ""
19900
  ""
19866
  "sbb{q}\t%0, %0"
19901
  "sbb{q}\t%0, %0"
19867
  [(set_attr "type" "alu")
19902
  [(set_attr "type" "alu")
19903
   (set_attr "use_carry" "1")
19868
   (set_attr "pent_pair" "pu")
19904
   (set_attr "pent_pair" "pu")
19869
   (set_attr "memory" "none")
19905
   (set_attr "memory" "none")
19870
   (set_attr "imm_disp" "false")
19906
   (set_attr "imm_disp" "false")
Lines 19908-19913 Link Here
19908
  ; Since we don't have the proper number of operands for an alu insn,
19944
  ; Since we don't have the proper number of operands for an alu insn,
19909
  ; fill in all the blanks.
19945
  ; fill in all the blanks.
19910
  [(set_attr "type" "alu")
19946
  [(set_attr "type" "alu")
19947
   (set_attr "use_carry" "1")
19911
   (set_attr "pent_pair" "pu")
19948
   (set_attr "pent_pair" "pu")
19912
   (set_attr "memory" "none")
19949
   (set_attr "memory" "none")
19913
   (set_attr "imm_disp" "false")
19950
   (set_attr "imm_disp" "false")
Lines 19923-19928 Link Here
19923
  ""
19960
  ""
19924
  "sbb{l}\t%0, %0"
19961
  "sbb{l}\t%0, %0"
19925
  [(set_attr "type" "alu")
19962
  [(set_attr "type" "alu")
19963
   (set_attr "use_carry" "1")
19926
   (set_attr "pent_pair" "pu")
19964
   (set_attr "pent_pair" "pu")
19927
   (set_attr "memory" "none")
19965
   (set_attr "memory" "none")
19928
   (set_attr "imm_disp" "false")
19966
   (set_attr "imm_disp" "false")
Lines 20255-20261 Link Here
20255
    }
20293
    }
20256
}
20294
}
20257
  [(set (attr "type")
20295
  [(set (attr "type")
20258
	(cond [(eq_attr "alternative" "0")
20296
	(cond [(and (eq_attr "alternative" "0") 
20297
	            (eq (symbol_ref "TARGET_OPT_AGU") (const_int 0)))
20259
		 (const_string "alu")
20298
		 (const_string "alu")
20260
	       (match_operand:SI 2 "const0_operand" "")
20299
	       (match_operand:SI 2 "const0_operand" "")
20261
		 (const_string "imov")
20300
		 (const_string "imov")
Lines 20298-20304 Link Here
20298
    }
20337
    }
20299
}
20338
}
20300
  [(set (attr "type")
20339
  [(set (attr "type")
20301
	(cond [(eq_attr "alternative" "0")
20340
	(cond [(and (eq_attr "alternative" "0")
20341
	            (eq (symbol_ref "TARGET_OPT_AGU") (const_int 0)))
20302
		 (const_string "alu")
20342
		 (const_string "alu")
20303
	       (match_operand:DI 2 "const0_operand" "")
20343
	       (match_operand:DI 2 "const0_operand" "")
20304
		 (const_string "imov")
20344
		 (const_string "imov")
Lines 21790-21795 Link Here
21790
  return patterns[locality];
21830
  return patterns[locality];
21791
}
21831
}
21792
  [(set_attr "type" "sse")
21832
  [(set_attr "type" "sse")
21833
   (set_attr "atom_sse_attr" "prefetch")
21793
   (set_attr "memory" "none")])
21834
   (set_attr "memory" "none")])
21794
21835
21795
(define_insn "*prefetch_sse_rex"
21836
(define_insn "*prefetch_sse_rex"
Lines 21808-21813 Link Here
21808
  return patterns[locality];
21849
  return patterns[locality];
21809
}
21850
}
21810
  [(set_attr "type" "sse")
21851
  [(set_attr "type" "sse")
21852
   (set_attr "atom_sse_attr" "prefetch")
21811
   (set_attr "memory" "none")])
21853
   (set_attr "memory" "none")])
21812
21854
21813
(define_insn "*prefetch_3dnow"
21855
(define_insn "*prefetch_3dnow"
(-)a/gcc/config/i386/sse.md (-9 / +47 lines)
Lines 338-343 Link Here
338
   && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
338
   && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
339
  "vmovup<avxmodesuffixf2c>\t{%1, %0|%0, %1}"
339
  "vmovup<avxmodesuffixf2c>\t{%1, %0|%0, %1}"
340
  [(set_attr "type" "ssemov")
340
  [(set_attr "type" "ssemov")
341
   (set_attr "movu" "1")
341
   (set_attr "prefix" "vex")
342
   (set_attr "prefix" "vex")
342
   (set_attr "mode" "<MODE>")])
343
   (set_attr "mode" "<MODE>")])
343
344
Lines 363-368 Link Here
363
   && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
364
   && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
364
  "movup<ssemodesuffixf2c>\t{%1, %0|%0, %1}"
365
  "movup<ssemodesuffixf2c>\t{%1, %0|%0, %1}"
365
  [(set_attr "type" "ssemov")
366
  [(set_attr "type" "ssemov")
367
   (set_attr "movu" "1")
366
   (set_attr "mode" "<MODE>")])
368
   (set_attr "mode" "<MODE>")])
367
369
368
(define_insn "avx_movdqu<avxmodesuffix>"
370
(define_insn "avx_movdqu<avxmodesuffix>"
Lines 373-378 Link Here
373
  "TARGET_AVX && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
375
  "TARGET_AVX && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
374
  "vmovdqu\t{%1, %0|%0, %1}"
376
  "vmovdqu\t{%1, %0|%0, %1}"
375
  [(set_attr "type" "ssemov")
377
  [(set_attr "type" "ssemov")
378
   (set_attr "movu" "1")
376
   (set_attr "prefix" "vex")
379
   (set_attr "prefix" "vex")
377
   (set_attr "mode" "<avxvecmode>")])
380
   (set_attr "mode" "<avxvecmode>")])
378
381
Lines 383-388 Link Here
383
  "TARGET_SSE2 && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
386
  "TARGET_SSE2 && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
384
  "movdqu\t{%1, %0|%0, %1}"
387
  "movdqu\t{%1, %0|%0, %1}"
385
  [(set_attr "type" "ssemov")
388
  [(set_attr "type" "ssemov")
389
   (set_attr "movu" "1")
386
   (set_attr "prefix_data16" "1")
390
   (set_attr "prefix_data16" "1")
387
   (set_attr "mode" "TI")])
391
   (set_attr "mode" "TI")])
388
392
Lines 424-430 Link Here
424
		     UNSPEC_MOVNT))]
428
		     UNSPEC_MOVNT))]
425
  "TARGET_SSE2"
429
  "TARGET_SSE2"
426
  "movntdq\t{%1, %0|%0, %1}"
430
  "movntdq\t{%1, %0|%0, %1}"
427
  [(set_attr "type" "ssecvt")
431
  [(set_attr "type" "ssemov")
428
   (set_attr "prefix_data16" "1")
432
   (set_attr "prefix_data16" "1")
429
   (set_attr "mode" "TI")])
433
   (set_attr "mode" "TI")])
430
434
Lines 434-440 Link Here
434
		   UNSPEC_MOVNT))]
438
		   UNSPEC_MOVNT))]
435
  "TARGET_SSE2"
439
  "TARGET_SSE2"
436
  "movnti\t{%1, %0|%0, %1}"
440
  "movnti\t{%1, %0|%0, %1}"
437
  [(set_attr "type" "ssecvt")
441
  [(set_attr "type" "ssemov")
438
   (set_attr "mode" "V2DF")])
442
   (set_attr "mode" "V2DF")])
439
443
440
(define_insn "avx_lddqu<avxmodesuffix>"
444
(define_insn "avx_lddqu<avxmodesuffix>"
Lines 445-450 Link Here
445
  "TARGET_AVX"
449
  "TARGET_AVX"
446
  "vlddqu\t{%1, %0|%0, %1}"
450
  "vlddqu\t{%1, %0|%0, %1}"
447
  [(set_attr "type" "ssecvt")
451
  [(set_attr "type" "ssecvt")
452
   (set_attr "movu" "1")
448
   (set_attr "prefix" "vex")
453
   (set_attr "prefix" "vex")
449
   (set_attr "mode" "<avxvecmode>")])
454
   (set_attr "mode" "<avxvecmode>")])
450
455
Lines 454-460 Link Here
454
		      UNSPEC_LDDQU))]
459
		      UNSPEC_LDDQU))]
455
  "TARGET_SSE3"
460
  "TARGET_SSE3"
456
  "lddqu\t{%1, %0|%0, %1}"
461
  "lddqu\t{%1, %0|%0, %1}"
457
  [(set_attr "type" "ssecvt")
462
  [(set_attr "type" "ssemov")
463
   (set_attr "movu" "1")
458
   (set_attr "prefix_rep" "1")
464
   (set_attr "prefix_rep" "1")
459
   (set_attr "mode" "TI")])
465
   (set_attr "mode" "TI")])
460
466
Lines 761-766 Link Here
761
  "TARGET_SSE"
767
  "TARGET_SSE"
762
  "%vrcpps\t{%1, %0|%0, %1}"
768
  "%vrcpps\t{%1, %0|%0, %1}"
763
  [(set_attr "type" "sse")
769
  [(set_attr "type" "sse")
770
   (set_attr "atom_sse_attr" "rcp")
764
   (set_attr "prefix" "maybe_vex")
771
   (set_attr "prefix" "maybe_vex")
765
   (set_attr "mode" "V4SF")])
772
   (set_attr "mode" "V4SF")])
766
773
Lines 787-792 Link Here
787
  "TARGET_SSE"
794
  "TARGET_SSE"
788
  "rcpss\t{%1, %0|%0, %1}"
795
  "rcpss\t{%1, %0|%0, %1}"
789
  [(set_attr "type" "sse")
796
  [(set_attr "type" "sse")
797
   (set_attr "atom_sse_attr" "rcp")
790
   (set_attr "mode" "SF")])
798
   (set_attr "mode" "SF")])
791
799
792
(define_expand "sqrtv8sf2"
800
(define_expand "sqrtv8sf2"
Lines 832-837 Link Here
832
  "TARGET_SSE"
840
  "TARGET_SSE"
833
  "%vsqrtps\t{%1, %0|%0, %1}"
841
  "%vsqrtps\t{%1, %0|%0, %1}"
834
  [(set_attr "type" "sse")
842
  [(set_attr "type" "sse")
843
   (set_attr "atom_sse_attr" "sqrt")
835
   (set_attr "prefix" "maybe_vex")
844
   (set_attr "prefix" "maybe_vex")
836
   (set_attr "mode" "V4SF")])
845
   (set_attr "mode" "V4SF")])
837
846
Lines 876-881 Link Here
876
  "SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
885
  "SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
877
  "sqrts<ssemodesuffixf2c>\t{%1, %0|%0, %1}"
886
  "sqrts<ssemodesuffixf2c>\t{%1, %0|%0, %1}"
878
  [(set_attr "type" "sse")
887
  [(set_attr "type" "sse")
888
   (set_attr "atom_sse_attr" "sqrt")
879
   (set_attr "mode" "<ssescalarmode>")])
889
   (set_attr "mode" "<ssescalarmode>")])
880
890
881
(define_expand "rsqrtv8sf2"
891
(define_expand "rsqrtv8sf2"
Lines 1039-1045 Link Here
1039
	 (const_int 1)))]
1049
	 (const_int 1)))]
1040
  "SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
1050
  "SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
1041
  "<maxminfprefix>s<ssemodesuffixf2c>\t{%2, %0|%0, %2}"
1051
  "<maxminfprefix>s<ssemodesuffixf2c>\t{%2, %0|%0, %2}"
1042
  [(set_attr "type" "sse")
1052
  [(set_attr "type" "sseadd")
1043
   (set_attr "mode" "<ssescalarmode>")])
1053
   (set_attr "mode" "<ssescalarmode>")])
1044
1054
1045
;; These versions of the min/max patterns implement exactly the operations
1055
;; These versions of the min/max patterns implement exactly the operations
Lines 1175-1180 Link Here
1175
  "TARGET_SSE3"
1185
  "TARGET_SSE3"
1176
  "addsubpd\t{%2, %0|%0, %2}"
1186
  "addsubpd\t{%2, %0|%0, %2}"
1177
  [(set_attr "type" "sseadd")
1187
  [(set_attr "type" "sseadd")
1188
   (set_attr "atom_unit" "complex")
1178
   (set_attr "mode" "V2DF")])
1189
   (set_attr "mode" "V2DF")])
1179
1190
1180
(define_insn "avx_h<plusminus_insn>v4df3"
1191
(define_insn "avx_h<plusminus_insn>v4df3"
Lines 1298-1303 Link Here
1298
  "TARGET_SSE3"
1309
  "TARGET_SSE3"
1299
  "h<plusminus_mnemonic>ps\t{%2, %0|%0, %2}"
1310
  "h<plusminus_mnemonic>ps\t{%2, %0|%0, %2}"
1300
  [(set_attr "type" "sseadd")
1311
  [(set_attr "type" "sseadd")
1312
   (set_attr "atom_unit" "complex")
1301
   (set_attr "prefix_rep" "1")
1313
   (set_attr "prefix_rep" "1")
1302
   (set_attr "mode" "V4SF")])
1314
   (set_attr "mode" "V4SF")])
1303
1315
Lines 5066-5071 Link Here
5066
  "TARGET_SSE2 && ix86_binary_operator_ok (MULT, V8HImode, operands)"
5078
  "TARGET_SSE2 && ix86_binary_operator_ok (MULT, V8HImode, operands)"
5067
  "pmaddwd\t{%2, %0|%0, %2}"
5079
  "pmaddwd\t{%2, %0|%0, %2}"
5068
  [(set_attr "type" "sseiadd")
5080
  [(set_attr "type" "sseiadd")
5081
   (set_attr "atom_unit" "simul")
5069
   (set_attr "prefix_data16" "1")
5082
   (set_attr "prefix_data16" "1")
5070
   (set_attr "mode" "TI")])
5083
   (set_attr "mode" "TI")])
5071
5084
Lines 7025-7030 Link Here
7025
   movq\t{%H1, %0|%0, %H1}
7038
   movq\t{%H1, %0|%0, %H1}
7026
   mov{q}\t{%H1, %0|%0, %H1}"
7039
   mov{q}\t{%H1, %0|%0, %H1}"
7027
  [(set_attr "type" "ssemov,sseishft,ssemov,imov")
7040
  [(set_attr "type" "ssemov,sseishft,ssemov,imov")
7041
   (set_attr "atom_unit" "*,sishuf,*,*")
7028
   (set_attr "memory" "*,none,*,*")
7042
   (set_attr "memory" "*,none,*,*")
7029
   (set_attr "mode" "V2SF,TI,TI,DI")])
7043
   (set_attr "mode" "V2SF,TI,TI,DI")])
7030
7044
Lines 7057-7062 Link Here
7057
   psrldq\t{$8, %0|%0, 8}
7071
   psrldq\t{$8, %0|%0, 8}
7058
   movq\t{%H1, %0|%0, %H1}"
7072
   movq\t{%H1, %0|%0, %H1}"
7059
  [(set_attr "type" "ssemov,sseishft,ssemov")
7073
  [(set_attr "type" "ssemov,sseishft,ssemov")
7074
   (set_attr "atom_unit" "*,sishuf,*")
7060
   (set_attr "memory" "*,none,*")
7075
   (set_attr "memory" "*,none,*")
7061
   (set_attr "mode" "V2SF,TI,TI")])
7076
   (set_attr "mode" "V2SF,TI,TI")])
7062
7077
Lines 7614-7619 Link Here
7614
  "TARGET_SSE2"
7629
  "TARGET_SSE2"
7615
  "psadbw\t{%2, %0|%0, %2}"
7630
  "psadbw\t{%2, %0|%0, %2}"
7616
  [(set_attr "type" "sseiadd")
7631
  [(set_attr "type" "sseiadd")
7632
   (set_attr "atom_unit" "simul")
7617
   (set_attr "prefix_data16" "1")
7633
   (set_attr "prefix_data16" "1")
7618
   (set_attr "mode" "TI")])
7634
   (set_attr "mode" "TI")])
7619
7635
Lines 7635-7641 Link Here
7635
	  UNSPEC_MOVMSK))]
7651
	  UNSPEC_MOVMSK))]
7636
  "SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
7652
  "SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
7637
  "%vmovmskp<ssemodesuffixf2c>\t{%1, %0|%0, %1}"
7653
  "%vmovmskp<ssemodesuffixf2c>\t{%1, %0|%0, %1}"
7638
  [(set_attr "type" "ssecvt")
7654
  [(set_attr "type" "ssemov")
7639
   (set_attr "prefix" "maybe_vex")
7655
   (set_attr "prefix" "maybe_vex")
7640
   (set_attr "mode" "<MODE>")])
7656
   (set_attr "mode" "<MODE>")])
7641
7657
Lines 7645-7651 Link Here
7645
		   UNSPEC_MOVMSK))]
7661
		   UNSPEC_MOVMSK))]
7646
  "TARGET_SSE2"
7662
  "TARGET_SSE2"
7647
  "%vpmovmskb\t{%1, %0|%0, %1}"
7663
  "%vpmovmskb\t{%1, %0|%0, %1}"
7648
  [(set_attr "type" "ssecvt")
7664
  [(set_attr "type" "ssemov")
7649
   (set_attr "prefix_data16" "1")
7665
   (set_attr "prefix_data16" "1")
7650
   (set_attr "prefix" "maybe_vex")
7666
   (set_attr "prefix" "maybe_vex")
7651
   (set_attr "mode" "SI")])
7667
   (set_attr "mode" "SI")])
Lines 7668-7674 Link Here
7668
  "TARGET_SSE2 && !TARGET_64BIT"
7684
  "TARGET_SSE2 && !TARGET_64BIT"
7669
  ;; @@@ check ordering of operands in intel/nonintel syntax
7685
  ;; @@@ check ordering of operands in intel/nonintel syntax
7670
  "%vmaskmovdqu\t{%2, %1|%1, %2}"
7686
  "%vmaskmovdqu\t{%2, %1|%1, %2}"
7671
  [(set_attr "type" "ssecvt")
7687
  [(set_attr "type" "ssemov")
7672
   (set_attr "prefix_data16" "1")
7688
   (set_attr "prefix_data16" "1")
7673
   (set_attr "prefix" "maybe_vex")
7689
   (set_attr "prefix" "maybe_vex")
7674
   (set_attr "mode" "TI")])
7690
   (set_attr "mode" "TI")])
Lines 7682-7688 Link Here
7682
  "TARGET_SSE2 && TARGET_64BIT"
7698
  "TARGET_SSE2 && TARGET_64BIT"
7683
  ;; @@@ check ordering of operands in intel/nonintel syntax
7699
  ;; @@@ check ordering of operands in intel/nonintel syntax
7684
  "%vmaskmovdqu\t{%2, %1|%1, %2}"
7700
  "%vmaskmovdqu\t{%2, %1|%1, %2}"
7685
  [(set_attr "type" "ssecvt")
7701
  [(set_attr "type" "ssemov")
7686
   (set_attr "prefix_data16" "1")
7702
   (set_attr "prefix_data16" "1")
7687
   (set_attr "prefix" "maybe_vex")
7703
   (set_attr "prefix" "maybe_vex")
7688
   (set_attr "mode" "TI")])
7704
   (set_attr "mode" "TI")])
Lines 7693-7698 Link Here
7693
  "TARGET_SSE"
7709
  "TARGET_SSE"
7694
  "%vldmxcsr\t%0"
7710
  "%vldmxcsr\t%0"
7695
  [(set_attr "type" "sse")
7711
  [(set_attr "type" "sse")
7712
   (set_attr "atom_sse_attr" "mxcsr")
7696
   (set_attr "prefix" "maybe_vex")
7713
   (set_attr "prefix" "maybe_vex")
7697
   (set_attr "memory" "load")])
7714
   (set_attr "memory" "load")])
7698
7715
Lines 7702-7707 Link Here
7702
  "TARGET_SSE"
7719
  "TARGET_SSE"
7703
  "%vstmxcsr\t%0"
7720
  "%vstmxcsr\t%0"
7704
  [(set_attr "type" "sse")
7721
  [(set_attr "type" "sse")
7722
   (set_attr "atom_sse_attr" "mxcsr")
7705
   (set_attr "prefix" "maybe_vex")
7723
   (set_attr "prefix" "maybe_vex")
7706
   (set_attr "memory" "store")])
7724
   (set_attr "memory" "store")])
7707
7725
Lines 7720-7725 Link Here
7720
  "TARGET_SSE || TARGET_3DNOW_A"
7738
  "TARGET_SSE || TARGET_3DNOW_A"
7721
  "sfence"
7739
  "sfence"
7722
  [(set_attr "type" "sse")
7740
  [(set_attr "type" "sse")
7741
   (set_attr "atom_sse_attr" "fence")
7723
   (set_attr "memory" "unknown")])
7742
   (set_attr "memory" "unknown")])
7724
7743
7725
(define_insn "sse2_clflush"
7744
(define_insn "sse2_clflush"
Lines 7728-7733 Link Here
7728
  "TARGET_SSE2"
7747
  "TARGET_SSE2"
7729
  "clflush\t%a0"
7748
  "clflush\t%a0"
7730
  [(set_attr "type" "sse")
7749
  [(set_attr "type" "sse")
7750
   (set_attr "atom_sse_attr" "fence")
7731
   (set_attr "memory" "unknown")])
7751
   (set_attr "memory" "unknown")])
7732
7752
7733
(define_expand "sse2_mfence"
7753
(define_expand "sse2_mfence"
Lines 7745-7750 Link Here
7745
  "TARGET_64BIT || TARGET_SSE2"
7765
  "TARGET_64BIT || TARGET_SSE2"
7746
  "mfence"
7766
  "mfence"
7747
  [(set_attr "type" "sse")
7767
  [(set_attr "type" "sse")
7768
   (set_attr "atom_sse_attr" "fence")
7748
   (set_attr "memory" "unknown")])
7769
   (set_attr "memory" "unknown")])
7749
7770
7750
(define_expand "sse2_lfence"
7771
(define_expand "sse2_lfence"
Lines 7762-7767 Link Here
7762
  "TARGET_SSE2"
7783
  "TARGET_SSE2"
7763
  "lfence"
7784
  "lfence"
7764
  [(set_attr "type" "sse")
7785
  [(set_attr "type" "sse")
7786
   (set_attr "atom_sse_attr" "lfence")
7765
   (set_attr "memory" "unknown")])
7787
   (set_attr "memory" "unknown")])
7766
7788
7767
(define_insn "sse3_mwait"
7789
(define_insn "sse3_mwait"
Lines 7885-7890 Link Here
7885
  "TARGET_SSSE3"
7907
  "TARGET_SSSE3"
7886
  "phaddw\t{%2, %0|%0, %2}"
7908
  "phaddw\t{%2, %0|%0, %2}"
7887
  [(set_attr "type" "sseiadd")
7909
  [(set_attr "type" "sseiadd")
7910
   (set_attr "atom_unit" "complex")
7888
   (set_attr "prefix_data16" "1")
7911
   (set_attr "prefix_data16" "1")
7889
   (set_attr "prefix_extra" "1")
7912
   (set_attr "prefix_extra" "1")
7890
   (set_attr "mode" "TI")])
7913
   (set_attr "mode" "TI")])
Lines 7913-7918 Link Here
7913
  "TARGET_SSSE3"
7936
  "TARGET_SSSE3"
7914
  "phaddw\t{%2, %0|%0, %2}"
7937
  "phaddw\t{%2, %0|%0, %2}"
7915
  [(set_attr "type" "sseiadd")
7938
  [(set_attr "type" "sseiadd")
7939
   (set_attr "atom_unit" "complex")
7916
   (set_attr "prefix_extra" "1")
7940
   (set_attr "prefix_extra" "1")
7917
   (set_attr "mode" "DI")])
7941
   (set_attr "mode" "DI")])
7918
7942
Lines 7967-7972 Link Here
7967
  "TARGET_SSSE3"
7991
  "TARGET_SSSE3"
7968
  "phaddd\t{%2, %0|%0, %2}"
7992
  "phaddd\t{%2, %0|%0, %2}"
7969
  [(set_attr "type" "sseiadd")
7993
  [(set_attr "type" "sseiadd")
7994
   (set_attr "atom_unit" "complex")
7970
   (set_attr "prefix_data16" "1")
7995
   (set_attr "prefix_data16" "1")
7971
   (set_attr "prefix_extra" "1")
7996
   (set_attr "prefix_extra" "1")
7972
   (set_attr "mode" "TI")])
7997
   (set_attr "mode" "TI")])
Lines 7987-7992 Link Here
7987
  "TARGET_SSSE3"
8012
  "TARGET_SSSE3"
7988
  "phaddd\t{%2, %0|%0, %2}"
8013
  "phaddd\t{%2, %0|%0, %2}"
7989
  [(set_attr "type" "sseiadd")
8014
  [(set_attr "type" "sseiadd")
8015
   (set_attr "atom_unit" "complex")
7990
   (set_attr "prefix_extra" "1")
8016
   (set_attr "prefix_extra" "1")
7991
   (set_attr "mode" "DI")])
8017
   (set_attr "mode" "DI")])
7992
8018
Lines 8073-8078 Link Here
8073
  "TARGET_SSSE3"
8099
  "TARGET_SSSE3"
8074
  "phaddsw\t{%2, %0|%0, %2}"
8100
  "phaddsw\t{%2, %0|%0, %2}"
8075
  [(set_attr "type" "sseiadd")
8101
  [(set_attr "type" "sseiadd")
8102
   (set_attr "atom_unit" "complex")
8076
   (set_attr "prefix_data16" "1")
8103
   (set_attr "prefix_data16" "1")
8077
   (set_attr "prefix_extra" "1")
8104
   (set_attr "prefix_extra" "1")
8078
   (set_attr "mode" "TI")])
8105
   (set_attr "mode" "TI")])
Lines 8101-8106 Link Here
8101
  "TARGET_SSSE3"
8128
  "TARGET_SSSE3"
8102
  "phaddsw\t{%2, %0|%0, %2}"
8129
  "phaddsw\t{%2, %0|%0, %2}"
8103
  [(set_attr "type" "sseiadd")
8130
  [(set_attr "type" "sseiadd")
8131
   (set_attr "atom_unit" "complex")
8104
   (set_attr "prefix_extra" "1")
8132
   (set_attr "prefix_extra" "1")
8105
   (set_attr "mode" "DI")])
8133
   (set_attr "mode" "DI")])
8106
8134
Lines 8187-8192 Link Here
8187
  "TARGET_SSSE3"
8215
  "TARGET_SSSE3"
8188
  "phsubw\t{%2, %0|%0, %2}"
8216
  "phsubw\t{%2, %0|%0, %2}"
8189
  [(set_attr "type" "sseiadd")
8217
  [(set_attr "type" "sseiadd")
8218
   (set_attr "atom_unit" "complex")
8190
   (set_attr "prefix_data16" "1")
8219
   (set_attr "prefix_data16" "1")
8191
   (set_attr "prefix_extra" "1")
8220
   (set_attr "prefix_extra" "1")
8192
   (set_attr "mode" "TI")])
8221
   (set_attr "mode" "TI")])
Lines 8215-8220 Link Here
8215
  "TARGET_SSSE3"
8244
  "TARGET_SSSE3"
8216
  "phsubw\t{%2, %0|%0, %2}"
8245
  "phsubw\t{%2, %0|%0, %2}"
8217
  [(set_attr "type" "sseiadd")
8246
  [(set_attr "type" "sseiadd")
8247
   (set_attr "atom_unit" "complex")
8218
   (set_attr "prefix_extra" "1")
8248
   (set_attr "prefix_extra" "1")
8219
   (set_attr "mode" "DI")])
8249
   (set_attr "mode" "DI")])
8220
8250
Lines 8269-8274 Link Here
8269
  "TARGET_SSSE3"
8299
  "TARGET_SSSE3"
8270
  "phsubd\t{%2, %0|%0, %2}"
8300
  "phsubd\t{%2, %0|%0, %2}"
8271
  [(set_attr "type" "sseiadd")
8301
  [(set_attr "type" "sseiadd")
8302
   (set_attr "atom_unit" "complex")
8272
   (set_attr "prefix_data16" "1")
8303
   (set_attr "prefix_data16" "1")
8273
   (set_attr "prefix_extra" "1")
8304
   (set_attr "prefix_extra" "1")
8274
   (set_attr "mode" "TI")])
8305
   (set_attr "mode" "TI")])
Lines 8289-8294 Link Here
8289
  "TARGET_SSSE3"
8320
  "TARGET_SSSE3"
8290
  "phsubd\t{%2, %0|%0, %2}"
8321
  "phsubd\t{%2, %0|%0, %2}"
8291
  [(set_attr "type" "sseiadd")
8322
  [(set_attr "type" "sseiadd")
8323
   (set_attr "atom_unit" "complex")
8292
   (set_attr "prefix_extra" "1")
8324
   (set_attr "prefix_extra" "1")
8293
   (set_attr "mode" "DI")])
8325
   (set_attr "mode" "DI")])
8294
8326
Lines 8375-8380 Link Here
8375
  "TARGET_SSSE3"
8407
  "TARGET_SSSE3"
8376
  "phsubsw\t{%2, %0|%0, %2}"
8408
  "phsubsw\t{%2, %0|%0, %2}"
8377
  [(set_attr "type" "sseiadd")
8409
  [(set_attr "type" "sseiadd")
8410
   (set_attr "atom_unit" "complex")
8378
   (set_attr "prefix_data16" "1")
8411
   (set_attr "prefix_data16" "1")
8379
   (set_attr "prefix_extra" "1")
8412
   (set_attr "prefix_extra" "1")
8380
   (set_attr "mode" "TI")])
8413
   (set_attr "mode" "TI")])
Lines 8403-8408 Link Here
8403
  "TARGET_SSSE3"
8436
  "TARGET_SSSE3"
8404
  "phsubsw\t{%2, %0|%0, %2}"
8437
  "phsubsw\t{%2, %0|%0, %2}"
8405
  [(set_attr "type" "sseiadd")
8438
  [(set_attr "type" "sseiadd")
8439
   (set_attr "atom_unit" "complex")
8406
   (set_attr "prefix_extra" "1")
8440
   (set_attr "prefix_extra" "1")
8407
   (set_attr "mode" "DI")])
8441
   (set_attr "mode" "DI")])
8408
8442
Lines 8509-8514 Link Here
8509
  "TARGET_SSSE3"
8543
  "TARGET_SSSE3"
8510
  "pmaddubsw\t{%2, %0|%0, %2}"
8544
  "pmaddubsw\t{%2, %0|%0, %2}"
8511
  [(set_attr "type" "sseiadd")
8545
  [(set_attr "type" "sseiadd")
8546
   (set_attr "atom_unit" "simul")
8512
   (set_attr "prefix_data16" "1")
8547
   (set_attr "prefix_data16" "1")
8513
   (set_attr "prefix_extra" "1")
8548
   (set_attr "prefix_extra" "1")
8514
   (set_attr "mode" "TI")])
8549
   (set_attr "mode" "TI")])
Lines 8547-8552 Link Here
8547
  "TARGET_SSSE3"
8582
  "TARGET_SSSE3"
8548
  "pmaddubsw\t{%2, %0|%0, %2}"
8583
  "pmaddubsw\t{%2, %0|%0, %2}"
8549
  [(set_attr "type" "sseiadd")
8584
  [(set_attr "type" "sseiadd")
8585
   (set_attr "atom_unit" "simul")
8550
   (set_attr "prefix_extra" "1")
8586
   (set_attr "prefix_extra" "1")
8551
   (set_attr "mode" "DI")])
8587
   (set_attr "mode" "DI")])
8552
8588
Lines 8754-8759 Link Here
8754
  return "palignr\t{%3, %2, %0|%0, %2, %3}";
8790
  return "palignr\t{%3, %2, %0|%0, %2, %3}";
8755
}
8791
}
8756
  [(set_attr "type" "sseishft")
8792
  [(set_attr "type" "sseishft")
8793
   (set_attr "atom_unit" "sishuf")
8757
   (set_attr "prefix_data16" "1")
8794
   (set_attr "prefix_data16" "1")
8758
   (set_attr "prefix_extra" "1")
8795
   (set_attr "prefix_extra" "1")
8759
   (set_attr "mode" "TI")])
8796
   (set_attr "mode" "TI")])
Lines 8770-8775 Link Here
8770
  return "palignr\t{%3, %2, %0|%0, %2, %3}";
8807
  return "palignr\t{%3, %2, %0|%0, %2, %3}";
8771
}
8808
}
8772
  [(set_attr "type" "sseishft")
8809
  [(set_attr "type" "sseishft")
8810
   (set_attr "atom_unit" "sishuf")
8773
   (set_attr "prefix_extra" "1")
8811
   (set_attr "prefix_extra" "1")
8774
   (set_attr "mode" "DI")])
8812
   (set_attr "mode" "DI")])
8775
8813
Lines 8956-8962 Link Here
8956
		     UNSPEC_MOVNTDQA))]
8994
		     UNSPEC_MOVNTDQA))]
8957
  "TARGET_SSE4_1"
8995
  "TARGET_SSE4_1"
8958
  "%vmovntdqa\t{%1, %0|%0, %1}"
8996
  "%vmovntdqa\t{%1, %0|%0, %1}"
8959
  [(set_attr "type" "ssecvt")
8997
  [(set_attr "type" "ssemov")
8960
   (set_attr "prefix_extra" "1")
8998
   (set_attr "prefix_extra" "1")
8961
   (set_attr "prefix" "maybe_vex")
8999
   (set_attr "prefix" "maybe_vex")
8962
   (set_attr "mode" "TI")])
9000
   (set_attr "mode" "TI")])

Return to bug 262603