gem5  v22.1.0.0
instructions.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2021 Advanced Micro Devices, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  *
15  * 3. Neither the name of the copyright holder nor the names of its
16  * contributors may be used to endorse or promote products derived from this
17  * software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
33 
34 #include <cmath>
35 
37 #include "debug/GCN3.hh"
38 #include "debug/GPUSync.hh"
39 #include "gpu-compute/shader.hh"
40 
41 namespace gem5
42 {
43 
44 namespace Gcn3ISA
45 {
46 
48  : Inst_SOP2(iFmt, "s_add_u32")
49  {
50  setFlag(ALU);
51  } // Inst_SOP2__S_ADD_U32
52 
54  {
55  } // ~Inst_SOP2__S_ADD_U32
56 
57  // D.u = S0.u + S1.u;
58  // SCC = (S0.u + S1.u >= 0x100000000ULL ? 1 : 0) is an unsigned
59  // overflow/carry-out.
60  void
62  {
63  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
64  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
65  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
66  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
67 
68  src0.read();
69  src1.read();
70 
71  sdst = src0.rawData() + src1.rawData();
72  scc = ((ScalarRegU64)src0.rawData() + (ScalarRegU64)src1.rawData())
73  >= 0x100000000ULL ? 1 : 0;
74 
75  sdst.write();
76  scc.write();
77  }
78 
80  : Inst_SOP2(iFmt, "s_sub_u32")
81  {
82  setFlag(ALU);
83  } // Inst_SOP2__S_SUB_U32
84 
86  {
87  } // ~Inst_SOP2__S_SUB_U32
88 
89  // D.u = S0.u - S1.u;
90  // SCC = (S1.u > S0.u ? 1 : 0) is an unsigned overflow or carry-out.
91  void
93  {
94  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
95  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
96  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
97  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
98 
99  src0.read();
100  src1.read();
101 
102  sdst = src0.rawData() - src1.rawData();
103  scc = (src1.rawData() > src0.rawData()) ? 1 : 0;
104 
105  sdst.write();
106  scc.write();
107  }
108 
110  : Inst_SOP2(iFmt, "s_add_i32")
111  {
112  setFlag(ALU);
113  } // Inst_SOP2__S_ADD_I32
114 
116  {
117  } // ~Inst_SOP2__S_ADD_I32
118 
119  // D.i = S0.i + S1.i;
120  // SCC = (S0.u[31] == S1.u[31] && S0.u[31] != D.u[31]) is a signed
121  // overflow.
122  void
124  {
125  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
126  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
127  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
128  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
129 
130  src0.read();
131  src1.read();
132 
133  sdst = src0.rawData() + src1.rawData();
134  scc = (bits(src0.rawData(), 31) == bits(src1.rawData(), 31)
135  && bits(src0.rawData(), 31) != bits(sdst.rawData(), 31))
136  ? 1 : 0;
137 
138  sdst.write();
139  scc.write();
140  }
141 
143  : Inst_SOP2(iFmt, "s_sub_i32")
144  {
145  setFlag(ALU);
146  } // Inst_SOP2__S_SUB_I32
147 
149  {
150  } // ~Inst_SOP2__S_SUB_I32
151 
152  // D.i = S0.i - S1.i;
153  // SCC = (S0.u[31] != S1.u[31] && S0.u[31] != D.u[31]) is a signed
154  // overflow.
155  void
157  {
158  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
159  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
160  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
161  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
162 
163  src0.read();
164  src1.read();
165 
166  sdst = src0.rawData() - src1.rawData();
167  scc = (bits(src0.rawData(), 31) != bits(src1.rawData(), 31)
168  && bits(src0.rawData(), 31) != bits(sdst.rawData(), 31)) ? 1 : 0;
169 
170  sdst.write();
171  scc.write();
172  }
173 
175  : Inst_SOP2(iFmt, "s_addc_u32")
176  {
177  setFlag(ALU);
178  } // Inst_SOP2__S_ADDC_U32
179 
181  {
182  } // ~Inst_SOP2__S_ADDC_U32
183 
184  // D.u = S0.u + S1.u + SCC;
185  // SCC = (S0.u + S1.u + SCC >= 0x100000000ULL ? 1 : 0) is an unsigned
186  // overflow.
187  void
189  {
190  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
191  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
192  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
193  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
194 
195  src0.read();
196  src1.read();
197  scc.read();
198 
199  sdst = src0.rawData() + src1.rawData() + scc.rawData();
200  scc = ((ScalarRegU64)src0.rawData() + (ScalarRegU64)src1.rawData()
201  + (ScalarRegU64)scc.rawData()) >= 0x100000000ULL ? 1 : 0;
202 
203  sdst.write();
204  scc.write();
205  }
206 
208  : Inst_SOP2(iFmt, "s_subb_u32")
209  {
210  setFlag(ALU);
211  } // Inst_SOP2__S_SUBB_U32
212 
214  {
215  } // ~Inst_SOP2__S_SUBB_U32
216 
217  // D.u = S0.u - S1.u - SCC;
218  // SCC = (S1.u + SCC > S0.u ? 1 : 0) is an unsigned overflow.
219  void
221  {
222  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
223  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
224  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
225  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
226 
227  src0.read();
228  src1.read();
229  scc.read();
230 
231  sdst = src0.rawData() - src1.rawData() - scc.rawData();
232  scc = (src1.rawData() + scc.rawData()) > src0.rawData() ? 1 : 0;
233 
234  sdst.write();
235  scc.write();
236  }
237 
239  : Inst_SOP2(iFmt, "s_min_i32")
240  {
241  setFlag(ALU);
242  } // Inst_SOP2__S_MIN_I32
243 
245  {
246  } // ~Inst_SOP2__S_MIN_I32
247 
248  // D.i = (S0.i < S1.i) ? S0.i : S1.i;
249  // SCC = 1 if S0 is chosen as the minimum value.
250  void
252  {
253  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
254  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
255  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
256  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
257 
258  src0.read();
259  src1.read();
260 
261  sdst = std::min(src0.rawData(), src1.rawData());
262  scc = (src0.rawData() < src1.rawData()) ? 1 : 0;
263 
264  sdst.write();
265  scc.write();
266  }
267 
269  : Inst_SOP2(iFmt, "s_min_u32")
270  {
271  setFlag(ALU);
272  } // Inst_SOP2__S_MIN_U32
273 
275  {
276  } // ~Inst_SOP2__S_MIN_U32
277 
278  // D.u = (S0.u < S1.u) ? S0.u : S1.u;
279  // SCC = 1 if S0 is chosen as the minimum value.
280  void
282  {
283  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
284  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
285  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
286  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
287 
288  src0.read();
289  src1.read();
290 
291  sdst = std::min(src0.rawData(), src1.rawData());
292  scc = (src0.rawData() < src1.rawData()) ? 1 : 0;
293 
294  sdst.write();
295  scc.write();
296  }
297 
299  : Inst_SOP2(iFmt, "s_max_i32")
300  {
301  setFlag(ALU);
302  } // Inst_SOP2__S_MAX_I32
303 
305  {
306  } // ~Inst_SOP2__S_MAX_I32
307 
308  // D.i = (S0.i > S1.i) ? S0.i : S1.i;
309  // SCC = 1 if S0 is chosen as the maximum value.
310  void
312  {
313  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
314  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
315  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
316  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
317 
318  src0.read();
319  src1.read();
320 
321  sdst = std::max(src0.rawData(), src1.rawData());
322  scc = (src0.rawData() > src1.rawData()) ? 1 : 0;
323 
324  sdst.write();
325  scc.write();
326  }
327 
329  : Inst_SOP2(iFmt, "s_max_u32")
330  {
331  setFlag(ALU);
332  } // Inst_SOP2__S_MAX_U32
333 
335  {
336  } // ~Inst_SOP2__S_MAX_U32
337 
338  // D.u = (S0.u > S1.u) ? S0.u : S1.u;
339  // SCC = 1 if S0 is chosen as the maximum value.
340  void
342  {
343  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
344  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
345  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
346  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
347 
348  src0.read();
349  src1.read();
350 
351  sdst = std::max(src0.rawData(), src1.rawData());
352  scc = (src0.rawData() > src1.rawData()) ? 1 : 0;
353 
354  sdst.write();
355  scc.write();
356  }
357 
359  : Inst_SOP2(iFmt, "s_cselect_b32")
360  {
361  setFlag(ALU);
362  } // Inst_SOP2__S_CSELECT_B32
363 
365  {
366  } // ~Inst_SOP2__S_CSELECT_B32
367 
368  // D.u = SCC ? S0.u : S1.u (conditional select).
369  void
371  {
372  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
373  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
374  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
375  ConstScalarOperandU32 scc(gpuDynInst, REG_SCC);
376 
377  src0.read();
378  src1.read();
379  scc.read();
380 
381  sdst = scc.rawData() ? src0.rawData() : src1.rawData();
382 
383  sdst.write();
384  }
385 
387  : Inst_SOP2(iFmt, "s_cselect_b64")
388  {
389  setFlag(ALU);
390  } // Inst_SOP2__S_CSELECT_B64
391 
393  {
394  } // ~Inst_SOP2__S_CSELECT_B64
395 
396  // D.u64 = SCC ? S0.u64 : S1.u64 (conditional select).
397  void
399  {
400  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
401  ConstScalarOperandU64 src1(gpuDynInst, instData.SSRC1);
402  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
403  ConstScalarOperandU32 scc(gpuDynInst, REG_SCC);
404 
405  src0.read();
406  src1.read();
407  scc.read();
408 
409  sdst = scc.rawData() ? src0.rawData() : src1.rawData();
410 
411  sdst.write();
412  }
413 
415  : Inst_SOP2(iFmt, "s_and_b32")
416  {
417  setFlag(ALU);
418  } // Inst_SOP2__S_AND_B32
419 
421  {
422  } // ~Inst_SOP2__S_AND_B32
423 
424  // D.u = S0.u & S1.u;
425  // SCC = 1 if result is non-zero.
426  void
428  {
429  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
430  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
431  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
432  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
433 
434  src0.read();
435  src1.read();
436 
437  sdst = src0.rawData() & src1.rawData();
438  scc = sdst.rawData() ? 1 : 0;
439 
440  sdst.write();
441  scc.write();
442  }
443 
445  : Inst_SOP2(iFmt, "s_and_b64")
446  {
447  setFlag(ALU);
448  } // Inst_SOP2__S_AND_B64
449 
451  {
452  } // ~Inst_SOP2__S_AND_B64
453 
454  // D.u64 = S0.u64 & S1.u64;
455  // SCC = 1 if result is non-zero.
456  void
458  {
459  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
460  ConstScalarOperandU64 src1(gpuDynInst, instData.SSRC1);
461  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
462  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
463 
464  src0.read();
465  src1.read();
466 
467  sdst = src0.rawData() & src1.rawData();
468  scc = sdst.rawData() ? 1 : 0;
469 
470  sdst.write();
471  scc.write();
472  }
473 
475  : Inst_SOP2(iFmt, "s_or_b32")
476  {
477  setFlag(ALU);
478  } // Inst_SOP2__S_OR_B32
479 
481  {
482  } // ~Inst_SOP2__S_OR_B32
483 
484  // D.u = S0.u | S1.u;
485  // SCC = 1 if result is non-zero.
486  void
488  {
489  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
490  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
491  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
492  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
493 
494  src0.read();
495  src1.read();
496 
497  sdst = src0.rawData() | src1.rawData();
498  scc = sdst.rawData() ? 1 : 0;
499 
500  sdst.write();
501  scc.write();
502  }
503 
505  : Inst_SOP2(iFmt, "s_or_b64")
506  {
507  setFlag(ALU);
508  } // Inst_SOP2__S_OR_B64
509 
511  {
512  } // ~Inst_SOP2__S_OR_B64
513 
514  // D.u64 = S0.u64 | S1.u64;
515  // SCC = 1 if result is non-zero.
516  void
518  {
519  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
520  ConstScalarOperandU64 src1(gpuDynInst, instData.SSRC1);
521  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
522  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
523 
524  src0.read();
525  src1.read();
526 
527  sdst = src0.rawData() | src1.rawData();
528  scc = sdst.rawData() ? 1 : 0;
529 
530  sdst.write();
531  scc.write();
532  }
533 
535  : Inst_SOP2(iFmt, "s_xor_b32")
536  {
537  setFlag(ALU);
538  } // Inst_SOP2__S_XOR_B32
539 
541  {
542  } // ~Inst_SOP2__S_XOR_B32
543 
544  // D.u = S0.u ^ S1.u;
545  // SCC = 1 if result is non-zero.
546  void
548  {
549  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
550  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
551  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
552  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
553 
554  src0.read();
555  src1.read();
556 
557  sdst = src0.rawData() ^ src1.rawData();
558  scc = sdst.rawData() ? 1 : 0;
559 
560  sdst.write();
561  scc.write();
562  }
563 
565  : Inst_SOP2(iFmt, "s_xor_b64")
566  {
567  setFlag(ALU);
568  } // Inst_SOP2__S_XOR_B64
569 
571  {
572  } // ~Inst_SOP2__S_XOR_B64
573 
574  // D.u64 = S0.u64 ^ S1.u64;
575  // SCC = 1 if result is non-zero.
576  void
578  {
579  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
580  ConstScalarOperandU64 src1(gpuDynInst, instData.SSRC1);
581  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
582  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
583 
584  src0.read();
585  src1.read();
586 
587  sdst = src0.rawData() ^ src1.rawData();
588  scc = sdst.rawData() ? 1 : 0;
589 
590  sdst.write();
591  scc.write();
592  }
593 
595  : Inst_SOP2(iFmt, "s_andn2_b32")
596  {
597  setFlag(ALU);
598  } // Inst_SOP2__S_ANDN2_B32
599 
601  {
602  } // ~Inst_SOP2__S_ANDN2_B32
603 
604  // D.u = S0.u & ~S1.u;
605  // SCC = 1 if result is non-zero.
606  void
608  {
609  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
610  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
611  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
612  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
613 
614  src0.read();
615  src1.read();
616 
617  sdst = src0.rawData() &~ src1.rawData();
618  scc = sdst.rawData() ? 1 : 0;
619 
620  sdst.write();
621  scc.write();
622  }
623 
625  : Inst_SOP2(iFmt, "s_andn2_b64")
626  {
627  setFlag(ALU);
628  } // Inst_SOP2__S_ANDN2_B64
629 
631  {
632  } // ~Inst_SOP2__S_ANDN2_B64
633 
634  // D.u64 = S0.u64 & ~S1.u64;
635  // SCC = 1 if result is non-zero.
636  void
638  {
639  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
640  ConstScalarOperandU64 src1(gpuDynInst, instData.SSRC1);
641  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
642  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
643 
644  src0.read();
645  src1.read();
646 
647  sdst = src0.rawData() &~ src1.rawData();
648  scc = sdst.rawData() ? 1 : 0;
649 
650  sdst.write();
651  scc.write();
652  }
653 
655  : Inst_SOP2(iFmt, "s_orn2_b32")
656  {
657  setFlag(ALU);
658  } // Inst_SOP2__S_ORN2_B32
659 
661  {
662  } // ~Inst_SOP2__S_ORN2_B32
663 
664  // D.u = S0.u | ~S1.u;
665  // SCC = 1 if result is non-zero.
666  void
668  {
669  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
670  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
671  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
672  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
673 
674  src0.read();
675  src1.read();
676 
677  sdst = src0.rawData() |~ src1.rawData();
678  scc = sdst.rawData() ? 1 : 0;
679 
680  sdst.write();
681  scc.write();
682  }
683 
685  : Inst_SOP2(iFmt, "s_orn2_b64")
686  {
687  setFlag(ALU);
688  } // Inst_SOP2__S_ORN2_B64
689 
691  {
692  } // ~Inst_SOP2__S_ORN2_B64
693 
694  // D.u64 = S0.u64 | ~S1.u64;
695  // SCC = 1 if result is non-zero.
696  void
698  {
699  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
700  ConstScalarOperandU64 src1(gpuDynInst, instData.SSRC1);
701  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
702  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
703 
704  src0.read();
705  src1.read();
706 
707  sdst = src0.rawData() |~ src1.rawData();
708  scc = sdst.rawData() ? 1 : 0;
709 
710  sdst.write();
711  scc.write();
712  }
713 
715  : Inst_SOP2(iFmt, "s_nand_b32")
716  {
717  setFlag(ALU);
718  } // Inst_SOP2__S_NAND_B32
719 
721  {
722  } // ~Inst_SOP2__S_NAND_B32
723 
724  // D.u = ~(S0.u & S1.u);
725  // SCC = 1 if result is non-zero.
726  void
728  {
729  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
730  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
731  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
732  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
733 
734  src0.read();
735  src1.read();
736 
737  sdst = ~(src0.rawData() & src1.rawData());
738  scc = sdst.rawData() ? 1 : 0;
739 
740  sdst.write();
741  scc.write();
742  }
743 
745  : Inst_SOP2(iFmt, "s_nand_b64")
746  {
747  setFlag(ALU);
748  } // Inst_SOP2__S_NAND_B64
749 
751  {
752  } // ~Inst_SOP2__S_NAND_B64
753 
754  // D.u64 = ~(S0.u64 & S1.u64);
755  // SCC = 1 if result is non-zero.
756  void
758  {
759  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
760  ConstScalarOperandU64 src1(gpuDynInst, instData.SSRC1);
761  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
762  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
763 
764  src0.read();
765  src1.read();
766 
767  sdst = ~(src0.rawData() & src1.rawData());
768  scc = sdst.rawData() ? 1 : 0;
769 
770  sdst.write();
771  scc.write();
772  }
773 
775  : Inst_SOP2(iFmt, "s_nor_b32")
776  {
777  setFlag(ALU);
778  } // Inst_SOP2__S_NOR_B32
779 
781  {
782  } // ~Inst_SOP2__S_NOR_B32
783 
784  // D.u = ~(S0.u | S1.u);
785  // SCC = 1 if result is non-zero.
786  void
788  {
789  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
790  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
791  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
792  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
793 
794  src0.read();
795  src1.read();
796 
797  sdst = ~(src0.rawData() | src1.rawData());
798  scc = sdst.rawData() ? 1 : 0;
799 
800  sdst.write();
801  scc.write();
802  }
803 
805  : Inst_SOP2(iFmt, "s_nor_b64")
806  {
807  setFlag(ALU);
808  } // Inst_SOP2__S_NOR_B64
809 
811  {
812  } // ~Inst_SOP2__S_NOR_B64
813 
814  // D.u64 = ~(S0.u64 | S1.u64);
815  // SCC = 1 if result is non-zero.
816  void
818  {
819  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
820  ConstScalarOperandU64 src1(gpuDynInst, instData.SSRC1);
821  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
822  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
823 
824  src0.read();
825  src1.read();
826 
827  sdst = ~(src0.rawData() | src1.rawData());
828  scc = sdst.rawData() ? 1 : 0;
829 
830  sdst.write();
831  scc.write();
832  }
833 
835  : Inst_SOP2(iFmt, "s_xnor_b32")
836  {
837  setFlag(ALU);
838  } // Inst_SOP2__S_XNOR_B32
839 
841  {
842  } // ~Inst_SOP2__S_XNOR_B32
843 
844  // D.u = ~(S0.u ^ S1.u);
845  // SCC = 1 if result is non-zero.
846  void
848  {
849  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
850  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
851  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
852  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
853 
854  src0.read();
855  src1.read();
856 
857  sdst = ~(src0.rawData() ^ src1.rawData());
858  scc = sdst.rawData() ? 1 : 0;
859 
860  sdst.write();
861  scc.write();
862  }
863 
865  : Inst_SOP2(iFmt, "s_xnor_b64")
866  {
867  setFlag(ALU);
868  } // Inst_SOP2__S_XNOR_B64
869 
871  {
872  } // ~Inst_SOP2__S_XNOR_B64
873 
874  // D.u64 = ~(S0.u64 ^ S1.u64);
875  // SCC = 1 if result is non-zero.
876  void
878  {
879  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
880  ConstScalarOperandU64 src1(gpuDynInst, instData.SSRC1);
881  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
882  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
883 
884  src0.read();
885  src1.read();
886 
887  sdst = ~(src0.rawData() ^ src1.rawData());
888  scc = sdst.rawData() ? 1 : 0;
889 
890  sdst.write();
891  scc.write();
892  }
893 
895  : Inst_SOP2(iFmt, "s_lshl_b32")
896  {
897  setFlag(ALU);
898  } // Inst_SOP2__S_LSHL_B32
899 
901  {
902  } // ~Inst_SOP2__S_LSHL_B32
903 
904  // D.u = S0.u << S1.u[4:0];
905  // SCC = 1 if result is non-zero.
906  void
908  {
909  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
910  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
911  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
912  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
913 
914  src0.read();
915  src1.read();
916 
917  sdst = (src0.rawData() << bits(src1.rawData(), 4, 0));
918  scc = sdst.rawData() ? 1 : 0;
919 
920  sdst.write();
921  scc.write();
922  }
923 
925  : Inst_SOP2(iFmt, "s_lshl_b64")
926  {
927  setFlag(ALU);
928  } // Inst_SOP2__S_LSHL_B64
929 
931  {
932  } // ~Inst_SOP2__S_LSHL_B64
933 
934  // D.u64 = S0.u64 << S1.u[5:0];
935  // SCC = 1 if result is non-zero.
936  void
938  {
939  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
940  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
941  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
942  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
943 
944  src0.read();
945  src1.read();
946 
947  sdst = (src0.rawData() << bits(src1.rawData(), 5, 0));
948  scc = sdst.rawData() ? 1 : 0;
949 
950  sdst.write();
951  scc.write();
952  }
953 
955  : Inst_SOP2(iFmt, "s_lshr_b32")
956  {
957  setFlag(ALU);
958  } // Inst_SOP2__S_LSHR_B32
959 
961  {
962  } // ~Inst_SOP2__S_LSHR_B32
963 
964  // D.u = S0.u >> S1.u[4:0];
965  // SCC = 1 if result is non-zero.
966  // The vacated bits are set to zero.
967  void
969  {
970  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
971  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
972  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
973  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
974 
975  src0.read();
976  src1.read();
977 
978  sdst = (src0.rawData() >> bits(src1.rawData(), 4, 0));
979  scc = sdst.rawData() ? 1 : 0;
980 
981  sdst.write();
982  scc.write();
983  }
984 
986  : Inst_SOP2(iFmt, "s_lshr_b64")
987  {
988  setFlag(ALU);
989  } // Inst_SOP2__S_LSHR_B64
990 
992  {
993  } // ~Inst_SOP2__S_LSHR_B64
994 
995  // D.u64 = S0.u64 >> S1.u[5:0];
996  // SCC = 1 if result is non-zero.
997  // The vacated bits are set to zero.
998  void
1000  {
1001  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
1002  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
1003  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
1004  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1005 
1006  src0.read();
1007  src1.read();
1008 
1009  sdst = (src0.rawData() >> bits(src1.rawData(), 5, 0));
1010  scc = sdst.rawData() ? 1 : 0;
1011 
1012  sdst.write();
1013  scc.write();
1014  }
1015 
1017  : Inst_SOP2(iFmt, "s_ashr_i32")
1018  {
1019  setFlag(ALU);
1020  } // Inst_SOP2__S_ASHR_I32
1021 
1023  {
1024  } // ~Inst_SOP2__S_ASHR_I32
1025 
1026  // D.i = signext(S0.i) >> S1.u[4:0];
1027  // SCC = 1 if result is non-zero.
1028  // The vacated bits are set to the sign bit of the input value.
1029  void
1031  {
1032  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
1033  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
1034  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
1035  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1036 
1037  src0.read();
1038  src1.read();
1039 
1040  sdst = (src0.rawData() >> bits(src1.rawData(), 4, 0));
1041  scc = sdst.rawData() ? 1 : 0;
1042 
1043  sdst.write();
1044  scc.write();
1045  }
1046 
1048  : Inst_SOP2(iFmt, "s_ashr_i64")
1049  {
1050  setFlag(ALU);
1051  } // Inst_SOP2__S_ASHR_I64
1052 
1054  {
1055  } // ~Inst_SOP2__S_ASHR_I64
1056 
1057  // D.i64 = signext(S0.i64) >> S1.u[5:0];
1058  // SCC = 1 if result is non-zero.
1059  // The vacated bits are set to the sign bit of the input value.
1060  void
1062  {
1063  ConstScalarOperandI64 src0(gpuDynInst, instData.SSRC0);
1064  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
1065  ScalarOperandI64 sdst(gpuDynInst, instData.SDST);
1066  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1067 
1068  src0.read();
1069  src1.read();
1070 
1071  sdst = (src0.rawData() >> bits(src1.rawData(), 5, 0));
1072  scc = sdst.rawData() ? 1 : 0;
1073 
1074  sdst.write();
1075  scc.write();
1076  }
1077 
1079  : Inst_SOP2(iFmt, "s_bfm_b32")
1080  {
1081  setFlag(ALU);
1082  } // Inst_SOP2__S_BFM_B32
1083 
1085  {
1086  } // ~Inst_SOP2__S_BFM_B32
1087 
1088  // D.u = ((1 << S0.u[4:0]) - 1) << S1.u[4:0] (bitfield mask).
1089  void
1091  {
1092  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
1093  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
1094  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
1095 
1096  src0.read();
1097  src1.read();
1098 
1099  sdst = ((1 << bits(src0.rawData(), 4, 0)) - 1)
1100  << bits(src1.rawData(), 4, 0);
1101 
1102  sdst.write();
1103  }
1104 
1106  : Inst_SOP2(iFmt, "s_bfm_b64")
1107  {
1108  setFlag(ALU);
1109  } // Inst_SOP2__S_BFM_B64
1110 
1112  {
1113  } // ~Inst_SOP2__S_BFM_B64
1114 
1115  // D.u64 = ((1ULL << S0.u[5:0]) - 1) << S1.u[5:0] (bitfield mask).
1116  void
1118  {
1119  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
1120  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
1121  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
1122 
1123  src0.read();
1124  src1.read();
1125 
1126  sdst = ((1ULL << bits(src0.rawData(), 5, 0)) - 1)
1127  << bits(src1.rawData(), 5, 0);
1128 
1129  sdst.write();
1130  }
1131 
1133  : Inst_SOP2(iFmt, "s_mul_i32")
1134  {
1135  setFlag(ALU);
1136  } // Inst_SOP2__S_MUL_I32
1137 
1139  {
1140  } // ~Inst_SOP2__S_MUL_I32
1141 
1142  // D.i = S0.i * S1.i.
1143  void
1145  {
1146  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
1147  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
1148  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
1149 
1150  src0.read();
1151  src1.read();
1152 
1153  sdst = src0.rawData() * src1.rawData();
1154 
1155  sdst.write();
1156  }
1157 
1159  : Inst_SOP2(iFmt, "s_bfe_u32")
1160  {
1161  setFlag(ALU);
1162  } // Inst_SOP2__S_BFE_U32
1163 
1165  {
1166  } // ~Inst_SOP2__S_BFE_U32
1167 
1168  // Bit field extract. S0 is Data, S1[4:0] is field offset, S1[22:16] is
1169  // field width.
1170  // D.u = (S0.u >> S1.u[4:0]) & ((1 << S1.u[22:16]) - 1);
1171  // SCC = 1 if result is non-zero.
1172  void
1174  {
1175  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
1176  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
1177  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
1178  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1179 
1180  src0.read();
1181  src1.read();
1182 
1183  sdst = (src0.rawData() >> bits(src1.rawData(), 4, 0))
1184  & ((1 << bits(src1.rawData(), 22, 16)) - 1);
1185  scc = sdst.rawData() ? 1 : 0;
1186 
1187  sdst.write();
1188  scc.write();
1189  }
1190 
1192  : Inst_SOP2(iFmt, "s_bfe_i32")
1193  {
1194  setFlag(ALU);
1195  } // Inst_SOP2__S_BFE_I32
1196 
1198  {
1199  } // ~Inst_SOP2__S_BFE_I32
1200 
1201  // Bit field extract. S0 is Data, S1[4:0] is field offset, S1[22:16] is
1202  // field width.
1203  // D.i = (S0.i >> S1.u[4:0]) & ((1 << S1.u[22:16]) - 1);
1204  // Sign-extend the result;
1205  // SCC = 1 if result is non-zero.
1206  void
1208  {
1209  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
1210  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
1211  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
1212  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1213 
1214  src0.read();
1215  src1.read();
1216 
1217  sdst = (src0.rawData() >> bits(src1.rawData(), 4, 0))
1218  & ((1 << bits(src1.rawData(), 22, 16)) - 1);
1219  scc = sdst.rawData() ? 1 : 0;
1220 
1221  sdst.write();
1222  scc.write();
1223  }
1224 
1226  : Inst_SOP2(iFmt, "s_bfe_u64")
1227  {
1228  setFlag(ALU);
1229  } // Inst_SOP2__S_BFE_U64
1230 
1232  {
1233  } // ~Inst_SOP2__S_BFE_U64
1234 
1235  // Bit field extract. S0 is Data, S1[5:0] is field offset, S1[22:16] is
1236  // field width.
1237  // D.u64 = (S0.u64 >> S1.u[5:0]) & ((1 << S1.u[22:16]) - 1);
1238  // SCC = 1 if result is non-zero.
1239  void
1241  {
1242  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
1243  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
1244  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
1245  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1246 
1247  src0.read();
1248  src1.read();
1249 
1250  sdst = (src0.rawData() >> bits(src1.rawData(), 5, 0))
1251  & ((1 << bits(src1.rawData(), 22, 16)) - 1);
1252  scc = sdst.rawData() ? 1 : 0;
1253 
1254  sdst.write();
1255  scc.write();
1256  }
1257 
1259  : Inst_SOP2(iFmt, "s_bfe_i64")
1260  {
1261  setFlag(ALU);
1262  } // Inst_SOP2__S_BFE_I64
1263 
1265  {
1266  } // ~Inst_SOP2__S_BFE_I64
1267 
1268  // Bit field extract. S0 is Data, S1[5:0] is field offset, S1[22:16] is
1269  // field width.
1270  // D.i64 = (S0.i64 >> S1.u[5:0]) & ((1 << S1.u[22:16]) - 1);
1271  // Sign-extend result;
1272  // SCC = 1 if result is non-zero.
1273  void
1275  {
1276  ConstScalarOperandI64 src0(gpuDynInst, instData.SSRC0);
1277  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
1278  ScalarOperandI64 sdst(gpuDynInst, instData.SDST);
1279  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1280 
1281  src0.read();
1282  src1.read();
1283 
1284  sdst = (src0.rawData() >> bits(src1.rawData(), 5, 0))
1285  & ((1 << bits(src1.rawData(), 22, 16)) - 1);
1286  scc = sdst.rawData() ? 1 : 0;
1287 
1288  sdst.write();
1289  scc.write();
1290  }
1291 
1293  : Inst_SOP2(iFmt, "s_cbranch_g_fork")
1294  {
1295  setFlag(Branch);
1296  } // Inst_SOP2__S_CBRANCH_G_FORK
1297 
1299  {
1300  } // ~Inst_SOP2__S_CBRANCH_G_FORK
1301 
1302  // Conditional branch using branch-stack.
1303  // S0 = compare mask(vcc or any sgpr) and
1304  // S1 = 64-bit byte address of target instruction.
1305  void
1307  {
1309  }
1310 
1312  : Inst_SOP2(iFmt, "s_absdiff_i32")
1313  {
1314  setFlag(ALU);
1315  } // Inst_SOP2__S_ABSDIFF_I32
1316 
1318  {
1319  } // ~Inst_SOP2__S_ABSDIFF_I32
1320 
1321  // D.i = S0.i - S1.i;
1322  // if (D.i < 0) then D.i = -D.i;
1323  // SCC = 1 if result is non-zero.
1324  // Compute the absolute value of difference between two values.
1325  void
1327  {
1328  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
1329  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
1330  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
1331  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1332 
1333  sdst = std::abs(src0.rawData() - src1.rawData());
1334  scc = sdst.rawData() ? 1 : 0;
1335 
1336  sdst.write();
1337  scc.write();
1338  }
1339 
1341  InFmt_SOP2 *iFmt)
1342  : Inst_SOP2(iFmt, "s_rfe_restore_b64")
1343  {
1344  } // Inst_SOP2__S_RFE_RESTORE_B64
1345 
1347  {
1348  } // ~Inst_SOP2__S_RFE_RESTORE_B64
1349 
1350  // Return from exception handler and continue.
1351  void
1353  {
1355  }
1356 
1358  : Inst_SOPK(iFmt, "s_movk_i32")
1359  {
1360  setFlag(ALU);
1361  } // Inst_SOPK__S_MOVK_I32
1362 
1364  {
1365  } // ~Inst_SOPK__S_MOVK_I32
1366 
1367  // D.i = signext(SIMM16) (sign extension).
1368  void
1370  {
1371  ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
1372  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
1373 
1374  sdst = simm16;
1375 
1376  sdst.write();
1377  }
1378 
1380  : Inst_SOPK(iFmt, "s_cmovk_i32")
1381  {
1382  setFlag(ALU);
1383  } // Inst_SOPK__S_CMOVK_I32
1384 
1386  {
1387  } // ~Inst_SOPK__S_CMOVK_I32
1388 
1389  // if (SCC) then D.i = signext(SIMM16);
1390  // else NOP.
1391  // Conditional move with sign extension.
1392  void
1394  {
1395  ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
1396  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
1397  ConstScalarOperandU32 scc(gpuDynInst, REG_SCC);
1398 
1399  scc.read();
1400 
1401  if (scc.rawData()) {
1402  sdst = simm16;
1403  sdst.write();
1404  }
1405  }
1406 
1408  : Inst_SOPK(iFmt, "s_cmpk_eq_i32")
1409  {
1410  setFlag(ALU);
1411  } // Inst_SOPK__S_CMPK_EQ_I32
1412 
1414  {
1415  } // ~Inst_SOPK__S_CMPK_EQ_I32
1416 
1417  // SCC = (S0.i == signext(SIMM16)).
1418  void
1420  {
1421  ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
1422  ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
1423  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1424 
1425  src.read();
1426 
1427  scc = (src.rawData() == simm16) ? 1 : 0;
1428 
1429  scc.write();
1430  }
1431 
1433  : Inst_SOPK(iFmt, "s_cmpk_lg_i32")
1434  {
1435  setFlag(ALU);
1436  } // Inst_SOPK__S_CMPK_LG_I32
1437 
1439  {
1440  } // ~Inst_SOPK__S_CMPK_LG_I32
1441 
1442  // SCC = (S0.i != signext(SIMM16)).
1443  void
1445  {
1446  ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
1447  ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
1448  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1449 
1450  src.read();
1451 
1452  scc = (src.rawData() != simm16) ? 1 : 0;
1453 
1454  scc.write();
1455  }
1456 
1458  : Inst_SOPK(iFmt, "s_cmpk_gt_i32")
1459  {
1460  setFlag(ALU);
1461  } // Inst_SOPK__S_CMPK_GT_I32
1462 
1464  {
1465  } // ~Inst_SOPK__S_CMPK_GT_I32
1466 
1467  // SCC = (S0.i > signext(SIMM16)).
1468  void
1470  {
1471  ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
1472  ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
1473  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1474 
1475  src.read();
1476 
1477  scc = (src.rawData() > simm16) ? 1 : 0;
1478 
1479  scc.write();
1480  }
1481 
1483  : Inst_SOPK(iFmt, "s_cmpk_ge_i32")
1484  {
1485  setFlag(ALU);
1486  } // Inst_SOPK__S_CMPK_GE_I32
1487 
1489  {
1490  } // ~Inst_SOPK__S_CMPK_GE_I32
1491 
1492  // SCC = (S0.i >= signext(SIMM16)).
1493  void
1495  {
1496  ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
1497  ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
1498  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1499 
1500  src.read();
1501 
1502  scc = (src.rawData() >= simm16) ? 1 : 0;
1503 
1504  scc.write();
1505  }
1506 
1508  : Inst_SOPK(iFmt, "s_cmpk_lt_i32")
1509  {
1510  setFlag(ALU);
1511  } // Inst_SOPK__S_CMPK_LT_I32
1512 
1514  {
1515  } // ~Inst_SOPK__S_CMPK_LT_I32
1516 
1517  // SCC = (S0.i < signext(SIMM16)).
1518  void
1520  {
1521  ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
1522  ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
1523  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1524 
1525  src.read();
1526 
1527  scc = (src.rawData() < simm16) ? 1 : 0;
1528 
1529  scc.write();
1530  }
1531 
1533  : Inst_SOPK(iFmt, "s_cmpk_le_i32")
1534  {
1535  setFlag(ALU);
1536  } // Inst_SOPK__S_CMPK_LE_I32
1537 
1539  {
1540  } // ~Inst_SOPK__S_CMPK_LE_I32
1541 
1542  // SCC = (S0.i <= signext(SIMM16)).
1543  void
1545  {
1546  ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
1547  ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
1548  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1549 
1550  src.read();
1551 
1552  scc = (src.rawData() <= simm16) ? 1 : 0;
1553 
1554  scc.write();
1555  }
1556 
1558  : Inst_SOPK(iFmt, "s_cmpk_eq_u32")
1559  {
1560  setFlag(ALU);
1561  } // Inst_SOPK__S_CMPK_EQ_U32
1562 
1564  {
1565  } // ~Inst_SOPK__S_CMPK_EQ_U32
1566 
1567  // SCC = (S0.u == SIMM16).
1568  void
1570  {
1572  ConstScalarOperandU32 src(gpuDynInst, instData.SDST);
1573  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1574 
1575  src.read();
1576 
1577  scc = (src.rawData() == simm16) ? 1 : 0;
1578 
1579  scc.write();
1580  }
1581 
1583  : Inst_SOPK(iFmt, "s_cmpk_lg_u32")
1584  {
1585  setFlag(ALU);
1586  } // Inst_SOPK__S_CMPK_LG_U32
1587 
1589  {
1590  } // ~Inst_SOPK__S_CMPK_LG_U32
1591 
1592  // SCC = (S0.u != SIMM16).
1593  void
1595  {
1597  ConstScalarOperandU32 src(gpuDynInst, instData.SDST);
1598  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1599 
1600  src.read();
1601 
1602  scc = (src.rawData() != simm16) ? 1 : 0;
1603 
1604  scc.write();
1605  }
1606 
1608  : Inst_SOPK(iFmt, "s_cmpk_gt_u32")
1609  {
1610  setFlag(ALU);
1611  } // Inst_SOPK__S_CMPK_GT_U32
1612 
1614  {
1615  } // ~Inst_SOPK__S_CMPK_GT_U32
1616 
1617  // SCC = (S0.u > SIMM16).
1618  void
1620  {
1622  ConstScalarOperandU32 src(gpuDynInst, instData.SDST);
1623  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1624 
1625  src.read();
1626 
1627  scc = (src.rawData() > simm16) ? 1 : 0;
1628 
1629  scc.write();
1630  }
1631 
1633  : Inst_SOPK(iFmt, "s_cmpk_ge_u32")
1634  {
1635  setFlag(ALU);
1636  } // Inst_SOPK__S_CMPK_GE_U32
1637 
1639  {
1640  } // ~Inst_SOPK__S_CMPK_GE_U32
1641 
1642  // SCC = (S0.u >= SIMM16).
1643  void
1645  {
1647  ConstScalarOperandU32 src(gpuDynInst, instData.SDST);
1648  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1649 
1650  src.read();
1651 
1652  scc = (src.rawData() >= simm16) ? 1 : 0;
1653 
1654  scc.write();
1655  }
1656 
1658  : Inst_SOPK(iFmt, "s_cmpk_lt_u32")
1659  {
1660  setFlag(ALU);
1661  } // Inst_SOPK__S_CMPK_LT_U32
1662 
1664  {
1665  } // ~Inst_SOPK__S_CMPK_LT_U32
1666 
1667  // SCC = (S0.u < SIMM16).
1668  void
1670  {
1672  ConstScalarOperandU32 src(gpuDynInst, instData.SDST);
1673  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1674 
1675  src.read();
1676 
1677  scc = (src.rawData() < simm16) ? 1 : 0;
1678 
1679  scc.write();
1680  }
1681 
1683  : Inst_SOPK(iFmt, "s_cmpk_le_u32")
1684  {
1685  setFlag(ALU);
1686  } // Inst_SOPK__S_CMPK_LE_U32
1687 
1689  {
1690  } // ~Inst_SOPK__S_CMPK_LE_U32
1691 
1692  // SCC = (S0.u <= SIMM16).
1693  void
1695  {
1697  ConstScalarOperandU32 src(gpuDynInst, instData.SDST);
1698  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1699 
1700  src.read();
1701 
1702  scc = (src.rawData() <= simm16) ? 1 : 0;
1703 
1704  scc.write();
1705  }
1706 
1708  : Inst_SOPK(iFmt, "s_addk_i32")
1709  {
1710  setFlag(ALU);
1711  } // Inst_SOPK__S_ADDK_I32
1712 
1714  {
1715  } // ~Inst_SOPK__S_ADDK_I32
1716 
1717  // D.i = D.i + signext(SIMM16);
1718  // SCC = overflow.
1719  void
1721  {
1722  ScalarRegI16 simm16 = instData.SIMM16;
1723  ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
1724  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
1725  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1726 
1727  src.read();
1728 
1729  sdst = src.rawData() + (ScalarRegI32)sext<16>(simm16);
1730  scc = (bits(src.rawData(), 31) == bits(simm16, 15)
1731  && bits(src.rawData(), 31) != bits(sdst.rawData(), 31)) ? 1 : 0;
1732 
1733  sdst.write();
1734  scc.write();
1735  }
1736 
1738  : Inst_SOPK(iFmt, "s_mulk_i32")
1739  {
1740  setFlag(ALU);
1741  } // Inst_SOPK__S_MULK_I32
1742 
1744  {
1745  } // ~Inst_SOPK__S_MULK_I32
1746 
1747  // D.i = D.i * signext(SIMM16).
1748  void
1750  {
1751  ScalarRegI16 simm16 = instData.SIMM16;
1752  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
1753 
1754  sdst.read();
1755 
1756  sdst = sdst.rawData() * (ScalarRegI32)sext<16>(simm16);
1757 
1758  sdst.write();
1759  }
1760 
1762  : Inst_SOPK(iFmt, "s_cbranch_i_fork")
1763  {
1764  setFlag(Branch);
1765  } // Inst_SOPK__S_CBRANCH_I_FORK
1766 
1768  {
1769  } // ~Inst_SOPK__S_CBRANCH_I_FORK
1770 
1771  // Conditional branch using branch-stack.
1772  // S0 = compare mask(vcc or any sgpr), and
1773  // SIMM16 = signed DWORD branch offset relative to next instruction.
1774  void
1776  {
1778  }
1779 
1781  : Inst_SOPK(iFmt, "s_getreg_b32")
1782  {
1783  } // Inst_SOPK__S_GETREG_B32
1784 
1786  {
1787  } // ~Inst_SOPK__S_GETREG_B32
1788 
1789  // D.u = hardware-reg. Read some or all of a hardware register into the
1790  // LSBs of D.
1791  // SIMM16 = {size[4:0], offset[4:0], hwRegId[5:0]}; offset is 0..31, size
1792  // is 1..32.
1793  void
1795  {
1797  }
1798 
1800  : Inst_SOPK(iFmt, "s_setreg_b32")
1801  {
1802  setFlag(ALU);
1803  } // Inst_SOPK__S_SETREG_B32
1804 
1806  {
1807  } // ~Inst_SOPK__S_SETREG_B32
1808 
1809  // hardware-reg = S0.u. Write some or all of the LSBs of D into a hardware
1810  // register.
1811  // SIMM16 = {size[4:0], offset[4:0], hwRegId[5:0]}; offset is 0..31, size
1812  // is 1..32.
1813  void
1815  {
1816  ScalarRegI16 simm16 = instData.SIMM16;
1817  ScalarRegU32 hwregId = simm16 & 0x3f;
1818  ScalarRegU32 offset = (simm16 >> 6) & 31;
1819  ScalarRegU32 size = ((simm16 >> 11) & 31) + 1;
1820 
1821  ScalarOperandU32 hwreg(gpuDynInst, hwregId);
1822  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
1823  hwreg.read();
1824  sdst.read();
1825 
1826  // Store value from SDST to part of the hardware register.
1827  ScalarRegU32 mask = (((1U << size) - 1U) << offset);
1828  hwreg = ((hwreg.rawData() & ~mask)
1829  | ((sdst.rawData() << offset) & mask));
1830  hwreg.write();
1831 
1832  // set MODE register to control the behavior of single precision
1833  // floating-point numbers: denormal mode or round mode
1834  if (hwregId==1 && size==2
1835  && (offset==4 || offset==0)) {
1836  warn_once("Be cautious that s_setreg_b32 has no real effect "
1837  "on FP modes: %s\n", gpuDynInst->disassemble());
1838  return;
1839  }
1840 
1841  // panic if not changing MODE of floating-point numbers
1843  }
1844 
1846  InFmt_SOPK *iFmt)
1847  : Inst_SOPK(iFmt, "s_setreg_imm32_b32")
1848  {
1849  setFlag(ALU);
1850  } // Inst_SOPK__S_SETREG_IMM32_B32
1851 
1853  {
1854  } // ~Inst_SOPK__S_SETREG_IMM32_B32
1855 
1856  // Write some or all of the LSBs of IMM32 into a hardware register; this
1857  // instruction requires a 32-bit literal constant.
1858  // SIMM16 = {size[4:0], offset[4:0], hwRegId[5:0]}; offset is 0..31, size
1859  // is 1..32.
1860  void
1862  {
1863  ScalarRegI16 simm16 = instData.SIMM16;
1864  ScalarRegU32 hwregId = simm16 & 0x3f;
1865  ScalarRegU32 offset = (simm16 >> 6) & 31;
1866  ScalarRegU32 size = ((simm16 >> 11) & 31) + 1;
1867 
1868  ScalarOperandU32 hwreg(gpuDynInst, hwregId);
1869  ScalarRegU32 simm32 = extData.imm_u32;
1870  hwreg.read();
1871 
1872  ScalarRegU32 mask = (((1U << size) - 1U) << offset);
1873  hwreg = ((hwreg.rawData() & ~mask)
1874  | ((simm32 << offset) & mask));
1875  hwreg.write();
1876 
1877  if (hwregId==1 && size==2
1878  && (offset==4 || offset==0)) {
1879  warn_once("Be cautious that s_setreg_imm32_b32 has no real effect "
1880  "on FP modes: %s\n", gpuDynInst->disassemble());
1881  return;
1882  }
1883 
1884  // panic if not changing MODE of floating-point numbers
1886  }
1887 
1889  : Inst_SOP1(iFmt, "s_mov_b32")
1890  {
1891  setFlag(ALU);
1892  } // Inst_SOP1__S_MOV_B32
1893 
1895  {
1896  } // ~Inst_SOP1__S_MOV_B32
1897 
1898  // D.u = S0.u.
1899  void
1901  {
1902  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
1903  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
1904 
1905  src.read();
1906 
1907  sdst = src.rawData();
1908 
1909  sdst.write();
1910  }
1911 
1913  : Inst_SOP1(iFmt, "s_mov_b64")
1914  {
1915  setFlag(ALU);
1916  } // Inst_SOP1__S_MOV_B64
1917 
1919  {
1920  } // ~Inst_SOP1__S_MOV_B64
1921 
1922  // D.u64 = S0.u64.
1923  void
1925  {
1926  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
1927  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
1928 
1929  src.read();
1930 
1931  sdst = src.rawData();
1932 
1933  sdst.write();
1934  }
1935 
1937  : Inst_SOP1(iFmt, "s_cmov_b32")
1938  {
1939  setFlag(ALU);
1940  } // Inst_SOP1__S_CMOV_B32
1941 
1943  {
1944  } // ~Inst_SOP1__S_CMOV_B32
1945 
1946  // if (SCC) then D.u = S0.u;
1947  // else NOP.
1948  // Conditional move.
1949  void
1951  {
1952  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
1953  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
1954  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1955 
1956  src.read();
1957  scc.read();
1958 
1959  if (scc.rawData()) {
1960  sdst = src.rawData();
1961  sdst.write();
1962  }
1963  }
1964 
1966  : Inst_SOP1(iFmt, "s_cmov_b64")
1967  {
1968  setFlag(ALU);
1969  } // Inst_SOP1__S_CMOV_B64
1970 
1972  {
1973  } // ~Inst_SOP1__S_CMOV_B64
1974 
1975  // if (SCC) then D.u64 = S0.u64;
1976  // else NOP.
1977  // Conditional move.
1978  void
1980  {
1981  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
1982  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
1983  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
1984 
1985  src.read();
1986  scc.read();
1987 
1988  if (scc.rawData()) {
1989  sdst = src.rawData();
1990  sdst.write();
1991  }
1992  }
1993 
1995  : Inst_SOP1(iFmt, "s_not_b32")
1996  {
1997  setFlag(ALU);
1998  } // Inst_SOP1__S_NOT_B32
1999 
2001  {
2002  } // ~Inst_SOP1__S_NOT_B32
2003 
2004  // D.u = ~S0.u;
2005  // SCC = 1 if result is non-zero.
2006  // Bitwise negation.
2007  void
2009  {
2010  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2011  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
2012  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2013 
2014  src.read();
2015 
2016  sdst = ~src.rawData();
2017 
2018  scc = sdst.rawData() ? 1 : 0;
2019 
2020  sdst.write();
2021  scc.write();
2022  }
2023 
2025  : Inst_SOP1(iFmt, "s_not_b64")
2026  {
2027  setFlag(ALU);
2028  } // Inst_SOP1__S_NOT_B64
2029 
2031  {
2032  } // ~Inst_SOP1__S_NOT_B64
2033 
2034  // D.u64 = ~S0.u64;
2035  // SCC = 1 if result is non-zero.
2036  // Bitwise negation.
2037  void
2039  {
2040  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2041  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2042  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2043 
2044  src.read();
2045 
2046  sdst = ~src.rawData();
2047  scc = sdst.rawData() ? 1 : 0;
2048 
2049  sdst.write();
2050  scc.write();
2051  }
2052 
2054  : Inst_SOP1(iFmt, "s_wqm_b32")
2055  {
2056  setFlag(ALU);
2057  } // Inst_SOP1__S_WQM_B32
2058 
2060  {
2061  } // ~Inst_SOP1__S_WQM_B32
2062 
2063  // Computes whole quad mode for an active/valid mask.
2064  // SCC = 1 if result is non-zero.
2065  void
2067  {
2068  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2069  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
2070  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2071 
2072  src.read();
2073 
2074  sdst = wholeQuadMode(src.rawData());
2075  scc = sdst.rawData() ? 1 : 0;
2076 
2077  sdst.write();
2078  scc.write();
2079  }
2080 
2082  : Inst_SOP1(iFmt, "s_wqm_b64")
2083  {
2084  setFlag(ALU);
2085  } // Inst_SOP1__S_WQM_B64
2086 
2088  {
2089  } // ~Inst_SOP1__S_WQM_B64
2090 
2091  // Computes whole quad mode for an active/valid mask.
2092  // SCC = 1 if result is non-zero.
2093  void
2095  {
2096  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2097  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2098  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2099 
2100  src.read();
2101 
2102  sdst = wholeQuadMode(src.rawData());
2103  scc = sdst.rawData() ? 1 : 0;
2104 
2105  sdst.write();
2106  scc.write();
2107  }
2108 
2110  : Inst_SOP1(iFmt, "s_brev_b32")
2111  {
2112  setFlag(ALU);
2113  } // Inst_SOP1__S_BREV_B32
2114 
2116  {
2117  } // ~Inst_SOP1__S_BREV_B32
2118 
2119  // D.u[31:0] = S0.u[0:31] (reverse bits).
2120  void
2122  {
2123  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2124  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
2125 
2126  src.read();
2127 
2128  sdst = reverseBits(src.rawData());
2129 
2130  sdst.write();
2131  }
2132 
2134  : Inst_SOP1(iFmt, "s_brev_b64")
2135  {
2136  setFlag(ALU);
2137  } // Inst_SOP1__S_BREV_B64
2138 
2140  {
2141  } // ~Inst_SOP1__S_BREV_B64
2142 
2143  // D.u64[63:0] = S0.u64[0:63] (reverse bits).
2144  void
2146  {
2147  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2148  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2149 
2150  src.read();
2151 
2152  sdst = reverseBits(src.rawData());
2153 
2154  sdst.write();
2155  }
2156 
2158  : Inst_SOP1(iFmt, "s_bcnt0_i32_b32")
2159  {
2160  setFlag(ALU);
2161  } // Inst_SOP1__S_BCNT0_I32_B32
2162 
2164  {
2165  } // ~Inst_SOP1__S_BCNT0_I32_B32
2166 
2167  // D.i = CountZeroBits(S0.u);
2168  // SCC = 1 if result is non-zero.
2169  void
2171  {
2172  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2173  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2174  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2175 
2176  src.read();
2177 
2178  sdst = countZeroBits(src.rawData());
2179  scc = sdst.rawData() ? 1 : 0;
2180 
2181  sdst.write();
2182  scc.write();
2183  }
2184 
2186  : Inst_SOP1(iFmt, "s_bcnt0_i32_b64")
2187  {
2188  setFlag(ALU);
2189  } // Inst_SOP1__S_BCNT0_I32_B64
2190 
2192  {
2193  } // ~Inst_SOP1__S_BCNT0_I32_B64
2194 
2195  // D.i = CountZeroBits(S0.u64);
2196  // SCC = 1 if result is non-zero.
2197  void
2199  {
2200  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2201  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2202  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2203 
2204  src.read();
2205 
2206  sdst = countZeroBits(src.rawData());
2207  scc = sdst.rawData() ? 1 : 0;
2208 
2209  sdst.write();
2210  scc.write();
2211  }
2212 
2214  : Inst_SOP1(iFmt, "s_bcnt1_i32_b32")
2215  {
2216  setFlag(ALU);
2217  } // Inst_SOP1__S_BCNT1_I32_B32
2218 
2220  {
2221  } // ~Inst_SOP1__S_BCNT1_I32_B32
2222 
2223  // D.i = CountOneBits(S0.u);
2224  // SCC = 1 if result is non-zero.
2225  void
2227  {
2228  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2229  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2230  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2231 
2232  src.read();
2233 
2234  sdst = popCount(src.rawData());
2235  scc = sdst.rawData() ? 1 : 0;
2236 
2237  sdst.write();
2238  scc.write();
2239  }
2240 
2242  : Inst_SOP1(iFmt, "s_bcnt1_i32_b64")
2243  {
2244  setFlag(ALU);
2245  } // Inst_SOP1__S_BCNT1_I32_B64
2246 
2248  {
2249  } // ~Inst_SOP1__S_BCNT1_I32_B64
2250 
2251  // D.i = CountOneBits(S0.u64);
2252  // SCC = 1 if result is non-zero.
2253  void
2255  {
2256  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2257  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2258  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2259 
2260  src.read();
2261 
2262  sdst = popCount(src.rawData());
2263  scc = sdst.rawData() ? 1 : 0;
2264 
2265  sdst.write();
2266  scc.write();
2267  }
2268 
2270  : Inst_SOP1(iFmt, "s_ff0_i32_b32")
2271  {
2272  setFlag(ALU);
2273  } // Inst_SOP1__S_FF0_I32_B32
2274 
2276  {
2277  } // ~Inst_SOP1__S_FF0_I32_B32
2278 
2279  // D.i = FindFirstZero(S0.u);
2280  // If no zeros are found, return -1.
2281  // Returns the bit position of the first zero from the LSB.
2282  void
2284  {
2285  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2286  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2287 
2288  src.read();
2289 
2290  sdst = findFirstZero(src.rawData());
2291 
2292  sdst.write();
2293  }
2294 
2296  : Inst_SOP1(iFmt, "s_ff0_i32_b64")
2297  {
2298  setFlag(ALU);
2299  } // Inst_SOP1__S_FF0_I32_B64
2300 
2302  {
2303  } // ~Inst_SOP1__S_FF0_I32_B64
2304 
2305  // D.i = FindFirstZero(S0.u64);
2306  // If no zeros are found, return -1.
2307  // Returns the bit position of the first zero from the LSB.
2308  void
2310  {
2311  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2312  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2313 
2314  src.read();
2315 
2316  sdst = findFirstZero(src.rawData());
2317 
2318  sdst.write();
2319  }
2320 
2322  : Inst_SOP1(iFmt, "s_ff1_i32_b32")
2323  {
2324  setFlag(ALU);
2325  } // Inst_SOP1__S_FF1_I32_B32
2326 
2328  {
2329  } // ~Inst_SOP1__S_FF1_I32_B32
2330 
2331  // D.i = FindFirstOne(S0.u);
2332  // If no ones are found, return -1.
2333  // Returns the bit position of the first one from the LSB.
2334  void
2336  {
2337  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2338  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2339 
2340  src.read();
2341 
2342  sdst = findFirstOne(src.rawData());
2343 
2344  sdst.write();
2345  }
2346 
2348  : Inst_SOP1(iFmt, "s_ff1_i32_b64")
2349  {
2350  setFlag(ALU);
2351  } // Inst_SOP1__S_FF1_I32_B64
2352 
2354  {
2355  } // ~Inst_SOP1__S_FF1_I32_B64
2356 
2357  // D.i = FindFirstOne(S0.u64);
2358  // If no ones are found, return -1.
2359  // Returns the bit position of the first one from the LSB.
2360  void
2362  {
2363  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2364  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2365 
2366  src.read();
2367 
2368  sdst = findFirstOne(src.rawData());
2369 
2370  sdst.write();
2371  }
2372 
2374  : Inst_SOP1(iFmt, "s_flbit_i32_b32")
2375  {
2376  setFlag(ALU);
2377  } // Inst_SOP1__S_FLBIT_I32_B32
2378 
2380  {
2381  } // ~Inst_SOP1__S_FLBIT_I32_B32
2382 
2383  // D.i = FindFirstOne(S0.u);
2384  // If no ones are found, return -1.
2385  // Counts how many zeros before the first one starting from the MSB.
2386  void
2388  {
2389  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2390  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2391 
2392  src.read();
2393 
2394  sdst = countZeroBitsMsb(src.rawData());
2395 
2396  sdst.write();
2397  }
2398 
2400  : Inst_SOP1(iFmt, "s_flbit_i32_b64")
2401  {
2402  setFlag(ALU);
2403  } // Inst_SOP1__S_FLBIT_I32_B64
2404 
2406  {
2407  } // ~Inst_SOP1__S_FLBIT_I32_B64
2408 
2409  // D.i = FindFirstOne(S0.u64);
2410  // If no ones are found, return -1.
2411  // Counts how many zeros before the first one starting from the MSB.
2412  void
2414  {
2415  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2416  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2417 
2418  src.read();
2419 
2420  sdst = countZeroBitsMsb(src.rawData());
2421 
2422  sdst.write();
2423  }
2424 
2426  : Inst_SOP1(iFmt, "s_flbit_i32")
2427  {
2428  setFlag(ALU);
2429  } // Inst_SOP1__S_FLBIT_I32
2430 
2432  {
2433  } // ~Inst_SOP1__S_FLBIT_I32
2434 
2435  // D.i = FirstOppositeSignBit(S0.i);
2436  // If S0.i == 0 or S0.i == -1 (all bits are the same), return -1.
2437  // Counts how many bits in a row (from MSB to LSB) are the same as the
2438  // sign bit.
2439  void
2441  {
2442  ConstScalarOperandI32 src(gpuDynInst, instData.SSRC0);
2443  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2444 
2445  src.read();
2446 
2447  sdst = firstOppositeSignBit(src.rawData());
2448 
2449  sdst.write();
2450  }
2451 
2453  : Inst_SOP1(iFmt, "s_flbit_i32_i64")
2454  {
2455  setFlag(ALU);
2456  } // Inst_SOP1__S_FLBIT_I32_I64
2457 
2459  {
2460  } // ~Inst_SOP1__S_FLBIT_I32_I64
2461 
2462  // D.i = FirstOppositeSignBit(S0.i64);
2463  // If S0.i == 0 or S0.i == -1 (all bits are the same), return -1.
2464  // Counts how many bits in a row (from MSB to LSB) are the same as the
2465  // sign bit.
2466  void
2468  {
2469  ConstScalarOperandI64 src(gpuDynInst, instData.SSRC0);
2470  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2471 
2472  src.read();
2473 
2474  sdst = firstOppositeSignBit(src.rawData());
2475 
2476  sdst.write();
2477  }
2478 
2480  : Inst_SOP1(iFmt, "s_sext_i32_i8")
2481  {
2482  setFlag(ALU);
2483  } // Inst_SOP1__S_SEXT_I32_I8
2484 
2486  {
2487  } // ~Inst_SOP1__S_SEXT_I32_I8
2488 
2489  // D.i = signext(S0.i[7:0]) (sign extension).
2490  void
2492  {
2493  ConstScalarOperandI32 src(gpuDynInst, instData.SSRC0);
2494  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2495 
2496  src.read();
2497 
2498  sdst = sext<std::numeric_limits<ScalarRegI8>::digits>(
2499  bits(src.rawData(), 7, 0));
2500 
2501  sdst.write();
2502  }
2503 
2505  : Inst_SOP1(iFmt, "s_sext_i32_i16")
2506  {
2507  setFlag(ALU);
2508  } // Inst_SOP1__S_SEXT_I32_I16
2509 
2511  {
2512  } // ~Inst_SOP1__S_SEXT_I32_I16
2513 
2514  // D.i = signext(S0.i[15:0]) (sign extension).
2515  void
2517  {
2518  ConstScalarOperandI32 src(gpuDynInst, instData.SSRC0);
2519  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
2520 
2521  src.read();
2522 
2523  sdst = sext<std::numeric_limits<ScalarRegI16>::digits>(
2524  bits(src.rawData(), 15, 0));
2525 
2526  sdst.write();
2527  }
2528 
2530  : Inst_SOP1(iFmt, "s_bitset0_b32")
2531  {
2532  setFlag(ALU);
2533  } // Inst_SOP1__S_BITSET0_B32
2534 
2536  {
2537  } // ~Inst_SOP1__S_BITSET0_B32
2538 
2539  // D.u[S0.u[4:0]] = 0.
2540  void
2542  {
2543  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2544  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
2545 
2546  src.read();
2547 
2548  sdst.setBit(bits(src.rawData(), 4, 0), 0);
2549 
2550  sdst.write();
2551  }
2552 
2554  : Inst_SOP1(iFmt, "s_bitset0_b64")
2555  {
2556  setFlag(ALU);
2557  } // Inst_SOP1__S_BITSET0_B64
2558 
2560  {
2561  } // ~Inst_SOP1__S_BITSET0_B64
2562 
2563  // D.u64[S0.u[5:0]] = 0.
2564  void
2566  {
2567  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2568  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2569 
2570  src.read();
2571 
2572  sdst.setBit(bits(src.rawData(), 5, 0), 0);
2573 
2574  sdst.write();
2575  }
2576 
2578  : Inst_SOP1(iFmt, "s_bitset1_b32")
2579  {
2580  setFlag(ALU);
2581  } // Inst_SOP1__S_BITSET1_B32
2582 
2584  {
2585  } // ~Inst_SOP1__S_BITSET1_B32
2586 
2587  // D.u[S0.u[4:0]] = 1.
2588  void
2590  {
2591  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2592  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
2593 
2594  src.read();
2595 
2596  sdst.setBit(bits(src.rawData(), 4, 0), 1);
2597 
2598  sdst.write();
2599  }
2600 
2602  : Inst_SOP1(iFmt, "s_bitset1_b64")
2603  {
2604  setFlag(ALU);
2605  } // Inst_SOP1__S_BITSET1_B64
2606 
2608  {
2609  } // ~Inst_SOP1__S_BITSET1_B64
2610 
2611  // D.u64[S0.u[5:0]] = 1.
2612  void
2614  {
2615  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2616  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2617 
2618  src.read();
2619 
2620  sdst.setBit(bits(src.rawData(), 5, 0), 1);
2621 
2622  sdst.write();
2623  }
2624 
2626  : Inst_SOP1(iFmt, "s_getpc_b64")
2627  {
2628  setFlag(ALU);
2629  } // Inst_SOP1__S_GETPC_B64
2630 
2632  {
2633  } // ~Inst_SOP1__S_GETPC_B64
2634 
2635  // D.u64 = PC + 4.
2636  // Destination receives the byte address of the next instruction.
2637  void
2639  {
2640  Wavefront *wf = gpuDynInst->wavefront();
2641  Addr pc = wf->pc();
2642  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2643 
2644  sdst = pc + 4;
2645 
2646  sdst.write();
2647  }
2648 
2650  : Inst_SOP1(iFmt, "s_setpc_b64")
2651  {
2652  setFlag(ALU);
2653  } // Inst_SOP1__S_SETPC_B64
2654 
2656  {
2657  } // ~Inst_SOP1__S_SETPC_B64
2658 
2659  // PC = S0.u64.
2660  // S0.u64 is a byte address of the instruction to jump to.
2661  void
2663  {
2664  Wavefront *wf = gpuDynInst->wavefront();
2665  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2666 
2667  src.read();
2668 
2669  wf->pc(src.rawData());
2670  }
2671 
2673  : Inst_SOP1(iFmt, "s_swappc_b64")
2674  {
2675  setFlag(ALU);
2676  } // Inst_SOP1__S_SWAPPC_B64
2677 
2679  {
2680  } // ~Inst_SOP1__S_SWAPPC_B64
2681 
2682  // D.u64 = PC + 4; PC = S0.u64.
2683  // S0.u64 is a byte address of the instruction to jump to.
2684  void
2686  {
2687  Wavefront *wf = gpuDynInst->wavefront();
2688  Addr pc = wf->pc();
2689  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2690  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2691 
2692  src.read();
2693 
2694  sdst = pc + 4;
2695 
2696  wf->pc(src.rawData());
2697  sdst.write();
2698  }
2699 
2701  : Inst_SOP1(iFmt, "s_rfe_b64")
2702  {
2703  } // Inst_SOP1__S_RFE_B64
2704 
2706  {
2707  } // ~Inst_SOP1__S_RFE_B64
2708 
2709  // Return from exception handler and continue.
2710  void
2712  {
2714  }
2715 
2717  InFmt_SOP1 *iFmt)
2718  : Inst_SOP1(iFmt, "s_and_saveexec_b64")
2719  {
2720  setFlag(ALU);
2721  } // Inst_SOP1__S_AND_SAVEEXEC_B64
2722 
2724  {
2725  } // ~Inst_SOP1__S_AND_SAVEEXEC_B64
2726 
2727  // D.u64 = EXEC;
2728  // EXEC = S0.u64 & EXEC;
2729  // SCC = 1 if the new value of EXEC is non-zero.
2730  void
2732  {
2733  Wavefront *wf = gpuDynInst->wavefront();
2734  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2735  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2736  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2737 
2738  src.read();
2739 
2740  sdst = wf->execMask().to_ullong();
2741  wf->execMask() = src.rawData() & wf->execMask().to_ullong();
2742  scc = wf->execMask().any() ? 1 : 0;
2743 
2744  sdst.write();
2745  scc.write();
2746  }
2747 
2749  InFmt_SOP1 *iFmt)
2750  : Inst_SOP1(iFmt, "s_or_saveexec_b64")
2751  {
2752  setFlag(ALU);
2753  } // Inst_SOP1__S_OR_SAVEEXEC_B64
2754 
2756  {
2757  } // ~Inst_SOP1__S_OR_SAVEEXEC_B64
2758 
2759  // D.u64 = EXEC;
2760  // EXEC = S0.u64 | EXEC;
2761  // SCC = 1 if the new value of EXEC is non-zero.
2762  void
2764  {
2765  Wavefront *wf = gpuDynInst->wavefront();
2766  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2767  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2768  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2769 
2770  src.read();
2771 
2772  sdst = wf->execMask().to_ullong();
2773  wf->execMask() = src.rawData() | wf->execMask().to_ullong();
2774  scc = wf->execMask().any() ? 1 : 0;
2775 
2776  sdst.write();
2777  scc.write();
2778  }
2779 
2781  InFmt_SOP1 *iFmt)
2782  : Inst_SOP1(iFmt, "s_xor_saveexec_b64")
2783  {
2784  setFlag(ALU);
2785  } // Inst_SOP1__S_XOR_SAVEEXEC_B64
2786 
2788  {
2789  } // ~Inst_SOP1__S_XOR_SAVEEXEC_B64
2790 
2791  // D.u64 = EXEC;
2792  // EXEC = S0.u64 ^ EXEC;
2793  // SCC = 1 if the new value of EXEC is non-zero.
2794  void
2796  {
2797  Wavefront *wf = gpuDynInst->wavefront();
2798  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2799  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2800  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2801 
2802  src.read();
2803 
2804  sdst = wf->execMask().to_ullong();
2805  wf->execMask() = src.rawData() ^ wf->execMask().to_ullong();
2806  scc = wf->execMask().any() ? 1 : 0;
2807 
2808  sdst.write();
2809  scc.write();
2810  }
2811 
2813  InFmt_SOP1 *iFmt)
2814  : Inst_SOP1(iFmt, "s_andn2_saveexec_b64")
2815  {
2816  setFlag(ALU);
2817  } // Inst_SOP1__S_ANDN2_SAVEEXEC_B64
2818 
2820  {
2821  } // ~Inst_SOP1__S_ANDN2_SAVEEXEC_B64
2822 
2823  // D.u64 = EXEC;
2824  // EXEC = S0.u64 & ~EXEC;
2825  // SCC = 1 if the new value of EXEC is non-zero.
2826  void
2828  {
2829  Wavefront *wf = gpuDynInst->wavefront();
2830  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2831  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2832  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2833 
2834  src.read();
2835 
2836  sdst = wf->execMask().to_ullong();
2837  wf->execMask() = src.rawData() &~ wf->execMask().to_ullong();
2838  scc = wf->execMask().any() ? 1 : 0;
2839 
2840  sdst.write();
2841  scc.write();
2842  }
2843 
2845  InFmt_SOP1 *iFmt)
2846  : Inst_SOP1(iFmt, "s_orn2_saveexec_b64")
2847  {
2848  setFlag(ALU);
2849  } // Inst_SOP1__S_ORN2_SAVEEXEC_B64
2850 
2852  {
2853  } // ~Inst_SOP1__S_ORN2_SAVEEXEC_B64
2854 
2855  // D.u64 = EXEC;
2856  // EXEC = S0.u64 | ~EXEC;
2857  // SCC = 1 if the new value of EXEC is non-zero.
2858  void
2860  {
2861  Wavefront *wf = gpuDynInst->wavefront();
2862  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2863  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2864  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2865 
2866  src.read();
2867 
2868  sdst = wf->execMask().to_ullong();
2869  wf->execMask() = src.rawData() |~ wf->execMask().to_ullong();
2870  scc = wf->execMask().any() ? 1 : 0;
2871 
2872  sdst.write();
2873  scc.write();
2874  }
2875 
2877  InFmt_SOP1 *iFmt)
2878  : Inst_SOP1(iFmt, "s_nand_saveexec_b64")
2879  {
2880  setFlag(ALU);
2881  } // Inst_SOP1__S_NAND_SAVEEXEC_B64
2882 
2884  {
2885  } // ~Inst_SOP1__S_NAND_SAVEEXEC_B64
2886 
2887  // D.u64 = EXEC;
2888  // EXEC = ~(S0.u64 & EXEC);
2889  // SCC = 1 if the new value of EXEC is non-zero.
2890  void
2892  {
2893  Wavefront *wf = gpuDynInst->wavefront();
2894  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2895  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2896  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2897 
2898  src.read();
2899 
2900  sdst = wf->execMask().to_ullong();
2901  wf->execMask() = ~(src.rawData() & wf->execMask().to_ullong());
2902  scc = wf->execMask().any() ? 1 : 0;
2903 
2904  sdst.write();
2905  scc.write();
2906  }
2907 
2909  InFmt_SOP1 *iFmt)
2910  : Inst_SOP1(iFmt, "s_nor_saveexec_b64")
2911  {
2912  setFlag(ALU);
2913  } // Inst_SOP1__S_NOR_SAVEEXEC_B64
2914 
2916  {
2917  } // ~Inst_SOP1__S_NOR_SAVEEXEC_B64
2918 
2919  // D.u64 = EXEC;
2920  // EXEC = ~(S0.u64 | EXEC);
2921  // SCC = 1 if the new value of EXEC is non-zero.
2922  void
2924  {
2925  Wavefront *wf = gpuDynInst->wavefront();
2926  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2927  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2928  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2929 
2930  src.read();
2931 
2932  sdst = wf->execMask().to_ullong();
2933  wf->execMask() = ~(src.rawData() | wf->execMask().to_ullong());
2934  scc = wf->execMask().any() ? 1 : 0;
2935 
2936  sdst.write();
2937  scc.write();
2938  }
2939 
2941  InFmt_SOP1 *iFmt)
2942  : Inst_SOP1(iFmt, "s_xnor_saveexec_b64")
2943  {
2944  setFlag(ALU);
2945  } // Inst_SOP1__S_XNOR_SAVEEXEC_B64
2946 
2948  {
2949  } // ~Inst_SOP1__S_XNOR_SAVEEXEC_B64
2950 
2951  // D.u64 = EXEC;
2952  // EXEC = ~(S0.u64 ^ EXEC);
2953  // SCC = 1 if the new value of EXEC is non-zero.
2954  void
2956  {
2957  Wavefront *wf = gpuDynInst->wavefront();
2958  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
2959  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
2960  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2961 
2962  src.read();
2963 
2964  sdst = wf->execMask().to_ullong();
2965  wf->execMask() = ~(src.rawData() ^ wf->execMask().to_ullong());
2966  scc = wf->execMask().any() ? 1 : 0;
2967 
2968  sdst.write();
2969  scc.write();
2970  }
2971 
2973  : Inst_SOP1(iFmt, "s_quadmask_b32")
2974  {
2975  setFlag(ALU);
2976  } // Inst_SOP1__S_QUADMASK_B32
2977 
2979  {
2980  } // ~Inst_SOP1__S_QUADMASK_B32
2981 
2982  // D.u = QuadMask(S0.u):
2983  // D[0] = OR(S0[3:0]), D[1] = OR(S0[7:4]) ... D[31:8] = 0;
2984  // SCC = 1 if result is non-zero.
2985  void
2987  {
2988  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
2989  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
2990  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
2991 
2992  src.read();
2993 
2994  sdst = quadMask(src.rawData());
2995  scc = sdst.rawData() ? 1 : 0;
2996 
2997  sdst.write();
2998  scc.write();
2999  }
3000 
3002  : Inst_SOP1(iFmt, "s_quadmask_b64")
3003  {
3004  setFlag(ALU);
3005  } // Inst_SOP1__S_QUADMASK_B64
3006 
3008  {
3009  } // ~Inst_SOP1__S_QUADMASK_B64
3010 
3011  // D.u64 = QuadMask(S0.u64):
3012  // D[0] = OR(S0[3:0]), D[1] = OR(S0[7:4]) ... D[63:16] = 0;
3013  // SCC = 1 if result is non-zero.
3014  void
3016  {
3017  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
3018  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
3019  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3020 
3021  src.read();
3022 
3023  sdst = quadMask(src.rawData());
3024  scc = sdst.rawData() ? 1 : 0;
3025 
3026  sdst.write();
3027  scc.write();
3028  }
3029 
3031  : Inst_SOP1(iFmt, "s_movrels_b32")
3032  {
3033  setFlag(ALU);
3034  } // Inst_SOP1__S_MOVRELS_B32
3035 
3037  {
3038  } // ~Inst_SOP1__S_MOVRELS_B32
3039 
3040  // D.u = SGPR[S0.u + M0.u].u (move from relative source).
3041  void
3043  {
3044  ConstScalarOperandU32 m0(gpuDynInst, REG_M0);
3045  m0.read();
3046  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0 + m0.rawData());
3047  ScalarOperandU32 sdst(gpuDynInst, instData.SDST);
3048 
3049  src.read();
3050 
3051  sdst = src.rawData();
3052 
3053  sdst.write();
3054  }
3055 
3057  : Inst_SOP1(iFmt, "s_movrels_b64")
3058  {
3059  setFlag(ALU);
3060  } // Inst_SOP1__S_MOVRELS_B64
3061 
3063  {
3064  } // ~Inst_SOP1__S_MOVRELS_B64
3065 
3066  // D.u64 = SGPR[S0.u + M0.u].u64 (move from relative source).
3067  // The index in M0.u must be even for this operation.
3068  void
3070  {
3071  ConstScalarOperandU32 m0(gpuDynInst, REG_M0);
3072  m0.read();
3073  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0 + m0.rawData());
3074  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
3075 
3076  src.read();
3077 
3078  sdst = src.rawData();
3079 
3080  sdst.write();
3081  }
3082 
3084  : Inst_SOP1(iFmt, "s_movreld_b32")
3085  {
3086  setFlag(ALU);
3087  } // Inst_SOP1__S_MOVRELD_B32
3088 
3090  {
3091  } // ~Inst_SOP1__S_MOVRELD_B32
3092 
3093  // SGPR[D.u + M0.u].u = S0.u (move to relative destination).
3094  void
3096  {
3097  ConstScalarOperandU32 m0(gpuDynInst, REG_M0);
3098  m0.read();
3099  ConstScalarOperandU32 src(gpuDynInst, instData.SSRC0);
3100  ScalarOperandU32 sdst(gpuDynInst, instData.SDST + m0.rawData());
3101 
3102  src.read();
3103 
3104  sdst = src.rawData();
3105 
3106  sdst.write();
3107  }
3108 
3110  : Inst_SOP1(iFmt, "s_movreld_b64")
3111  {
3112  setFlag(ALU);
3113  } // Inst_SOP1__S_MOVRELD_B64
3114 
3116  {
3117  } // ~Inst_SOP1__S_MOVRELD_B64
3118 
3119  // SGPR[D.u + M0.u].u64 = S0.u64 (move to relative destination).
3120  // The index in M0.u must be even for this operation.
3121  void
3123  {
3124  ConstScalarOperandU32 m0(gpuDynInst, REG_M0);
3125  m0.read();
3126  ConstScalarOperandU64 src(gpuDynInst, instData.SSRC0);
3127  ScalarOperandU64 sdst(gpuDynInst, instData.SDST + m0.rawData());
3128 
3129  src.read();
3130 
3131  sdst = src.rawData();
3132 
3133  sdst.write();
3134  }
3135 
3137  : Inst_SOP1(iFmt, "s_cbranch_join")
3138  {
3139  setFlag(Branch);
3140  } // Inst_SOP1__S_CBRANCH_JOIN
3141 
3143  {
3144  } // ~Inst_SOP1__S_CBRANCH_JOIN
3145 
3146  // Conditional branch join point (end of conditional branch block).
3147  void
3149  {
3151  }
3152 
3154  : Inst_SOP1(iFmt, "s_abs_i32")
3155  {
3156  setFlag(ALU);
3157  } // Inst_SOP1__S_ABS_I32
3158 
3160  {
3161  } // ~Inst_SOP1__S_ABS_I32
3162 
3163  // if (S.i < 0) then D.i = -S.i;
3164  // else D.i = S.i;
3165  // SCC = 1 if result is non-zero.
3166  // Integer absolute value.
3167  void
3169  {
3170  ConstScalarOperandI32 src(gpuDynInst, instData.SSRC0);
3171  ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
3172  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3173 
3174  src.read();
3175 
3176  sdst = std::abs(src.rawData());
3177 
3178  scc = sdst.rawData() ? 1 : 0;
3179 
3180  sdst.write();
3181  scc.write();
3182  }
3183 
3185  : Inst_SOP1(iFmt, "s_mov_fed_b32")
3186  {
3187  setFlag(ALU);
3188  } // Inst_SOP1__S_MOV_FED_B32
3189 
3191  {
3192  } // ~Inst_SOP1__S_MOV_FED_B32
3193 
3194  // D.u = S0.u.
3195  void
3197  {
3199  }
3200 
3202  InFmt_SOP1 *iFmt)
3203  : Inst_SOP1(iFmt, "s_set_gpr_idx_idx")
3204  {
3205  } // Inst_SOP1__S_SET_GPR_IDX_IDX
3206 
3208  {
3209  } // ~Inst_SOP1__S_SET_GPR_IDX_IDX
3210 
3211  // M0[7:0] = S0.u[7:0].
3212  // Modify the index used in vector GPR indexing.
3213  void
3215  {
3217  }
3218 
3220  : Inst_SOPC(iFmt, "s_cmp_eq_i32")
3221  {
3222  setFlag(ALU);
3223  } // Inst_SOPC__S_CMP_EQ_I32
3224 
3226  {
3227  } // ~Inst_SOPC__S_CMP_EQ_I32
3228 
3229  // SCC = (S0.i == S1.i).
3230  void
3232  {
3233  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
3234  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
3235  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3236 
3237  src0.read();
3238  src1.read();
3239 
3240  scc = (src0.rawData() == src1.rawData()) ? 1 : 0;
3241 
3242  scc.write();
3243  }
3244 
3246  : Inst_SOPC(iFmt, "s_cmp_lg_i32")
3247  {
3248  setFlag(ALU);
3249  } // Inst_SOPC__S_CMP_LG_I32
3250 
3252  {
3253  } // ~Inst_SOPC__S_CMP_LG_I32
3254 
3255  // SCC = (S0.i != S1.i).
3256  void
3258  {
3259  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
3260  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
3261  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3262 
3263  src0.read();
3264  src1.read();
3265 
3266  scc = (src0.rawData() != src1.rawData()) ? 1 : 0;
3267 
3268  scc.write();
3269  }
3270 
3272  : Inst_SOPC(iFmt, "s_cmp_gt_i32")
3273  {
3274  setFlag(ALU);
3275  } // Inst_SOPC__S_CMP_GT_I32
3276 
3278  {
3279  } // ~Inst_SOPC__S_CMP_GT_I32
3280 
3281  // SCC = (S0.i > S1.i).
3282  void
3284  {
3285  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
3286  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
3287  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3288 
3289  src0.read();
3290  src1.read();
3291 
3292  scc = (src0.rawData() > src1.rawData()) ? 1 : 0;
3293 
3294  scc.write();
3295  }
3296 
3298  : Inst_SOPC(iFmt, "s_cmp_ge_i32")
3299  {
3300  setFlag(ALU);
3301  } // Inst_SOPC__S_CMP_GE_I32
3302 
3304  {
3305  } // ~Inst_SOPC__S_CMP_GE_I32
3306 
3307  // SCC = (S0.i >= S1.i).
3308  void
3310  {
3311  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
3312  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
3313  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3314 
3315  src0.read();
3316  src1.read();
3317 
3318  scc = (src0.rawData() >= src1.rawData()) ? 1 : 0;
3319 
3320  scc.write();
3321  }
3322 
3324  : Inst_SOPC(iFmt, "s_cmp_lt_i32")
3325  {
3326  setFlag(ALU);
3327  } // Inst_SOPC__S_CMP_LT_I32
3328 
3330  {
3331  } // ~Inst_SOPC__S_CMP_LT_I32
3332 
3333  // SCC = (S0.i < S1.i).
3334  void
3336  {
3337  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
3338  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
3339  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3340 
3341  src0.read();
3342  src1.read();
3343 
3344  scc = (src0.rawData() < src1.rawData()) ? 1 : 0;
3345 
3346  scc.write();
3347  }
3348 
3350  : Inst_SOPC(iFmt, "s_cmp_le_i32")
3351  {
3352  setFlag(ALU);
3353  } // Inst_SOPC__S_CMP_LE_I32
3354 
3356  {
3357  } // ~Inst_SOPC__S_CMP_LE_I32
3358 
3359  // SCC = (S0.i <= S1.i).
3360  void
3362  {
3363  ConstScalarOperandI32 src0(gpuDynInst, instData.SSRC0);
3364  ConstScalarOperandI32 src1(gpuDynInst, instData.SSRC1);
3365  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3366 
3367  src0.read();
3368  src1.read();
3369 
3370  scc = (src0.rawData() <= src1.rawData()) ? 1 : 0;
3371 
3372  scc.write();
3373  }
3374 
3376  : Inst_SOPC(iFmt, "s_cmp_eq_u32")
3377  {
3378  setFlag(ALU);
3379  } // Inst_SOPC__S_CMP_EQ_U32
3380 
3382  {
3383  } // ~Inst_SOPC__S_CMP_EQ_U32
3384 
3385  // SCC = (S0.u == S1.u).
3386  void
3388  {
3389  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
3390  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
3391  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3392 
3393  src0.read();
3394  src1.read();
3395 
3396  scc = (src0.rawData() == src1.rawData()) ? 1 : 0;
3397 
3398  scc.write();
3399  }
3400 
3402  : Inst_SOPC(iFmt, "s_cmp_lg_u32")
3403  {
3404  setFlag(ALU);
3405  } // Inst_SOPC__S_CMP_LG_U32
3406 
3408  {
3409  } // ~Inst_SOPC__S_CMP_LG_U32
3410 
3411  // SCC = (S0.u != S1.u).
3412  void
3414  {
3415  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
3416  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
3417  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3418 
3419  src0.read();
3420  src1.read();
3421 
3422  scc = (src0.rawData() != src1.rawData()) ? 1 : 0;
3423 
3424  scc.write();
3425  }
3426 
3428  : Inst_SOPC(iFmt, "s_cmp_gt_u32")
3429  {
3430  setFlag(ALU);
3431  } // Inst_SOPC__S_CMP_GT_U32
3432 
3434  {
3435  } // ~Inst_SOPC__S_CMP_GT_U32
3436 
3437  // SCC = (S0.u > S1.u).
3438  void
3440  {
3441  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
3442  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
3443  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3444 
3445  src0.read();
3446  src1.read();
3447 
3448  scc = (src0.rawData() > src1.rawData()) ? 1 : 0;
3449 
3450  scc.write();
3451  }
3452 
3454  : Inst_SOPC(iFmt, "s_cmp_ge_u32")
3455  {
3456  setFlag(ALU);
3457  } // Inst_SOPC__S_CMP_GE_U32
3458 
3460  {
3461  } // ~Inst_SOPC__S_CMP_GE_U32
3462 
3463  // SCC = (S0.u >= S1.u).
3464  void
3466  {
3467  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
3468  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
3469  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3470 
3471  src0.read();
3472  src1.read();
3473 
3474  scc = (src0.rawData() >= src1.rawData()) ? 1 : 0;
3475 
3476  scc.write();
3477  }
3478 
3480  : Inst_SOPC(iFmt, "s_cmp_lt_u32")
3481  {
3482  setFlag(ALU);
3483  } // Inst_SOPC__S_CMP_LT_U32
3484 
3486  {
3487  } // ~Inst_SOPC__S_CMP_LT_U32
3488 
3489  // SCC = (S0.u < S1.u).
3490  void
3492  {
3493  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
3494  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
3495  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3496 
3497  src0.read();
3498  src1.read();
3499 
3500  scc = (src0.rawData() < src1.rawData()) ? 1 : 0;
3501 
3502  scc.write();
3503  }
3504 
3506  : Inst_SOPC(iFmt, "s_cmp_le_u32")
3507  {
3508  setFlag(ALU);
3509  } // Inst_SOPC__S_CMP_LE_U32
3510 
3512  {
3513  } // ~Inst_SOPC__S_CMP_LE_U32
3514 
3515  // SCC = (S0.u <= S1.u).
3516  void
3518  {
3519  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
3520  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
3521  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3522 
3523  src0.read();
3524  src1.read();
3525 
3526  scc = (src0.rawData() <= src1.rawData()) ? 1 : 0;
3527 
3528  scc.write();
3529  }
3530 
3532  : Inst_SOPC(iFmt, "s_bitcmp0_b32")
3533  {
3534  setFlag(ALU);
3535  } // Inst_SOPC__S_BITCMP0_B32
3536 
3538  {
3539  } // ~Inst_SOPC__S_BITCMP0_B32
3540 
3541  // SCC = (S0.u[S1.u[4:0]] == 0).
3542  void
3544  {
3545  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
3546  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
3547  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3548 
3549  src0.read();
3550  src1.read();
3551 
3552  scc = !bits(src0.rawData(), bits(src1.rawData(), 4, 0)) ? 1 : 0;
3553 
3554  scc.write();
3555  }
3556 
3558  : Inst_SOPC(iFmt, "s_bitcmp1_b32")
3559  {
3560  setFlag(ALU);
3561  } // Inst_SOPC__S_BITCMP1_B32
3562 
3564  {
3565  } // ~Inst_SOPC__S_BITCMP1_B32
3566 
3567  // SCC = (S0.u[S1.u[4:0]] == 1).
3568  void
3570  {
3571  ConstScalarOperandU32 src0(gpuDynInst, instData.SSRC0);
3572  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
3573  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3574 
3575  src0.read();
3576  src1.read();
3577 
3578  scc = bits(src0.rawData(), bits(src1.rawData(), 4, 0)) ? 1 : 0;
3579 
3580  scc.write();
3581  }
3582 
3584  : Inst_SOPC(iFmt, "s_bitcmp0_b64")
3585  {
3586  setFlag(ALU);
3587  } // Inst_SOPC__S_BITCMP0_B64
3588 
3590  {
3591  } // ~Inst_SOPC__S_BITCMP0_B64
3592 
3593  // SCC = (S0.u64[S1.u[5:0]] == 0).
3594  void
3596  {
3597  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
3598  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
3599  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3600 
3601  src0.read();
3602  src1.read();
3603 
3604  scc = !bits(src0.rawData(), bits(src1.rawData(), 5, 0)) ? 1 : 0;
3605 
3606  scc.write();
3607  }
3608 
3610  : Inst_SOPC(iFmt, "s_bitcmp1_b64")
3611  {
3612  setFlag(ALU);
3613  } // Inst_SOPC__S_BITCMP1_B64
3614 
3616  {
3617  } // ~Inst_SOPC__S_BITCMP1_B64
3618 
3619  // SCC = (S0.u64[S1.u[5:0]] == 1).
3620  void
3622  {
3623  ConstScalarOperandU64 src0(gpuDynInst, instData.SSRC0);
3624  ConstScalarOperandU32 src1(gpuDynInst, instData.SSRC1);
3625  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3626 
3627  src0.read();
3628  src1.read();
3629 
3630  scc = bits(src0.rawData(), bits(src1.rawData(), 5, 0)) ? 1 : 0;
3631 
3632  scc.write();
3633  }
3634 
3636  : Inst_SOPC(iFmt, "s_setvskip")
3637  {
3638  setFlag(UnconditionalJump);
3639  } // Inst_SOPC__S_SETVSKIP
3640 
3642  {
3643  } // ~Inst_SOPC__S_SETVSKIP
3644 
3645  // VSKIP = S0.u[S1.u[4:0]].
3646  // Enables and disables VSKIP mode.
3647  // When VSKIP is enabled, no VOP*/M*BUF/MIMG/DS/FLAT/EXP instuctions are
3648  // issued.
3649  void
3651  {
3653  }
3654 
3656  : Inst_SOPC(iFmt, "s_set_gpr_idx_on")
3657  {
3658  } // Inst_SOPC__S_SET_GPR_IDX_ON
3659 
3661  {
3662  } // ~Inst_SOPC__S_SET_GPR_IDX_ON
3663 
3664  // MODE.gpr_idx_en = 1;
3665  // M0[7:0] = S0.u[7:0];
3666  // M0[15:12] = SIMM4 (direct contents of S1 field);
3667  // Remaining bits of M0 are unmodified.
3668  // Enable GPR indexing mode. Vector operations after this will perform
3669  // relative GPR addressing based on the contents of M0.
3670  // The raw contents of the S1 field are read and used to set the enable
3671  // bits. S1[0] = VSRC0_REL, S1[1] = VSRC1_REL, S1[2] = VSRC2_REL and
3672  // S1[3] = VDST_REL.
3673  void
3675  {
3677  }
3678 
3680  : Inst_SOPC(iFmt, "s_cmp_eq_u64")
3681  {
3682  setFlag(ALU);
3683  } // Inst_SOPC__S_CMP_EQ_U64
3684 
3686  {
3687  } // ~Inst_SOPC__S_CMP_EQ_U64
3688 
3689  // SCC = (S0.i64 == S1.i64).
3690  void
3692  {
3693  ConstScalarOperandI64 src0(gpuDynInst, instData.SSRC0);
3694  ConstScalarOperandI64 src1(gpuDynInst, instData.SSRC1);
3695  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3696 
3697  src0.read();
3698  src1.read();
3699 
3700  scc = (src0.rawData() == src1.rawData()) ? 1 : 0;
3701 
3702  scc.write();
3703  }
3704 
3706  : Inst_SOPC(iFmt, "s_cmp_lg_u64")
3707  {
3708  setFlag(ALU);
3709  } // Inst_SOPC__S_CMP_LG_U64
3710 
3712  {
3713  } // ~Inst_SOPC__S_CMP_LG_U64
3714 
3715  // SCC = (S0.i64 != S1.i64).
3716  void
3718  {
3719  ConstScalarOperandI64 src0(gpuDynInst, instData.SSRC0);
3720  ConstScalarOperandI64 src1(gpuDynInst, instData.SSRC1);
3721  ScalarOperandU32 scc(gpuDynInst, REG_SCC);
3722 
3723  src0.read();
3724  src1.read();
3725 
3726  scc = (src0.rawData() != src1.rawData()) ? 1 : 0;
3727 
3728  scc.write();
3729  }
3730 
3732  : Inst_SOPP(iFmt, "s_nop")
3733  {
3734  setFlag(Nop);
3735  } // Inst_SOPP__S_NOP
3736 
3738  {
3739  } // ~Inst_SOPP__S_NOP
3740 
3741  // Do nothing.
3742  void
3744  {
3745  }
3746 
3748  : Inst_SOPP(iFmt, "s_endpgm")
3749  {
3750  setFlag(EndOfKernel);
3751  } // Inst_SOPP__S_ENDPGM
3752 
3754  {
3755  } // ~Inst_SOPP__S_ENDPGM
3756 
3757  // End of program; terminate wavefront.
3758  void
3760  {
3761  Wavefront *wf = gpuDynInst->wavefront();
3762  ComputeUnit *cu = gpuDynInst->computeUnit();
3763 
3764  // delete extra instructions fetched for completed work-items
3765  wf->instructionBuffer.erase(wf->instructionBuffer.begin() + 1,
3766  wf->instructionBuffer.end());
3767 
3768  if (wf->pendingFetch) {
3769  wf->dropFetch = true;
3770  }
3771 
3773  .flushBuf(wf->wfSlotId);
3775 
3776  int refCount = wf->computeUnit->getLds()
3777  .decreaseRefCounter(wf->dispatchId, wf->wgId);
3778 
3784  int bar_id = WFBarrier::InvalidID;
3785  if (wf->hasBarrier()) {
3786  assert(wf->getStatus() != Wavefront::S_BARRIER);
3787  bar_id = wf->barrierId();
3788  assert(bar_id != WFBarrier::InvalidID);
3789  wf->releaseBarrier();
3790  cu->decMaxBarrierCnt(bar_id);
3791  DPRINTF(GPUSync, "CU[%d] WF[%d][%d] Wave[%d] - Exiting the "
3792  "program and decrementing max barrier count for "
3793  "barrier Id%d. New max count: %d.\n", cu->cu_id,
3794  wf->simdId, wf->wfSlotId, wf->wfDynId, bar_id,
3795  cu->maxBarrierCnt(bar_id));
3796  }
3797 
3798  DPRINTF(GPUExec, "CU%d: decrease ref ctr WG[%d] to [%d]\n",
3799  wf->computeUnit->cu_id, wf->wgId, refCount);
3800 
3803  wf->computeUnit->activeWaves--;
3804 
3805  panic_if(wf->computeUnit->activeWaves < 0, "CU[%d] Active waves less "
3806  "than zero\n", wf->computeUnit->cu_id);
3807 
3808  DPRINTF(GPUExec, "Doing return for CU%d: WF[%d][%d][%d]\n",
3809  wf->computeUnit->cu_id, wf->simdId, wf->wfSlotId, wf->wfDynId);
3810 
3811  for (int i = 0; i < wf->vecReads.size(); i++) {
3812  if (wf->rawDist.find(i) != wf->rawDist.end()) {
3813  wf->stats.readsPerWrite.sample(wf->vecReads.at(i));
3814  }
3815  }
3816  wf->vecReads.clear();
3817  wf->rawDist.clear();
3818  wf->lastInstExec = 0;
3819 
3820  if (!refCount) {
3827  if (bar_id != WFBarrier::InvalidID) {
3828  DPRINTF(GPUSync, "CU[%d] WF[%d][%d] Wave[%d] - All waves are "
3829  "now complete. Releasing barrier Id%d.\n", cu->cu_id,
3830  wf->simdId, wf->wfSlotId, wf->wfDynId,
3831  wf->barrierId());
3832  cu->releaseBarrier(bar_id);
3833  }
3834 
3842  // check whether the workgroup is indicating the kernel end (i.e.,
3843  // the last workgroup in the kernel).
3844  bool kernelEnd =
3846  // further check whether 'release @ kernel end' is needed
3847  bool relNeeded =
3849 
3850  // if not a kernel end or no release needed, retire the workgroup
3851  // directly
3852  if (!kernelEnd || !relNeeded) {
3856 
3857  return;
3858  }
3859 
3864  setFlag(MemSync);
3865  setFlag(GlobalSegment);
3866  // Notify Memory System of Kernel Completion
3868  gpuDynInst->simdId = wf->simdId;
3869  gpuDynInst->wfSlotId = wf->wfSlotId;
3870  gpuDynInst->wfDynId = wf->wfDynId;
3871 
3872  DPRINTF(GPUExec, "inject global memory fence for CU%d: "
3873  "WF[%d][%d][%d]\n", wf->computeUnit->cu_id,
3874  wf->simdId, wf->wfSlotId, wf->wfDynId);
3875 
3876  // call shader to prepare the flush operations
3877  wf->computeUnit->shader->prepareFlush(gpuDynInst);
3878 
3880  } else {
3882  }
3883  }
3884 
3885 
3887  : Inst_SOPP(iFmt, "s_branch")
3888  {
3889  setFlag(Branch);
3890  } // Inst_SOPP__S_BRANCH
3891 
3893  {
3894  } // ~Inst_SOPP__S_BRANCH
3895 
3896  // PC = PC + signext(SIMM16 * 4) + 4 (short jump).
3897  void
3899  {
3900  Wavefront *wf = gpuDynInst->wavefront();
3901  Addr pc = wf->pc();
3902  ScalarRegI16 simm16 = instData.SIMM16;
3903 
3904  pc = pc + ((ScalarRegI64)sext<18>(simm16 * 4LL)) + 4LL;
3905 
3906  wf->pc(pc);
3907  }
3908 
3910  : Inst_SOPP(iFmt, "s_wakeup")
3911  {
3912  } // Inst_SOPP__S_WAKEUP
3913 
3915  {
3916  } // ~Inst_SOPP__S_WAKEUP
3917 
3918  // Allow a wave to wakeup all the other waves in its workgroup to force
3919  // them to wake up immediately from an S_SLEEP instruction. The wakeup is
3920  // ignored if the waves are not sleeping.
3921  void
3923  {
3925  }
3926 
3928  : Inst_SOPP(iFmt, "s_cbranch_scc0")
3929  {
3930  setFlag(Branch);
3931  } // Inst_SOPP__S_CBRANCH_SCC0
3932 
3934  {
3935  } // ~Inst_SOPP__S_CBRANCH_SCC0
3936 
3937  // if (SCC == 0) then PC = PC + signext(SIMM16 * 4) + 4;
3938  // else NOP.
3939  void
3941  {
3942  Wavefront *wf = gpuDynInst->wavefront();
3943  Addr pc = wf->pc();
3944  ScalarRegI16 simm16 = instData.SIMM16;
3945  ConstScalarOperandU32 scc(gpuDynInst, REG_SCC);
3946 
3947  scc.read();
3948 
3949  if (!scc.rawData()) {
3950  pc = pc + ((ScalarRegI64)sext<18>(simm16 * 4LL)) + 4LL;
3951  }
3952 
3953  wf->pc(pc);
3954  }
3955 
3957  : Inst_SOPP(iFmt, "s_cbranch_scc1")
3958  {
3959  setFlag(Branch);
3960  } // Inst_SOPP__S_CBRANCH_SCC1
3961 
3963  {
3964  } // ~Inst_SOPP__S_CBRANCH_SCC1
3965 
3966  // if (SCC == 1) then PC = PC + signext(SIMM16 * 4) + 4;
3967  // else NOP.
3968  void
3970  {
3971  Wavefront *wf = gpuDynInst->wavefront();
3972  Addr pc = wf->pc();
3973  ScalarRegI16 simm16 = instData.SIMM16;
3974  ConstScalarOperandU32 scc(gpuDynInst, REG_SCC);
3975 
3976  scc.read();
3977 
3978  if (scc.rawData()) {
3979  pc = pc + ((ScalarRegI64)sext<18>(simm16 * 4LL)) + 4LL;
3980  }
3981 
3982  wf->pc(pc);
3983  }
3984 
3986  : Inst_SOPP(iFmt, "s_cbranch_vccz")
3987  {
3988  setFlag(Branch);
3989  setFlag(ReadsVCC);
3990  } // Inst_SOPP__S_CBRANCH_VCCZ
3991 
3993  {
3994  } // ~Inst_SOPP__S_CBRANCH_VCCZ
3995 
3996  // if (VCC == 0) then PC = PC + signext(SIMM16 * 4) + 4;
3997  // else NOP.
3998  void
4000  {
4001  Wavefront *wf = gpuDynInst->wavefront();
4002  ConstScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
4003  Addr pc = wf->pc();
4004  ScalarRegI16 simm16 = instData.SIMM16;
4005 
4006  vcc.read();
4007 
4008  if (!vcc.rawData()) {
4009  pc = pc + ((ScalarRegI64)sext<18>(simm16 * 4LL)) + 4LL;
4010  }
4011 
4012  wf->pc(pc);
4013  }
4014 
4016  : Inst_SOPP(iFmt, "s_cbranch_vccnz")
4017  {
4018  setFlag(Branch);
4019  setFlag(ReadsVCC);
4020  } // Inst_SOPP__S_CBRANCH_VCCNZ
4021 
4023  {
4024  } // ~Inst_SOPP__S_CBRANCH_VCCNZ
4025 
4026  // if (VCC != 0) then PC = PC + signext(SIMM16 * 4) + 4;
4027  // else NOP.
4028  void
4030  {
4031  Wavefront *wf = gpuDynInst->wavefront();
4032  ConstScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
4033 
4034  vcc.read();
4035 
4036  if (vcc.rawData()) {
4037  Addr pc = wf->pc();
4038  ScalarRegI16 simm16 = instData.SIMM16;
4039  pc = pc + ((ScalarRegI64)sext<18>(simm16 * 4LL)) + 4LL;
4040  wf->pc(pc);
4041  }
4042  }
4043 
4045  : Inst_SOPP(iFmt, "s_cbranch_execz")
4046  {
4047  setFlag(Branch);
4048  } // Inst_SOPP__S_CBRANCH_EXECZ
4049 
4051  {
4052  } // ~Inst_SOPP__S_CBRANCH_EXECZ
4053 
4054  // if (EXEC == 0) then PC = PC + signext(SIMM16 * 4) + 4;
4055  // else NOP.
4056  void
4058  {
4059  Wavefront *wf = gpuDynInst->wavefront();
4060 
4061  if (wf->execMask().none()) {
4062  Addr pc = wf->pc();
4063  ScalarRegI16 simm16 = instData.SIMM16;
4064  pc = pc + ((ScalarRegI64)sext<18>(simm16 * 4LL)) + 4LL;
4065  wf->pc(pc);
4066  }
4067  }
4068 
4070  : Inst_SOPP(iFmt, "s_cbranch_execnz")
4071  {
4072  setFlag(Branch);
4073  } // Inst_SOPP__S_CBRANCH_EXECNZ
4074 
4076  {
4077  } // ~Inst_SOPP__S_CBRANCH_EXECNZ
4078 
4079  // if (EXEC != 0) then PC = PC + signext(SIMM16 * 4) + 4;
4080  // else NOP.
4081  void
4083  {
4084  Wavefront *wf = gpuDynInst->wavefront();
4085 
4086  if (wf->execMask().any()) {
4087  Addr pc = wf->pc();
4088  ScalarRegI16 simm16 = instData.SIMM16;
4089  pc = pc + ((ScalarRegI64)sext<18>(simm16 * 4LL)) + 4LL;
4090  wf->pc(pc);
4091  }
4092  }
4093 
4095  : Inst_SOPP(iFmt, "s_barrier")
4096  {
4097  setFlag(MemBarrier);
4098  } // Inst_SOPP__S_BARRIER
4099 
4101  {
4102  } // ~Inst_SOPP__S_BARRIER
4103 
4110  void
4112  {
4113  Wavefront *wf = gpuDynInst->wavefront();
4114  ComputeUnit *cu = gpuDynInst->computeUnit();
4115 
4116  if (wf->hasBarrier()) {
4117  int bar_id = wf->barrierId();
4118  cu->incNumAtBarrier(bar_id);
4119  DPRINTF(GPUSync, "CU[%d] WF[%d][%d] Wave[%d] - Stalling at "
4120  "barrier Id%d. %d waves now at barrier, %d waves "
4121  "remain.\n", cu->cu_id, wf->simdId, wf->wfSlotId,
4122  wf->wfDynId, bar_id, cu->numAtBarrier(bar_id),
4123  cu->numYetToReachBarrier(bar_id));
4124  }
4125  } // execute
4126  // --- Inst_SOPP__S_SETKILL class methods ---
4127 
4129  : Inst_SOPP(iFmt, "s_setkill")
4130  {
4131  } // Inst_SOPP__S_SETKILL
4132 
4134  {
4135  } // ~Inst_SOPP__S_SETKILL
4136 
4137  void
4139  {
4141  }
4142 
4144  : Inst_SOPP(iFmt, "s_waitcnt")
4145  {
4146  setFlag(ALU);
4147  setFlag(Waitcnt);
4148  } // Inst_SOPP__S_WAITCNT
4149 
4151  {
4152  } // ~Inst_SOPP__S_WAITCNT
4153 
4154  // Wait for the counts of outstanding lds, vector-memory and
4155  // export/vmem-write-data to be at or below the specified levels.
4156  // SIMM16[3:0] = vmcount (vector memory operations),
4157  // SIMM16[6:4] = export/mem-write-data count,
4158  // SIMM16[12:8] = LGKM_cnt (scalar-mem/GDS/LDS count).
4159  void
4161  {
4162  ScalarRegI32 vm_cnt = 0;
4163  ScalarRegI32 exp_cnt = 0;
4164  ScalarRegI32 lgkm_cnt = 0;
4165  vm_cnt = bits<ScalarRegI16>(instData.SIMM16, 3, 0);
4166  exp_cnt = bits<ScalarRegI16>(instData.SIMM16, 6, 4);
4167  lgkm_cnt = bits<ScalarRegI16>(instData.SIMM16, 12, 8);
4168  gpuDynInst->wavefront()->setWaitCnts(vm_cnt, exp_cnt, lgkm_cnt);
4169  }
4170 
4172  : Inst_SOPP(iFmt, "s_sethalt")
4173  {
4174  } // Inst_SOPP__S_SETHALT
4175 
4177  {
4178  } // ~Inst_SOPP__S_SETHALT
4179 
4180  void
4182  {
4184  }
4185 
4187  : Inst_SOPP(iFmt, "s_sleep")
4188  {
4189  setFlag(ALU);
4190  setFlag(Sleep);
4191  } // Inst_SOPP__S_SLEEP
4192 
4194  {
4195  } // ~Inst_SOPP__S_SLEEP
4196 
4197  // Cause a wave to sleep for (64 * SIMM16[2:0] + 1..64) clocks.
4198  void
4200  {
4202  gpuDynInst->wavefront()->setStatus(Wavefront::S_STALLED_SLEEP);
4203  // sleep duration is specified in multiples of 64 cycles
4204  gpuDynInst->wavefront()->setSleepTime(64 * simm16);
4205  } // execute
4206  // --- Inst_SOPP__S_SETPRIO class methods ---
4207 
4209  : Inst_SOPP(iFmt, "s_setprio")
4210  {
4211  } // Inst_SOPP__S_SETPRIO
4212 
4214  {
4215  } // ~Inst_SOPP__S_SETPRIO
4216 
4217  // User settable wave priority is set to SIMM16[1:0]. 0 = lowest,
4218  // 3 = highest.
4219  void
4221  {
4223  }
4224 
4226  : Inst_SOPP(iFmt, "s_sendmsg")
4227  {
4228  } // Inst_SOPP__S_SENDMSG
4229 
4231  {
4232  } // ~Inst_SOPP__S_SENDMSG
4233 
4234  void
4236  {
4238  }
4239 
4241  : Inst_SOPP(iFmt, "s_sendmsghalt")
4242  {
4243  } // Inst_SOPP__S_SENDMSGHALT
4244 
4246  {
4247  } // ~Inst_SOPP__S_SENDMSGHALT
4248 
4249  void
4251  {
4253  }
4254 
4256  : Inst_SOPP(iFmt, "s_trap")
4257  {
4258  } // Inst_SOPP__S_TRAP
4259 
4261  {
4262  } // ~Inst_SOPP__S_TRAP
4263 
4264  // Enter the trap handler.
4265  void
4267  {
4269  }
4270 
4272  : Inst_SOPP(iFmt, "s_icache_inv")
4273  {
4274  } // Inst_SOPP__S_ICACHE_INV
4275 
4277  {
4278  } // ~Inst_SOPP__S_ICACHE_INV
4279 
4280  // Invalidate entire L1 instruction cache.
4281  void
4283  {
4285  }
4286 
4288  : Inst_SOPP(iFmt, "s_incperflevel")
4289  {
4290  } // Inst_SOPP__S_INCPERFLEVEL
4291 
4293  {
4294  } // ~Inst_SOPP__S_INCPERFLEVEL
4295 
4296  void
4298  {
4300  }
4301 
4303  : Inst_SOPP(iFmt, "s_decperflevel")
4304  {
4305  } // Inst_SOPP__S_DECPERFLEVEL
4306 
4308  {
4309  } // ~Inst_SOPP__S_DECPERFLEVEL
4310 
4311  void
4313  {
4315  }
4316 
4318  : Inst_SOPP(iFmt, "s_ttracedata")
4319  {
4320  } // Inst_SOPP__S_TTRACEDATA
4321 
4323  {
4324  } // ~Inst_SOPP__S_TTRACEDATA
4325 
4326  void
4328  {
4330  }
4331 
4333  InFmt_SOPP *iFmt)
4334  : Inst_SOPP(iFmt, "s_cbranch_cdbgsys")
4335  {
4336  setFlag(Branch);
4337  } // Inst_SOPP__S_CBRANCH_CDBGSYS
4338 
4340  {
4341  } // ~Inst_SOPP__S_CBRANCH_CDBGSYS
4342 
4343  void
4345  {
4347  }
4348 
4350  InFmt_SOPP *iFmt)
4351  : Inst_SOPP(iFmt, "s_cbranch_cdbguser")
4352  {
4353  setFlag(Branch);
4354  } // Inst_SOPP__S_CBRANCH_CDBGUSER
4355 
4357  {
4358  } // ~Inst_SOPP__S_CBRANCH_CDBGUSER
4359 
4360  void
4362  {
4364  }
4365 
4367  InFmt_SOPP *iFmt)
4368  : Inst_SOPP(iFmt, "s_cbranch_cdbgsys_or_user")
4369  {
4370  setFlag(Branch);
4371  } // Inst_SOPP__S_CBRANCH_CDBGSYS_OR_USER
4372 
4375  {
4376  } // ~Inst_SOPP__S_CBRANCH_CDBGSYS_OR_USER
4377 
4378  void
4380  {
4382  }
4383 
4386  : Inst_SOPP(iFmt, "s_cbranch_cdbgsys_and_user")
4387  {
4388  setFlag(Branch);
4389  } // Inst_SOPP__S_CBRANCH_CDBGSYS_AND_USER
4390 
4393  {
4394  } // ~Inst_SOPP__S_CBRANCH_CDBGSYS_AND_USER
4395 
4396  void
4398  {
4400  }
4401 
4403  : Inst_SOPP(iFmt, "s_endpgm_saved")
4404  {
4405  } // Inst_SOPP__S_ENDPGM_SAVED
4406 
4408  {
4409  } // ~Inst_SOPP__S_ENDPGM_SAVED
4410 
4411  // End of program.
4412  void
4414  {
4416  }
4417 
4419  InFmt_SOPP *iFmt)
4420  : Inst_SOPP(iFmt, "s_set_gpr_idx_off")
4421  {
4422  } // Inst_SOPP__S_SET_GPR_IDX_OFF
4423 
4425  {
4426  } // ~Inst_SOPP__S_SET_GPR_IDX_OFF
4427 
4428  // MODE.gpr_idx_en = 0.
4429  // Clear GPR indexing mode. Vector operations after this will not perform
4430  // relative GPR addressing regardless of the contents of M0.
4431  void
4433  {
4435  }
4436 
4438  InFmt_SOPP *iFmt)
4439  : Inst_SOPP(iFmt, "s_set_gpr_idx_mode")
4440  {
4441  } // Inst_SOPP__S_SET_GPR_IDX_MODE
4442 
4444  {
4445  } // ~Inst_SOPP__S_SET_GPR_IDX_MODE
4446 
4447  // M0[15:12] = SIMM4.
4448  // Modify the mode used for vector GPR indexing.
4449  // The raw contents of the source field are read and used to set the enable
4450  // bits. SIMM4[0] = VSRC0_REL, SIMM4[1] = VSRC1_REL, SIMM4[2] = VSRC2_REL
4451  // and SIMM4[3] = VDST_REL.
4452  void
4454  {
4456  }
4457 
4459  : Inst_SMEM(iFmt, "s_load_dword")
4460  {
4461  setFlag(MemoryRef);
4462  setFlag(Load);
4463  } // Inst_SMEM__S_LOAD_DWORD
4464 
4466  {
4467  } // ~Inst_SMEM__S_LOAD_DWORD
4468 
4475  void
4477  {
4478  Wavefront *wf = gpuDynInst->wavefront();
4479  gpuDynInst->execUnitId = wf->execUnitId;
4480  gpuDynInst->latency.init(gpuDynInst->computeUnit());
4481  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
4482  ScalarRegU32 offset(0);
4483  ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
4484 
4485  addr.read();
4486 
4487  if (instData.IMM) {
4488  offset = extData.OFFSET;
4489  } else {
4490  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
4491  off_sgpr.read();
4492  offset = off_sgpr.rawData();
4493  }
4494 
4495  calcAddr(gpuDynInst, addr, offset);
4496 
4497  gpuDynInst->computeUnit()->scalarMemoryPipe
4498  .issueRequest(gpuDynInst);
4499  }
4500 
4501  void
4503  {
4504  initMemRead<1>(gpuDynInst);
4505  } // initiateAcc
4506 
4507  void
4509  {
4510  ScalarOperandU32 sdst(gpuDynInst, instData.SDATA);
4511  sdst.write();
4512  } // completeAcc
4513 
4515  : Inst_SMEM(iFmt, "s_load_dwordx2")
4516  {
4517  setFlag(MemoryRef);
4518  setFlag(Load);
4519  } // Inst_SMEM__S_LOAD_DWORDX2
4520 
4522  {
4523  } // ~Inst_SMEM__S_LOAD_DWORDX2
4524 
4529  void
4531  {
4532  Wavefront *wf = gpuDynInst->wavefront();
4533  gpuDynInst->execUnitId = wf->execUnitId;
4534  gpuDynInst->latency.init(gpuDynInst->computeUnit());
4535  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
4536  ScalarRegU32 offset(0);
4537  ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
4538 
4539  addr.read();
4540 
4541  if (instData.IMM) {
4542  offset = extData.OFFSET;
4543  } else {
4544  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
4545  off_sgpr.read();
4546  offset = off_sgpr.rawData();
4547  }
4548 
4549  calcAddr(gpuDynInst, addr, offset);
4550 
4551  gpuDynInst->computeUnit()->scalarMemoryPipe.
4552  issueRequest(gpuDynInst);
4553  }
4554 
4555  void
4557  {
4558  initMemRead<2>(gpuDynInst);
4559  } // initiateAcc
4560 
4561  void
4563  {
4564  ScalarOperandU64 sdst(gpuDynInst, instData.SDATA);
4565  sdst.write();
4566  } // completeAcc
4567 
4569  : Inst_SMEM(iFmt, "s_load_dwordx4")
4570  {
4571  setFlag(MemoryRef);
4572  setFlag(Load);
4573  } // Inst_SMEM__S_LOAD_DWORDX4
4574 
4576  {
4577  } // ~Inst_SMEM__S_LOAD_DWORDX4
4578 
4579  // Read 4 dwords from scalar data cache. See S_LOAD_DWORD for details on
4580  // the offset input.
4581  void
4583  {
4584  Wavefront *wf = gpuDynInst->wavefront();
4585  gpuDynInst->execUnitId = wf->execUnitId;
4586  gpuDynInst->latency.init(gpuDynInst->computeUnit());
4587  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
4588  ScalarRegU32 offset(0);
4589  ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
4590 
4591  addr.read();
4592 
4593  if (instData.IMM) {
4594  offset = extData.OFFSET;
4595  } else {
4596  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
4597  off_sgpr.read();
4598  offset = off_sgpr.rawData();
4599  }
4600 
4601  calcAddr(gpuDynInst, addr, offset);
4602 
4603  gpuDynInst->computeUnit()->scalarMemoryPipe.
4604  issueRequest(gpuDynInst);
4605  }
4606 
4607  void
4609  {
4610  initMemRead<4>(gpuDynInst);
4611  } // initiateAcc
4612 
4613  void
4615  {
4616  ScalarOperandU128 sdst(gpuDynInst, instData.SDATA);
4617  sdst.write();
4618  } // completeAcc
4619 
4621  : Inst_SMEM(iFmt, "s_load_dwordx8")
4622  {
4623  setFlag(MemoryRef);
4624  setFlag(Load);
4625  } // Inst_SMEM__S_LOAD_DWORDX8
4626 
4628  {
4629  } // ~Inst_SMEM__S_LOAD_DWORDX8
4630 
4631  // Read 8 dwords from scalar data cache. See S_LOAD_DWORD for details on
4632  // the offset input.
4633  void
4635  {
4636  Wavefront *wf = gpuDynInst->wavefront();
4637  gpuDynInst->execUnitId = wf->execUnitId;
4638  gpuDynInst->latency.init(gpuDynInst->computeUnit());
4639  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
4640  ScalarRegU32 offset(0);
4641  ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
4642 
4643  addr.read();
4644 
4645  if (instData.IMM) {
4646  offset = extData.OFFSET;
4647  } else {
4648  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
4649  off_sgpr.read();
4650  offset = off_sgpr.rawData();
4651  }
4652 
4653  calcAddr(gpuDynInst, addr, offset);
4654 
4655  gpuDynInst->computeUnit()->scalarMemoryPipe.
4656  issueRequest(gpuDynInst);
4657  }
4658 
4659  void
4661  {
4662  initMemRead<8>(gpuDynInst);
4663  } // initiateAcc
4664 
4665  void
4667  {
4668  ScalarOperandU256 sdst(gpuDynInst, instData.SDATA);
4669  sdst.write();
4670  } // completeAcc
4671 
4673  : Inst_SMEM(iFmt, "s_load_dwordx16")
4674  {
4675  setFlag(MemoryRef);
4676  setFlag(Load);
4677  } // Inst_SMEM__S_LOAD_DWORDX16
4678 
4680  {
4681  } // ~Inst_SMEM__S_LOAD_DWORDX16
4682 
4683  // Read 16 dwords from scalar data cache. See S_LOAD_DWORD for details on
4684  // the offset input.
4685  void
4687  {
4688  Wavefront *wf = gpuDynInst->wavefront();
4689  gpuDynInst->execUnitId = wf->execUnitId;
4690  gpuDynInst->latency.init(gpuDynInst->computeUnit());
4691  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
4692  ScalarRegU32 offset(0);
4693  ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
4694 
4695  addr.read();
4696 
4697  if (instData.IMM) {
4698  offset = extData.OFFSET;
4699  } else {
4700  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
4701  off_sgpr.read();
4702  offset = off_sgpr.rawData();
4703  }
4704 
4705  calcAddr(gpuDynInst, addr, offset);
4706 
4707  gpuDynInst->computeUnit()->scalarMemoryPipe.
4708  issueRequest(gpuDynInst);
4709  }
4710 
4711  void
4713  {
4714  initMemRead<16>(gpuDynInst);
4715  } // initiateAcc
4716 
4717  void
4719  {
4720  ScalarOperandU512 sdst(gpuDynInst, instData.SDATA);
4721  sdst.write();
4722  } // completeAcc
4723 
4725  InFmt_SMEM *iFmt)
4726  : Inst_SMEM(iFmt, "s_buffer_load_dword")
4727  {
4728  setFlag(MemoryRef);
4729  setFlag(Load);
4730  } // Inst_SMEM__S_BUFFER_LOAD_DWORD
4731 
4733  {
4734  } // ~Inst_SMEM__S_BUFFER_LOAD_DWORD
4735 
4736  // Read 1 dword from scalar data cache. See S_LOAD_DWORD for details on the
4737  // offset input.
4738  void
4740  {
4741  Wavefront *wf = gpuDynInst->wavefront();
4742  gpuDynInst->execUnitId = wf->execUnitId;
4743  gpuDynInst->latency.init(gpuDynInst->computeUnit());
4744  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
4745  ScalarRegU32 offset(0);
4746  ConstScalarOperandU128 rsrcDesc(gpuDynInst, instData.SBASE);
4747 
4748  rsrcDesc.read();
4749 
4750  if (instData.IMM) {
4751  offset = extData.OFFSET;
4752  } else {
4753  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
4754  off_sgpr.read();
4755  offset = off_sgpr.rawData();
4756  }
4757 
4758  calcAddr(gpuDynInst, rsrcDesc, offset);
4759 
4760  gpuDynInst->computeUnit()->scalarMemoryPipe
4761  .issueRequest(gpuDynInst);
4762  } // execute
4763 
4764  void
4766  {
4767  initMemRead<1>(gpuDynInst);
4768  } // initiateAcc
4769 
4770  void
4772  {
4773  // 1 request, size 32
4774  ScalarOperandU32 sdst(gpuDynInst, instData.SDATA);
4775  sdst.write();
4776  } // completeAcc
4777 
4779  InFmt_SMEM *iFmt)
4780  : Inst_SMEM(iFmt, "s_buffer_load_dwordx2")
4781  {
4782  setFlag(MemoryRef);
4783  setFlag(Load);
4784  } // Inst_SMEM__S_BUFFER_LOAD_DWORDX2
4785 
4787  {
4788  } // ~Inst_SMEM__S_BUFFER_LOAD_DWORDX2
4789 
4790  // Read 2 dwords from scalar data cache. See S_LOAD_DWORD for details on
4791  // the offset input.
4792  void
4794  {
4795  Wavefront *wf = gpuDynInst->wavefront();
4796  gpuDynInst->execUnitId = wf->execUnitId;
4797  gpuDynInst->latency.init(gpuDynInst->computeUnit());
4798  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
4799  ScalarRegU32 offset(0);
4800  ConstScalarOperandU128 rsrcDesc(gpuDynInst, instData.SBASE);
4801 
4802  rsrcDesc.read();
4803 
4804  if (instData.IMM) {
4805  offset = extData.OFFSET;
4806  } else {
4807  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
4808  off_sgpr.read();
4809  offset = off_sgpr.rawData();
4810  }
4811 
4812  calcAddr(gpuDynInst, rsrcDesc, offset);
4813 
4814  gpuDynInst->computeUnit()->scalarMemoryPipe
4815  .issueRequest(gpuDynInst);
4816  } // execute
4817 
4818  void
4820  {
4821  initMemRead<2>(gpuDynInst);
4822  } // initiateAcc
4823 
4824  void
4826  {
4827  // use U64 because 2 requests, each size 32
4828  ScalarOperandU64 sdst(gpuDynInst, instData.SDATA);
4829  sdst.write();
4830  } // completeAcc
4831 
4833  InFmt_SMEM *iFmt)
4834  : Inst_SMEM(iFmt, "s_buffer_load_dwordx4")
4835  {
4836  setFlag(MemoryRef);
4837  setFlag(Load);
4838  } // Inst_SMEM__S_BUFFER_LOAD_DWORDX4
4839 
4841  {
4842  } // ~Inst_SMEM__S_BUFFER_LOAD_DWORDX4
4843 
4844  // Read 4 dwords from scalar data cache. See S_LOAD_DWORD for details on
4845  // the offset input.
4846  void
4848  {
4849  Wavefront *wf = gpuDynInst->wavefront();
4850  gpuDynInst->execUnitId = wf->execUnitId;
4851  gpuDynInst->latency.init(gpuDynInst->computeUnit());
4852  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
4853  ScalarRegU32 offset(0);
4854  ConstScalarOperandU128 rsrcDesc(gpuDynInst, instData.SBASE);
4855 
4856  rsrcDesc.read();
4857 
4858  if (instData.IMM) {
4859  offset = extData.OFFSET;
4860  } else {
4861  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
4862  off_sgpr.read();
4863  offset = off_sgpr.rawData();
4864  }
4865 
4866  calcAddr(gpuDynInst, rsrcDesc, offset);
4867 
4868  gpuDynInst->computeUnit()->scalarMemoryPipe
4869  .issueRequest(gpuDynInst);
4870  } // execute
4871 
4872  void
4874  {
4875  initMemRead<4>(gpuDynInst);
4876  } // initiateAcc
4877 
4878  void
4880  {
4881  // 4 requests, each size 32
4882  ScalarOperandU128 sdst(gpuDynInst, instData.SDATA);
4883  sdst.write();
4884  } // completeAcc
4885 
4887  InFmt_SMEM *iFmt)
4888  : Inst_SMEM(iFmt, "s_buffer_load_dwordx8")
4889  {
4890  setFlag(MemoryRef);
4891  setFlag(Load);
4892  } // Inst_SMEM__S_BUFFER_LOAD_DWORDX8
4893 
4895  {
4896  } // ~Inst_SMEM__S_BUFFER_LOAD_DWORDX8
4897 
4898  // Read 8 dwords from scalar data cache. See S_LOAD_DWORD for details on
4899  // the offset input.
4900  void
4902  {
4903  Wavefront *wf = gpuDynInst->wavefront();
4904  gpuDynInst->execUnitId = wf->execUnitId;
4905  gpuDynInst->latency.init(gpuDynInst->computeUnit());
4906  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
4907  ScalarRegU32 offset(0);
4908  ConstScalarOperandU128 rsrcDesc(gpuDynInst, instData.SBASE);
4909 
4910  rsrcDesc.read();
4911 
4912  if (instData.IMM) {
4913  offset = extData.OFFSET;
4914  } else {
4915  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
4916  off_sgpr.read();
4917  offset = off_sgpr.rawData();
4918  }
4919 
4920  calcAddr(gpuDynInst, rsrcDesc, offset);
4921 
4922  gpuDynInst->computeUnit()->scalarMemoryPipe
4923  .issueRequest(gpuDynInst);
4924  } // execute
4925 
4926  void
4928  {
4929  initMemRead<8>(gpuDynInst);
4930  } // initiateAcc
4931 
4932  void
4934  {
4935  // 8 requests, each size 32
4936  ScalarOperandU256 sdst(gpuDynInst, instData.SDATA);
4937  sdst.write();
4938  } // completeAcc
4939 
4941  InFmt_SMEM *iFmt)
4942  : Inst_SMEM(iFmt, "s_buffer_load_dwordx16")
4943  {
4944  setFlag(MemoryRef);
4945  setFlag(Load);
4946  } // Inst_SMEM__S_BUFFER_LOAD_DWORDX16
4947 
4949  {
4950  } // ~Inst_SMEM__S_BUFFER_LOAD_DWORDX16
4951 
4952  // Read 16 dwords from scalar data cache. See S_LOAD_DWORD for details on
4953  // the offset input.
4954  void
4956  {
4957  Wavefront *wf = gpuDynInst->wavefront();
4958  gpuDynInst->execUnitId = wf->execUnitId;
4959  gpuDynInst->latency.init(gpuDynInst->computeUnit());
4960  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
4961  ScalarRegU32 offset(0);
4962  ConstScalarOperandU128 rsrcDesc(gpuDynInst, instData.SBASE);
4963 
4964  rsrcDesc.read();
4965 
4966  if (instData.IMM) {
4967  offset = extData.OFFSET;
4968  } else {
4969  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
4970  off_sgpr.read();
4971  offset = off_sgpr.rawData();
4972  }
4973 
4974  calcAddr(gpuDynInst, rsrcDesc, offset);
4975 
4976  gpuDynInst->computeUnit()->scalarMemoryPipe
4977  .issueRequest(gpuDynInst);
4978  } // execute
4979 
4980  void
4982  {
4983  initMemRead<16>(gpuDynInst);
4984  } // initiateAcc
4985 
4986  void
4988  {
4989  // 16 requests, each size 32
4990  ScalarOperandU512 sdst(gpuDynInst, instData.SDATA);
4991  sdst.write();
4992  } // completeAcc
4993 
4995  : Inst_SMEM(iFmt, "s_store_dword")
4996  {
4997  setFlag(MemoryRef);
4998  setFlag(Store);
4999  } // Inst_SMEM__S_STORE_DWORD
5000 
5002  {
5003  } // ~Inst_SMEM__S_STORE_DWORD
5004 
5005  // Write 1 dword to scalar data cache.
5006  // If the offset is specified as an SGPR, the SGPR contains an unsigned
5007  // BYTE offset (the 2 LSBs are ignored).
5008  // If the offset is specified as an immediate 20-bit constant, the
5009  // constant is an unsigned BYTE offset.
5010  void
5012  {
5013  Wavefront *wf = gpuDynInst->wavefront();
5014  gpuDynInst->execUnitId = wf->execUnitId;
5015  gpuDynInst->latency.init(gpuDynInst->computeUnit());
5016  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
5017  ScalarRegU32 offset(0);
5018  ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
5019  ConstScalarOperandU32 sdata(gpuDynInst, instData.SDATA);
5020 
5021  addr.read();
5022  sdata.read();
5023 
5024  std::memcpy((void*)gpuDynInst->scalar_data, sdata.rawDataPtr(),
5025  sizeof(ScalarRegU32));
5026 
5027  if (instData.IMM) {
5028  offset = extData.OFFSET;
5029  } else {
5030  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
5031  off_sgpr.read();
5032  offset = off_sgpr.rawData();
5033  }
5034 
5035  calcAddr(gpuDynInst, addr, offset);
5036 
5037  gpuDynInst->computeUnit()->scalarMemoryPipe.
5038  issueRequest(gpuDynInst);
5039  }
5040 
5041  void
5043  {
5044  initMemWrite<1>(gpuDynInst);
5045  } // initiateAcc
5046 
5047  void
5049  {
5050  } // completeAcc
5051 
5053  : Inst_SMEM(iFmt, "s_store_dwordx2")
5054  {
5055  setFlag(MemoryRef);
5056  setFlag(Store);
5057  } // Inst_SMEM__S_STORE_DWORDX2
5058 
5060  {
5061  } // ~Inst_SMEM__S_STORE_DWORDX2
5062 
5063  // Write 2 dwords to scalar data cache. See S_STORE_DWORD for details on
5064  // the offset input.
5065  void
5067  {
5068  Wavefront *wf = gpuDynInst->wavefront();
5069  gpuDynInst->execUnitId = wf->execUnitId;
5070  gpuDynInst->latency.init(gpuDynInst->computeUnit());
5071  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
5072  ScalarRegU32 offset(0);
5073  ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
5074  ConstScalarOperandU64 sdata(gpuDynInst, instData.SDATA);
5075 
5076  addr.read();
5077  sdata.read();
5078 
5079  std::memcpy((void*)gpuDynInst->scalar_data, sdata.rawDataPtr(),
5080  sizeof(ScalarRegU64));
5081 
5082  if (instData.IMM) {
5083  offset = extData.OFFSET;
5084  } else {
5085  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
5086  off_sgpr.read();
5087  offset = off_sgpr.rawData();
5088  }
5089 
5090  calcAddr(gpuDynInst, addr, offset);
5091 
5092  gpuDynInst->computeUnit()->scalarMemoryPipe.
5093  issueRequest(gpuDynInst);
5094  }
5095 
5096  void
5098  {
5099  initMemWrite<2>(gpuDynInst);
5100  } // initiateAcc
5101 
5102  void
5104  {
5105  } // completeAcc
5106 
5108  : Inst_SMEM(iFmt, "s_store_dwordx4")
5109  {
5110  setFlag(MemoryRef);
5111  setFlag(Store);
5112  } // Inst_SMEM__S_STORE_DWORDX4
5113 
5115  {
5116  } // ~Inst_SMEM__S_STORE_DWORDX4
5117 
5118  // Write 4 dwords to scalar data cache. See S_STORE_DWORD for details on
5119  // the offset input.
5120  void
5122  {
5123  Wavefront *wf = gpuDynInst->wavefront();
5124  gpuDynInst->execUnitId = wf->execUnitId;
5125  gpuDynInst->latency.init(gpuDynInst->computeUnit());
5126  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
5127  ScalarRegU32 offset(0);
5128  ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
5129  ConstScalarOperandU128 sdata(gpuDynInst, instData.SDATA);
5130 
5131  addr.read();
5132  sdata.read();
5133 
5134  std::memcpy((void*)gpuDynInst->scalar_data, sdata.rawDataPtr(),
5135  4 * sizeof(ScalarRegU32));
5136 
5137  if (instData.IMM) {
5138  offset = extData.OFFSET;
5139  } else {
5140  ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
5141  off_sgpr.read();
5142  offset = off_sgpr.rawData();
5143  }
5144 
5145  calcAddr(gpuDynInst, addr, offset);
5146 
5147  gpuDynInst->computeUnit()->scalarMemoryPipe.
5148  issueRequest(gpuDynInst);
5149  }
5150 
5151  void
5153  {
5154  initMemWrite<4>(gpuDynInst);
5155  } // initiateAcc
5156 
5157  void
5159  {
5160  } // completeAcc
5161 
5163  InFmt_SMEM *iFmt)
5164  : Inst_SMEM(iFmt, "s_buffer_store_dword")
5165  {
5166  setFlag(MemoryRef);
5167  setFlag(Store);
5168  } // Inst_SMEM__S_BUFFER_STORE_DWORD
5169 
5171  {
5172  } // ~Inst_SMEM__S_BUFFER_STORE_DWORD
5173 
5174  // Write 1 dword to scalar data cache. See S_STORE_DWORD for details on the
5175  // offset input.
5176  void
5178  {
5180  }
5181 
5182  void
5184  {
5185  } // initiateAcc
5186 
5187  void
5189  {
5190  } // completeAcc
5191 
5193  InFmt_SMEM *iFmt)
5194  : Inst_SMEM(iFmt, "s_buffer_store_dwordx2")
5195  {
5196  setFlag(MemoryRef);
5197  setFlag(Store);
5198  } // Inst_SMEM__S_BUFFER_STORE_DWORDX2
5199 
5201  {
5202  } // ~Inst_SMEM__S_BUFFER_STORE_DWORDX2
5203 
5204  // Write 2 dwords to scalar data cache. See S_STORE_DWORD for details on
5205  // the offset input.
5206  void
5208  {
5210  }
5211 
5212  void
5214  {
5215  } // initiateAcc
5216 
5217  void
5219  {
5220  } // completeAcc
5221 
5223  InFmt_SMEM *iFmt)
5224  : Inst_SMEM(iFmt, "s_buffer_store_dwordx4")
5225  {
5226  setFlag(MemoryRef);
5227  setFlag(Store);
5228  } // Inst_SMEM__S_BUFFER_STORE_DWORDX4
5229 
5231  {
5232  } // ~Inst_SMEM__S_BUFFER_STORE_DWORDX4
5233 
5234  // Write 4 dwords to scalar data cache. See S_STORE_DWORD for details on
5235  // the offset input.
5236  void
5238  {
5240  }
5241 
5242  void
5244  {
5245  } // initiateAcc
5246 
5247  void
5249  {
5250  } // completeAcc
5251 
5253  : Inst_SMEM(iFmt, "s_dcache_inv")
5254  {
5255  } // Inst_SMEM__S_DCACHE_INV
5256 
5258  {
5259  } // ~Inst_SMEM__S_DCACHE_INV
5260 
5261  // Invalidate the scalar data cache.
5262  void
5264  {
5266  }
5267 
5269  : Inst_SMEM(iFmt, "s_dcache_wb")
5270  {
5271  } // Inst_SMEM__S_DCACHE_WB
5272 
5274  {
5275  } // ~Inst_SMEM__S_DCACHE_WB
5276 
5277  // Write back dirty data in the scalar data cache.
5278  void
5280  {
5282  }
5283 
5285  : Inst_SMEM(iFmt, "s_dcache_inv_vol")
5286  {
5287  } // Inst_SMEM__S_DCACHE_INV_VOL
5288 
5290  {
5291  } // ~Inst_SMEM__S_DCACHE_INV_VOL
5292 
5293  // Invalidate the scalar data cache volatile lines.
5294  void
5296  {
5298  }
5299 
5301  : Inst_SMEM(iFmt, "s_dcache_wb_vol")
5302  {
5303  } // Inst_SMEM__S_DCACHE_WB_VOL
5304 
5306  {
5307  } // ~Inst_SMEM__S_DCACHE_WB_VOL
5308 
5309  // Write back dirty data in the scalar data cache volatile lines.
5310  void
5312  {
5314  }
5315 
5317  : Inst_SMEM(iFmt, "s_memtime")
5318  {
5319  // s_memtime does not issue a memory request
5320  setFlag(ALU);
5321  } // Inst_SMEM__S_MEMTIME
5322 
5324  {
5325  } // ~Inst_SMEM__S_MEMTIME
5326 
5327  // Return current 64-bit timestamp.
5328  void
5330  {
5331  ScalarOperandU64 sdst(gpuDynInst, instData.SDATA);
5332  sdst = (ScalarRegU64)gpuDynInst->computeUnit()->curCycle();
5333  sdst.write();
5334  }
5335 
5337  : Inst_SMEM(iFmt, "s_memrealtime")
5338  {
5339  } // Inst_SMEM__S_MEMREALTIME
5340 
5342  {
5343  } // ~Inst_SMEM__S_MEMREALTIME
5344 
5345  // Return current 64-bit RTC.
5346  void
5348  {
5350  }
5351 
5353  : Inst_SMEM(iFmt, "s_atc_probe")
5354  {
5355  } // Inst_SMEM__S_ATC_PROBE
5356 
5358  {
5359  } // ~Inst_SMEM__S_ATC_PROBE
5360 
5361  void
5363  {
5365  }
5366 
5368  InFmt_SMEM *iFmt)
5369  : Inst_SMEM(iFmt, "s_atc_probe_buffer")
5370  {
5371  } // Inst_SMEM__S_ATC_PROBE_BUFFER
5372 
5374  {
5375  } // ~Inst_SMEM__S_ATC_PROBE_BUFFER
5376 
5377  void
5379  {
5381  }
5382 
5384  : Inst_VOP2(iFmt, "v_cndmask_b32")
5385  {
5386  setFlag(ALU);
5387  setFlag(ReadsVCC);
5388  } // Inst_VOP2__V_CNDMASK_B32
5389 
5391  {
5392  } // ~Inst_VOP2__V_CNDMASK_B32
5393 
5394  // D.u = (VCC[i] ? S1.u : S0.u) (i = threadID in wave); VOP3: specify VCC
5395  // as a scalar GPR in S2.
5396  void
5398  {
5399  Wavefront *wf = gpuDynInst->wavefront();
5400  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
5401  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
5402  VecOperandU32 vdst(gpuDynInst, instData.VDST);
5403  ConstScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
5404 
5405  src0.readSrc();
5406  src1.read();
5407  vcc.read();
5408 
5409  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5410  if (wf->execMask(lane)) {
5411  vdst[lane]
5412  = bits(vcc.rawData(), lane) ? src1[lane] : src0[lane];
5413  }
5414  }
5415 
5416  vdst.write();
5417  }
5418 
5420  : Inst_VOP2(iFmt, "v_add_f32")
5421  {
5422  setFlag(ALU);
5423  setFlag(F32);
5424  } // Inst_VOP2__V_ADD_F32
5425 
5427  {
5428  } // ~Inst_VOP2__V_ADD_F32
5429 
5430  // D.f = S0.f + S1.f.
5431  void
5433  {
5434  Wavefront *wf = gpuDynInst->wavefront();
5435  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
5436  VecOperandF32 src1(gpuDynInst, instData.VSRC1);
5437  VecOperandF32 vdst(gpuDynInst, instData.VDST);
5438 
5439  src0.readSrc();
5440  src1.read();
5441 
5442  if (isDPPInst()) {
5443  VecOperandF32 src0_dpp(gpuDynInst, extData.iFmt_VOP_DPP.SRC0);
5444  src0_dpp.read();
5445 
5446  DPRINTF(GCN3, "Handling V_ADD_F32 SRC DPP. SRC0: register v[%d], "
5447  "DPP_CTRL: 0x%#x, SRC0_ABS: %d, SRC0_NEG: %d, "
5448  "SRC1_ABS: %d, SRC1_NEG: %d, BOUND_CTRL: %d, "
5449  "BANK_MASK: %d, ROW_MASK: %d\n", extData.iFmt_VOP_DPP.SRC0,
5458 
5459  processDPP(gpuDynInst, extData.iFmt_VOP_DPP, src0_dpp, src1);
5460 
5461  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5462  if (wf->execMask(lane)) {
5463  vdst[lane] = src0_dpp[lane] + src1[lane];
5464  }
5465  }
5466  } else {
5467  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5468  if (wf->execMask(lane)) {
5469  vdst[lane] = src0[lane] + src1[lane];
5470  }
5471  }
5472  }
5473 
5474  vdst.write();
5475  }
5476 
5478  : Inst_VOP2(iFmt, "v_sub_f32")
5479  {
5480  setFlag(ALU);
5481  setFlag(F32);
5482  } // Inst_VOP2__V_SUB_F32
5483 
5485  {
5486  } // ~Inst_VOP2__V_SUB_F32
5487 
5488  // D.f = S0.f - S1.f.
5489  void
5491  {
5492  Wavefront *wf = gpuDynInst->wavefront();
5493  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
5494  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
5495  VecOperandF32 vdst(gpuDynInst, instData.VDST);
5496 
5497  src0.readSrc();
5498  src1.read();
5499 
5500  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5501  if (wf->execMask(lane)) {
5502  vdst[lane] = src0[lane] - src1[lane];
5503  }
5504  }
5505 
5506  vdst.write();
5507  }
5508 
5510  : Inst_VOP2(iFmt, "v_subrev_f32")
5511  {
5512  setFlag(ALU);
5513  setFlag(F32);
5514  } // Inst_VOP2__V_SUBREV_F32
5515 
5517  {
5518  } // ~Inst_VOP2__V_SUBREV_F32
5519 
5520  // D.f = S1.f - S0.f.
5521  void
5523  {
5524  Wavefront *wf = gpuDynInst->wavefront();
5525  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
5526  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
5527  VecOperandF32 vdst(gpuDynInst, instData.VDST);
5528 
5529  src0.readSrc();
5530  src1.read();
5531 
5532  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5533  if (wf->execMask(lane)) {
5534  vdst[lane] = src1[lane] - src0[lane];
5535  }
5536  }
5537 
5538  vdst.write();
5539  }
5540 
5542  : Inst_VOP2(iFmt, "v_mul_legacy_f32")
5543  {
5544  setFlag(ALU);
5545  setFlag(F32);
5546  } // Inst_VOP2__V_MUL_LEGACY_F32
5547 
5549  {
5550  } // ~Inst_VOP2__V_MUL_LEGACY_F32
5551 
5552  // D.f = S0.f * S1.f
5553  void
5555  {
5556  Wavefront *wf = gpuDynInst->wavefront();
5557  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
5558  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
5559  VecOperandF32 vdst(gpuDynInst, instData.VDST);
5560 
5561  src0.readSrc();
5562  src1.read();
5563 
5564  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5565  if (wf->execMask(lane)) {
5566  vdst[lane] = src0[lane] * src1[lane];
5567  }
5568  }
5569 
5570  vdst.write();
5571  }
5572 
5574  : Inst_VOP2(iFmt, "v_mul_f32")
5575  {
5576  setFlag(ALU);
5577  setFlag(F32);
5578  } // Inst_VOP2__V_MUL_F32
5579 
5581  {
5582  } // ~Inst_VOP2__V_MUL_F32
5583 
5584  // D.f = S0.f * S1.f.
5585  void
5587  {
5588  Wavefront *wf = gpuDynInst->wavefront();
5589  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
5590  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
5591  VecOperandF32 vdst(gpuDynInst, instData.VDST);
5592 
5593  src0.readSrc();
5594  src1.read();
5595 
5596  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5597  if (wf->execMask(lane)) {
5598  if (std::isnan(src0[lane]) ||
5599  std::isnan(src1[lane])) {
5600  vdst[lane] = NAN;
5601  } else if ((std::fpclassify(src0[lane]) == FP_SUBNORMAL ||
5602  std::fpclassify(src0[lane]) == FP_ZERO) &&
5603  !std::signbit(src0[lane])) {
5604  if (std::isinf(src1[lane])) {
5605  vdst[lane] = NAN;
5606  } else if (!std::signbit(src1[lane])) {
5607  vdst[lane] = +0.0;
5608  } else {
5609  vdst[lane] = -0.0;
5610  }
5611  } else if ((std::fpclassify(src0[lane]) == FP_SUBNORMAL ||
5612  std::fpclassify(src0[lane]) == FP_ZERO) &&
5613  std::signbit(src0[lane])) {
5614  if (std::isinf(src1[lane])) {
5615  vdst[lane] = NAN;
5616  } else if (std::signbit(src1[lane])) {
5617  vdst[lane] = +0.0;
5618  } else {
5619  vdst[lane] = -0.0;
5620  }
5621  } else if (std::isinf(src0[lane]) &&
5622  !std::signbit(src0[lane])) {
5623  if (std::fpclassify(src1[lane]) == FP_SUBNORMAL ||
5624  std::fpclassify(src1[lane]) == FP_ZERO) {
5625  vdst[lane] = NAN;
5626  } else if (!std::signbit(src1[lane])) {
5627  vdst[lane] = +INFINITY;
5628  } else {
5629  vdst[lane] = -INFINITY;
5630  }
5631  } else if (std::isinf(src0[lane]) &&
5632  std::signbit(src0[lane])) {
5633  if (std::fpclassify(src1[lane]) == FP_SUBNORMAL ||
5634  std::fpclassify(src1[lane]) == FP_ZERO) {
5635  vdst[lane] = NAN;
5636  } else if (std::signbit(src1[lane])) {
5637  vdst[lane] = +INFINITY;
5638  } else {
5639  vdst[lane] = -INFINITY;
5640  }
5641  } else {
5642  vdst[lane] = src0[lane] * src1[lane];
5643  }
5644  }
5645  }
5646 
5647  vdst.write();
5648  }
5649 
5651  : Inst_VOP2(iFmt, "v_mul_i32_i24")
5652  {
5653  setFlag(ALU);
5654  } // Inst_VOP2__V_MUL_I32_I24
5655 
5657  {
5658  } // ~Inst_VOP2__V_MUL_I32_I24
5659 
5660  // D.i = S0.i[23:0] * S1.i[23:0].
5661  void
5663  {
5664  Wavefront *wf = gpuDynInst->wavefront();
5665  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
5666  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
5667  VecOperandI32 vdst(gpuDynInst, instData.VDST);
5668 
5669  src0.readSrc();
5670  src1.read();
5671 
5672  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5673  if (wf->execMask(lane)) {
5674  vdst[lane] = szext<24>(src0[lane]) * szext<24>(src1[lane]);
5675  }
5676  }
5677 
5678  vdst.write();
5679  }
5680 
5682  : Inst_VOP2(iFmt, "v_mul_hi_i32_i24")
5683  {
5684  setFlag(ALU);
5685  } // Inst_VOP2__V_MUL_HI_I32_I24
5686 
5688  {
5689  } // ~Inst_VOP2__V_MUL_HI_I32_I24
5690 
5691  // D.i = (S0.i[23:0] * S1.i[23:0]) >> 32.
5692  void
5694  {
5695  Wavefront *wf = gpuDynInst->wavefront();
5696  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
5697  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
5698  VecOperandI32 vdst(gpuDynInst, instData.VDST);
5699 
5700  src0.readSrc();
5701  src1.read();
5702 
5703  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5704  if (wf->execMask(lane)) {
5705  VecElemI64 tmp_src0 = (VecElemI64)szext<24>(src0[lane]);
5706  VecElemI64 tmp_src1 = (VecElemI64)szext<24>(src1[lane]);
5707 
5708  vdst[lane] = (VecElemI32)((tmp_src0 * tmp_src1) >> 32);
5709  }
5710  }
5711 
5712  vdst.write();
5713  }
5714 
5716  : Inst_VOP2(iFmt, "v_mul_u32_u24")
5717  {
5718  setFlag(ALU);
5719  } // Inst_VOP2__V_MUL_U32_U24
5720 
5722  {
5723  } // ~Inst_VOP2__V_MUL_U32_U24
5724 
5725  // D.u = S0.u[23:0] * S1.u[23:0].
5726  void
5728  {
5729  Wavefront *wf = gpuDynInst->wavefront();
5730  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
5731  VecOperandU32 src1(gpuDynInst, instData.VSRC1);
5732  VecOperandU32 vdst(gpuDynInst, instData.VDST);
5733 
5734  src0.readSrc();
5735  src1.read();
5736 
5737  if (isSDWAInst()) {
5738  VecOperandU32 src0_sdwa(gpuDynInst, extData.iFmt_VOP_SDWA.SRC0);
5739  // use copies of original src0, src1, and dest during selecting
5740  VecOperandU32 origSrc0_sdwa(gpuDynInst,
5742  VecOperandU32 origSrc1(gpuDynInst, instData.VSRC1);
5743  VecOperandU32 origVdst(gpuDynInst, instData.VDST);
5744 
5745  src0_sdwa.read();
5746  origSrc0_sdwa.read();
5747  origSrc1.read();
5748 
5749  DPRINTF(GCN3, "Handling V_MUL_U32_U24 SRC SDWA. SRC0: register "
5750  "v[%d], DST_SEL: %d, DST_UNUSED: %d, CLAMP: %d, SRC0_SEL: "
5751  "%d, SRC0_SEXT: %d, SRC0_NEG: %d, SRC0_ABS: %d, SRC1_SEL: "
5752  "%d, SRC1_SEXT: %d, SRC1_NEG: %d, SRC1_ABS: %d\n",
5764 
5765  processSDWA_src(extData.iFmt_VOP_SDWA, src0_sdwa, origSrc0_sdwa,
5766  src1, origSrc1);
5767 
5768  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5769  if (wf->execMask(lane)) {
5770  vdst[lane] = bits(src0_sdwa[lane], 23, 0) *
5771  bits(src1[lane], 23, 0);
5772  origVdst[lane] = vdst[lane]; // keep copy consistent
5773  }
5774  }
5775 
5776  processSDWA_dst(extData.iFmt_VOP_SDWA, vdst, origVdst);
5777  } else {
5778  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5779  if (wf->execMask(lane)) {
5780  vdst[lane] = bits(src0[lane], 23, 0) *
5781  bits(src1[lane], 23, 0);
5782  }
5783  }
5784  }
5785 
5786 
5787  vdst.write();
5788  }
5789 
5791  : Inst_VOP2(iFmt, "v_mul_hi_u32_u24")
5792  {
5793  setFlag(ALU);
5794  } // Inst_VOP2__V_MUL_HI_U32_U24
5795 
5797  {
5798  } // ~Inst_VOP2__V_MUL_HI_U32_U24
5799 
5800  // D.i = (S0.u[23:0] * S1.u[23:0]) >> 32.
5801  void
5803  {
5804  Wavefront *wf = gpuDynInst->wavefront();
5805  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
5806  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
5807  VecOperandU32 vdst(gpuDynInst, instData.VDST);
5808 
5809  src0.readSrc();
5810  src1.read();
5811 
5812  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5813  if (wf->execMask(lane)) {
5814  VecElemU64 tmp_src0 = (VecElemU64)bits(src0[lane], 23, 0);
5815  VecElemU64 tmp_src1 = (VecElemU64)bits(src1[lane], 23, 0);
5816  vdst[lane] = (VecElemU32)((tmp_src0 * tmp_src1) >> 32);
5817  }
5818  }
5819 
5820  vdst.write();
5821  }
5822 
5824  : Inst_VOP2(iFmt, "v_min_f32")
5825  {
5826  setFlag(ALU);
5827  setFlag(F32);
5828  } // Inst_VOP2__V_MIN_F32
5829 
5831  {
5832  } // ~Inst_VOP2__V_MIN_F32
5833 
5834  // D.f = (S0.f < S1.f ? S0.f : S1.f).
5835  void
5837  {
5838  Wavefront *wf = gpuDynInst->wavefront();
5839  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
5840  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
5841  VecOperandF32 vdst(gpuDynInst, instData.VDST);
5842 
5843  src0.readSrc();
5844  src1.read();
5845 
5846  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5847  if (wf->execMask(lane)) {
5848  vdst[lane] = std::fmin(src0[lane], src1[lane]);
5849  }
5850  }
5851 
5852  vdst.write();
5853  }
5854 
5856  : Inst_VOP2(iFmt, "v_max_f32")
5857  {
5858  setFlag(ALU);
5859  setFlag(F32);
5860  } // Inst_VOP2__V_MAX_F32
5861 
5863  {
5864  } // ~Inst_VOP2__V_MAX_F32
5865 
5866  // D.f = (S0.f >= S1.f ? S0.f : S1.f).
5867  void
5869  {
5870  Wavefront *wf = gpuDynInst->wavefront();
5871  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
5872  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
5873  VecOperandF32 vdst(gpuDynInst, instData.VDST);
5874 
5875  src0.readSrc();
5876  src1.read();
5877 
5878  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5879  if (wf->execMask(lane)) {
5880  vdst[lane] = std::fmax(src0[lane], src1[lane]);
5881  }
5882  }
5883 
5884  vdst.write();
5885  }
5886 
5888  : Inst_VOP2(iFmt, "v_min_i32")
5889  {
5890  setFlag(ALU);
5891  } // Inst_VOP2__V_MIN_I32
5892 
5894  {
5895  } // ~Inst_VOP2__V_MIN_I32
5896 
5897  // D.i = min(S0.i, S1.i).
5898  void
5900  {
5901  Wavefront *wf = gpuDynInst->wavefront();
5902  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
5903  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
5904  VecOperandI32 vdst(gpuDynInst, instData.VDST);
5905 
5906  src0.readSrc();
5907  src1.read();
5908 
5909  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5910  if (wf->execMask(lane)) {
5911  vdst[lane] = std::min(src0[lane], src1[lane]);
5912  }
5913  }
5914 
5915  vdst.write();
5916  }
5917 
5919  : Inst_VOP2(iFmt, "v_max_i32")
5920  {
5921  setFlag(ALU);
5922  } // Inst_VOP2__V_MAX_I32
5923 
5925  {
5926  } // ~Inst_VOP2__V_MAX_I32
5927 
5928  // D.i = max(S0.i, S1.i).
5929  void
5931  {
5932  Wavefront *wf = gpuDynInst->wavefront();
5933  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
5934  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
5935  VecOperandI32 vdst(gpuDynInst, instData.VDST);
5936 
5937  src0.readSrc();
5938  src1.read();
5939 
5940  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5941  if (wf->execMask(lane)) {
5942  vdst[lane] = std::max(src0[lane], src1[lane]);
5943  }
5944  }
5945 
5946  vdst.write();
5947  }
5948 
5950  : Inst_VOP2(iFmt, "v_min_u32")
5951  {
5952  setFlag(ALU);
5953  } // Inst_VOP2__V_MIN_U32
5954 
5956  {
5957  } // ~Inst_VOP2__V_MIN_U32
5958 
5959  // D.u = min(S0.u, S1.u).
5960  void
5962  {
5963  Wavefront *wf = gpuDynInst->wavefront();
5964  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
5965  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
5966  VecOperandU32 vdst(gpuDynInst, instData.VDST);
5967 
5968  src0.readSrc();
5969  src1.read();
5970 
5971  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
5972  if (wf->execMask(lane)) {
5973  vdst[lane] = std::min(src0[lane], src1[lane]);
5974  }
5975  }
5976 
5977  vdst.write();
5978  }
5979 
5981  : Inst_VOP2(iFmt, "v_max_u32")
5982  {
5983  setFlag(ALU);
5984  } // Inst_VOP2__V_MAX_U32
5985 
5987  {
5988  } // ~Inst_VOP2__V_MAX_U32
5989 
5990  // D.u = max(S0.u, S1.u).
5991  void
5993  {
5994  Wavefront *wf = gpuDynInst->wavefront();
5995  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
5996  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
5997  VecOperandU32 vdst(gpuDynInst, instData.VDST);
5998 
5999  src0.readSrc();
6000  src1.read();
6001 
6002  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6003  if (wf->execMask(lane)) {
6004  vdst[lane] = std::max(src0[lane], src1[lane]);
6005  }
6006  }
6007 
6008  vdst.write();
6009  }
6010 
6012  : Inst_VOP2(iFmt, "v_lshrrev_b32")
6013  {
6014  setFlag(ALU);
6015  } // Inst_VOP2__V_LSHRREV_B32
6016 
6018  {
6019  } // ~Inst_VOP2__V_LSHRREV_B32
6020 
6021  // D.u = S1.u >> S0.u[4:0].
6022  // The vacated bits are set to zero.
6023  void
6025  {
6026  Wavefront *wf = gpuDynInst->wavefront();
6027  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6028  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
6029  VecOperandU32 vdst(gpuDynInst, instData.VDST);
6030 
6031  src0.readSrc();
6032  src1.read();
6033 
6034  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6035  if (wf->execMask(lane)) {
6036  vdst[lane] = src1[lane] >> bits(src0[lane], 4, 0);
6037  }
6038  }
6039 
6040  vdst.write();
6041  }
6042 
6044  : Inst_VOP2(iFmt, "v_ashrrev_i32")
6045  {
6046  setFlag(ALU);
6047  } // Inst_VOP2__V_ASHRREV_I32
6048 
6050  {
6051  } // ~Inst_VOP2__V_ASHRREV_I32
6052 
6053  // D.i = signext(S1.i) >> S0.i[4:0].
6054  // The vacated bits are set to the sign bit of the input value.
6055  void
6057  {
6058  Wavefront *wf = gpuDynInst->wavefront();
6059  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6060  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
6061  VecOperandI32 vdst(gpuDynInst, instData.VDST);
6062 
6063  src0.readSrc();
6064  src1.read();
6065 
6066  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6067  if (wf->execMask(lane)) {
6068  vdst[lane] = src1[lane] >> bits(src0[lane], 4, 0);
6069  }
6070  }
6071 
6072  vdst.write();
6073  }
6074 
6076  : Inst_VOP2(iFmt, "v_lshlrev_b32")
6077  {
6078  setFlag(ALU);
6079  } // Inst_VOP2__V_LSHLREV_B32
6080 
6082  {
6083  } // ~Inst_VOP2__V_LSHLREV_B32
6084 
6085  // D.u = S1.u << S0.u[4:0].
6086  void
6088  {
6089  Wavefront *wf = gpuDynInst->wavefront();
6090  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6091  VecOperandU32 src1(gpuDynInst, instData.VSRC1);
6092  VecOperandU32 vdst(gpuDynInst, instData.VDST);
6093 
6094  src0.readSrc();
6095  src1.read();
6096 
6097  if (isSDWAInst()) {
6098  VecOperandU32 src0_sdwa(gpuDynInst, extData.iFmt_VOP_SDWA.SRC0);
6099  // use copies of original src0, src1, and vdst during selecting
6100  VecOperandU32 origSrc0_sdwa(gpuDynInst,
6102  VecOperandU32 origSrc1(gpuDynInst, instData.VSRC1);
6103  VecOperandU32 origVdst(gpuDynInst, instData.VDST);
6104 
6105  src0_sdwa.read();
6106  origSrc0_sdwa.read();
6107  origSrc1.read();
6108 
6109  DPRINTF(GCN3, "Handling V_LSHLREV_B32 SRC SDWA. SRC0: register "
6110  "v[%d], DST_SEL: %d, DST_UNUSED: %d, CLAMP: %d, SRC0_SEL: "
6111  "%d, SRC0_SEXT: %d, SRC0_NEG: %d, SRC0_ABS: %d, SRC1_SEL: "
6112  "%d, SRC1_SEXT: %d, SRC1_NEG: %d, SRC1_ABS: %d\n",
6124 
6125  processSDWA_src(extData.iFmt_VOP_SDWA, src0_sdwa, origSrc0_sdwa,
6126  src1, origSrc1);
6127 
6128  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6129  if (wf->execMask(lane)) {
6130  vdst[lane] = src1[lane] << bits(src0_sdwa[lane], 4, 0);
6131  origVdst[lane] = vdst[lane]; // keep copy consistent
6132  }
6133  }
6134 
6135  processSDWA_dst(extData.iFmt_VOP_SDWA, vdst, origVdst);
6136  } else {
6137  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6138  if (wf->execMask(lane)) {
6139  vdst[lane] = src1[lane] << bits(src0[lane], 4, 0);
6140  }
6141  }
6142  }
6143 
6144  vdst.write();
6145  }
6146 
6148  : Inst_VOP2(iFmt, "v_and_b32")
6149  {
6150  setFlag(ALU);
6151  } // Inst_VOP2__V_AND_B32
6152 
6154  {
6155  } // ~Inst_VOP2__V_AND_B32
6156 
6157  // D.u = S0.u & S1.u.
6158  // Input and output modifiers not supported.
6159  void
6161  {
6162  Wavefront *wf = gpuDynInst->wavefront();
6163  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6164  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
6165  VecOperandU32 vdst(gpuDynInst, instData.VDST);
6166 
6167  src0.readSrc();
6168  src1.read();
6169 
6170  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6171  if (wf->execMask(lane)) {
6172  vdst[lane] = src0[lane] & src1[lane];
6173  }
6174  }
6175 
6176  vdst.write();
6177  }
6178 
6180  : Inst_VOP2(iFmt, "v_or_b32")
6181  {
6182  setFlag(ALU);
6183  } // Inst_VOP2__V_OR_B32
6184 
6186  {
6187  } // ~Inst_VOP2__V_OR_B32
6188 
6189  // D.u = S0.u | S1.u.
6190  // Input and output modifiers not supported.
6191  void
6193  {
6194  Wavefront *wf = gpuDynInst->wavefront();
6195  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6196  VecOperandU32 src1(gpuDynInst, instData.VSRC1);
6197  VecOperandU32 vdst(gpuDynInst, instData.VDST);
6198 
6199  src0.readSrc();
6200  src1.read();
6201 
6202  if (isSDWAInst()) {
6203  VecOperandU32 src0_sdwa(gpuDynInst, extData.iFmt_VOP_SDWA.SRC0);
6204  // use copies of original src0, src1, and dest during selecting
6205  VecOperandU32 origSrc0_sdwa(gpuDynInst,
6207  VecOperandU32 origSrc1(gpuDynInst, instData.VSRC1);
6208  VecOperandU32 origVdst(gpuDynInst, instData.VDST);
6209 
6210  src0_sdwa.read();
6211  origSrc0_sdwa.read();
6212  origSrc1.read();
6213 
6214  DPRINTF(GCN3, "Handling V_OR_B32 SRC SDWA. SRC0: register v[%d], "
6215  "DST_SEL: %d, DST_UNUSED: %d, CLAMP: %d, SRC0_SEL: %d, "
6216  "SRC0_SEXT: %d, SRC0_NEG: %d, SRC0_ABS: %d, SRC1_SEL: %d, "
6217  "SRC1_SEXT: %d, SRC1_NEG: %d, SRC1_ABS: %d\n",
6229 
6230  processSDWA_src(extData.iFmt_VOP_SDWA, src0_sdwa, origSrc0_sdwa,
6231  src1, origSrc1);
6232 
6233  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6234  if (wf->execMask(lane)) {
6235  vdst[lane] = src0_sdwa[lane] | src1[lane];
6236  origVdst[lane] = vdst[lane]; // keep copy consistent
6237  }
6238  }
6239 
6240  processSDWA_dst(extData.iFmt_VOP_SDWA, vdst, origVdst);
6241  } else {
6242  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6243  if (wf->execMask(lane)) {
6244  vdst[lane] = src0[lane] | src1[lane];
6245  }
6246  }
6247  }
6248 
6249  vdst.write();
6250  }
6251 
6253  : Inst_VOP2(iFmt, "v_xor_b32")
6254  {
6255  setFlag(ALU);
6256  } // Inst_VOP2__V_XOR_B32
6257 
6259  {
6260  } // ~Inst_VOP2__V_XOR_B32
6261 
6262  // D.u = S0.u ^ S1.u.
6263  // Input and output modifiers not supported.
6264  void
6266  {
6267  Wavefront *wf = gpuDynInst->wavefront();
6268  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6269  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
6270  VecOperandU32 vdst(gpuDynInst, instData.VDST);
6271 
6272  src0.readSrc();
6273  src1.read();
6274 
6275  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6276  if (wf->execMask(lane)) {
6277  vdst[lane] = src0[lane] ^ src1[lane];
6278  }
6279  }
6280 
6281  vdst.write();
6282  }
6283 
6285  : Inst_VOP2(iFmt, "v_mac_f32")
6286  {
6287  setFlag(ALU);
6288  setFlag(F32);
6289  setFlag(MAC);
6290  } // Inst_VOP2__V_MAC_F32
6291 
6293  {
6294  } // ~Inst_VOP2__V_MAC_F32
6295 
6296  // D.f = S0.f * S1.f + D.f.
6297  void
6299  {
6300  Wavefront *wf = gpuDynInst->wavefront();
6301  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
6302  VecOperandF32 src1(gpuDynInst, instData.VSRC1);
6303  VecOperandF32 vdst(gpuDynInst, instData.VDST);
6304 
6305  src0.readSrc();
6306  src1.read();
6307  vdst.read();
6308 
6309  if (isDPPInst()) {
6310  VecOperandF32 src0_dpp(gpuDynInst, extData.iFmt_VOP_DPP.SRC0);
6311  src0_dpp.read();
6312 
6313  DPRINTF(GCN3, "Handling V_MAC_F32 SRC DPP. SRC0: register v[%d], "
6314  "DPP_CTRL: 0x%#x, SRC0_ABS: %d, SRC0_NEG: %d, "
6315  "SRC1_ABS: %d, SRC1_NEG: %d, BOUND_CTRL: %d, "
6316  "BANK_MASK: %d, ROW_MASK: %d\n", extData.iFmt_VOP_DPP.SRC0,
6325 
6326  processDPP(gpuDynInst, extData.iFmt_VOP_DPP, src0_dpp, src1);
6327 
6328  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6329  if (wf->execMask(lane)) {
6330  vdst[lane] = std::fma(src0_dpp[lane], src1[lane],
6331  vdst[lane]);
6332  }
6333  }
6334  } else {
6335  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6336  if (wf->execMask(lane)) {
6337  vdst[lane] = std::fma(src0[lane], src1[lane], vdst[lane]);
6338  }
6339  }
6340  }
6341 
6342  vdst.write();
6343  }
6344 
6346  : Inst_VOP2(iFmt, "v_madmk_f32")
6347  {
6348  setFlag(ALU);
6349  setFlag(F32);
6350  setFlag(MAD);
6351  } // Inst_VOP2__V_MADMK_F32
6352 
6354  {
6355  } // ~Inst_VOP2__V_MADMK_F32
6356 
6357  // D.f = S0.f * K + S1.f; K is a 32-bit inline constant.
6358  // This opcode cannot use the input/output modifiers.
6359  void
6361  {
6362  Wavefront *wf = gpuDynInst->wavefront();
6363  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
6364  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
6365  VecOperandF32 vdst(gpuDynInst, instData.VDST);
6367 
6368  src0.readSrc();
6369  src1.read();
6370 
6371  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6372  if (wf->execMask(lane)) {
6373  vdst[lane] = std::fma(src0[lane], k, src1[lane]);
6374  }
6375  }
6376 
6377  vdst.write();
6378  }
6379 
6381  : Inst_VOP2(iFmt, "v_madak_f32")
6382  {
6383  setFlag(ALU);
6384  setFlag(F32);
6385  setFlag(MAD);
6386  } // Inst_VOP2__V_MADAK_F32
6387 
6389  {
6390  } // ~Inst_VOP2__V_MADAK_F32
6391 
6392  // D.f = S0.f * S1.f + K; K is a 32-bit inline constant.
6393  // This opcode cannot use input/output modifiers.
6394  void
6396  {
6397  Wavefront *wf = gpuDynInst->wavefront();
6398  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
6399  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
6400  VecOperandF32 vdst(gpuDynInst, instData.VDST);
6402 
6403  src0.readSrc();
6404  src1.read();
6405 
6406  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6407  if (wf->execMask(lane)) {
6408  vdst[lane] = std::fma(src0[lane], src1[lane], k);
6409  }
6410  }
6411 
6412  vdst.write();
6413  }
6414 
6416  : Inst_VOP2(iFmt, "v_add_u32")
6417  {
6418  setFlag(ALU);
6419  setFlag(WritesVCC);
6420  } // Inst_VOP2__V_ADD_U32
6421 
6423  {
6424  } // ~Inst_VOP2__V_ADD_U32
6425 
6426  // D.u = S0.u + S1.u;
6427  // VCC[threadId] = (S0.u + S1.u >= 0x100000000ULL ? 1 : 0) is an UNSIGNED
6428  // overflow or carry-out.
6429  // In VOP3 the VCC destination may be an arbitrary SGPR-pair.
6430  void
6432  {
6433  Wavefront *wf = gpuDynInst->wavefront();
6434  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6435  VecOperandU32 src1(gpuDynInst, instData.VSRC1);
6436  VecOperandU32 vdst(gpuDynInst, instData.VDST);
6437  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
6438 
6439  src0.readSrc();
6440  src1.read();
6441 
6442  if (isSDWAInst()) {
6443  VecOperandU32 src0_sdwa(gpuDynInst, extData.iFmt_VOP_SDWA.SRC0);
6444  // use copies of original src0, src1, and dest during selecting
6445  VecOperandU32 origSrc0_sdwa(gpuDynInst,
6447  VecOperandU32 origSrc1(gpuDynInst, instData.VSRC1);
6448  VecOperandU32 origVdst(gpuDynInst, instData.VDST);
6449 
6450  src0_sdwa.read();
6451  origSrc0_sdwa.read();
6452  origSrc1.read();
6453 
6454  DPRINTF(GCN3, "Handling V_ADD_U32 SRC SDWA. SRC0: register v[%d], "
6455  "DST_SEL: %d, DST_UNUSED: %d, CLAMP: %d, SRC0_SEL: %d, "
6456  "SRC0_SEXT: %d, SRC0_NEG: %d, SRC0_ABS: %d, SRC1_SEL: %d, "
6457  "SRC1_SEXT: %d, SRC1_NEG: %d, SRC1_ABS: %d\n",
6469 
6470  processSDWA_src(extData.iFmt_VOP_SDWA, src0_sdwa, origSrc0_sdwa,
6471  src1, origSrc1);
6472 
6473  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6474  if (wf->execMask(lane)) {
6475  vdst[lane] = src0_sdwa[lane] + src1[lane];
6476  origVdst[lane] = vdst[lane]; // keep copy consistent
6477  vcc.setBit(lane, ((VecElemU64)src0_sdwa[lane]
6478  + (VecElemU64)src1[lane] >= 0x100000000ULL) ? 1 : 0);
6479  }
6480  }
6481 
6482  processSDWA_dst(extData.iFmt_VOP_SDWA, vdst, origVdst);
6483  } else {
6484  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6485  if (wf->execMask(lane)) {
6486  vdst[lane] = src0[lane] + src1[lane];
6487  vcc.setBit(lane, ((VecElemU64)src0[lane]
6488  + (VecElemU64)src1[lane] >= 0x100000000ULL) ? 1 : 0);
6489  }
6490  }
6491  }
6492 
6493  vcc.write();
6494  vdst.write();
6495  }
6496 
6498  : Inst_VOP2(iFmt, "v_sub_u32")
6499  {
6500  setFlag(ALU);
6501  setFlag(WritesVCC);
6502  } // Inst_VOP2__V_SUB_U32
6503 
6505  {
6506  } // ~Inst_VOP2__V_SUB_U32
6507 
6508  // D.u = S0.u - S1.u;
6509  // VCC[threadId] = (S1.u > S0.u ? 1 : 0) is an UNSIGNED overflow or
6510  // carry-out.
6511  // In VOP3 the VCC destination may be an arbitrary SGPR-pair.
6512  void
6514  {
6515  Wavefront *wf = gpuDynInst->wavefront();
6516  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6517  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
6518  VecOperandU32 vdst(gpuDynInst, instData.VDST);
6519  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
6520 
6521  src0.readSrc();
6522  src1.read();
6523 
6524  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6525  if (wf->execMask(lane)) {
6526  vdst[lane] = src0[lane] - src1[lane];
6527  vcc.setBit(lane, src1[lane] > src0[lane] ? 1 : 0);
6528  }
6529  }
6530 
6531  vdst.write();
6532  vcc.write();
6533  }
6534 
6536  : Inst_VOP2(iFmt, "v_subrev_u32")
6537  {
6538  setFlag(ALU);
6539  setFlag(WritesVCC);
6540  } // Inst_VOP2__V_SUBREV_U32
6541 
6543  {
6544  } // ~Inst_VOP2__V_SUBREV_U32
6545 
6546  // D.u = S1.u - S0.u;
6547  // VCC[threadId] = (S0.u > S1.u ? 1 : 0) is an UNSIGNED overflow or
6548  // carry-out.
6549  // In VOP3 the VCC destination may be an arbitrary SGPR-pair.
6550  void
6552  {
6553  Wavefront *wf = gpuDynInst->wavefront();
6554  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6555  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
6556  VecOperandU32 vdst(gpuDynInst, instData.VDST);
6557  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
6558 
6559  src0.readSrc();
6560  src1.read();
6561 
6562  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6563  if (wf->execMask(lane)) {
6564  vdst[lane] = src1[lane] - src0[lane];
6565  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
6566  }
6567  }
6568 
6569  vdst.write();
6570  vcc.write();
6571  }
6572 
6574  : Inst_VOP2(iFmt, "v_addc_u32")
6575  {
6576  setFlag(ALU);
6577  setFlag(WritesVCC);
6578  setFlag(ReadsVCC);
6579  } // Inst_VOP2__V_ADDC_U32
6580 
6582  {
6583  } // ~Inst_VOP2__V_ADDC_U32
6584 
6585  // D.u = S0.u + S1.u + VCC[threadId];
6586  // VCC[threadId] = (S0.u + S1.u + VCC[threadId] >= 0x100000000ULL ? 1 : 0)
6587  // is an UNSIGNED overflow.
6588  // In VOP3 the VCC destination may be an arbitrary SGPR-pair, and the VCC
6589  // source comes from the SGPR-pair at S2.u.
6590  void
6592  {
6593  Wavefront *wf = gpuDynInst->wavefront();
6594  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6595  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
6596  VecOperandU32 vdst(gpuDynInst, instData.VDST);
6597  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
6598 
6599  src0.readSrc();
6600  src1.read();
6601  vcc.read();
6602 
6603  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6604  if (wf->execMask(lane)) {
6605  vdst[lane] = src0[lane] + src1[lane]
6606  + bits(vcc.rawData(), lane);
6607  vcc.setBit(lane, ((VecElemU64)src0[lane]
6608  + (VecElemU64)src1[lane]
6609  + (VecElemU64)bits(vcc.rawData(), lane, lane))
6610  >= 0x100000000 ? 1 : 0);
6611  }
6612  }
6613 
6614  vdst.write();
6615  vcc.write();
6616  }
6617 
6619  : Inst_VOP2(iFmt, "v_subb_u32")
6620  {
6621  setFlag(ALU);
6622  setFlag(WritesVCC);
6623  setFlag(ReadsVCC);
6624  } // Inst_VOP2__V_SUBB_U32
6625 
6627  {
6628  } // ~Inst_VOP2__V_SUBB_U32
6629 
6630  // D.u = S0.u - S1.u - VCC[threadId];
6631  // VCC[threadId] = (S1.u + VCC[threadId] > S0.u ? 1 : 0) is an UNSIGNED
6632  // overflow.
6633  // In VOP3 the VCC destination may be an arbitrary SGPR-pair, and the VCC
6634  // source comes from the SGPR-pair at S2.u.
6635  void
6637  {
6638  Wavefront *wf = gpuDynInst->wavefront();
6639  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6640  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
6641  VecOperandU32 vdst(gpuDynInst, instData.VDST);
6642  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
6643 
6644  src0.readSrc();
6645  src1.read();
6646  vcc.read();
6647 
6648  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6649  if (wf->execMask(lane)) {
6650  vdst[lane]
6651  = src0[lane] - src1[lane] - bits(vcc.rawData(), lane);
6652  vcc.setBit(lane, (src1[lane] + bits(vcc.rawData(), lane))
6653  > src0[lane] ? 1 : 0);
6654  }
6655  }
6656 
6657  vdst.write();
6658  vcc.write();
6659  }
6660 
6662  : Inst_VOP2(iFmt, "v_subbrev_u32")
6663  {
6664  setFlag(ALU);
6665  setFlag(WritesVCC);
6666  setFlag(ReadsVCC);
6667  } // Inst_VOP2__V_SUBBREV_U32
6668 
6670  {
6671  } // ~Inst_VOP2__V_SUBBREV_U32
6672 
6673  // D.u = S1.u - S0.u - VCC[threadId];
6674  // VCC[threadId] = (S1.u + VCC[threadId] > S0.u ? 1 : 0) is an UNSIGNED
6675  // overflow.
6676  // In VOP3 the VCC destination may be an arbitrary SGPR-pair, and the VCC
6677  // source comes from the SGPR-pair at S2.u.
6678  void
6680  {
6681  Wavefront *wf = gpuDynInst->wavefront();
6682  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
6683  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
6684  VecOperandU32 vdst(gpuDynInst, instData.VDST);
6685  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
6686 
6687  src0.readSrc();
6688  src1.read();
6689  vcc.read();
6690 
6691  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6692  if (wf->execMask(lane)) {
6693  vdst[lane]
6694  = src1[lane] - src0[lane] - bits(vcc.rawData(), lane);
6695  vcc.setBit(lane, (src0[lane] + bits(vcc.rawData(), lane))
6696  > src1[lane] ? 1 : 0);
6697  }
6698  }
6699 
6700  vdst.write();
6701  vcc.write();
6702  }
6703 
6705  : Inst_VOP2(iFmt, "v_add_f16")
6706  {
6707  setFlag(ALU);
6708  setFlag(F16);
6709  } // Inst_VOP2__V_ADD_F16
6710 
6712  {
6713  } // ~Inst_VOP2__V_ADD_F16
6714 
6715  // D.f16 = S0.f16 + S1.f16.
6716  void
6718  {
6720  }
6721 
6723  : Inst_VOP2(iFmt, "v_sub_f16")
6724  {
6725  setFlag(ALU);
6726  setFlag(F16);
6727  } // Inst_VOP2__V_SUB_F16
6728 
6730  {
6731  } // ~Inst_VOP2__V_SUB_F16
6732 
6733  // D.f16 = S0.f16 - S1.f16.
6734  void
6736  {
6738  }
6739 
6741  : Inst_VOP2(iFmt, "v_subrev_f16")
6742  {
6743  setFlag(ALU);
6744  setFlag(F16);
6745  } // Inst_VOP2__V_SUBREV_F16
6746 
6748  {
6749  } // ~Inst_VOP2__V_SUBREV_F16
6750 
6751  // D.f16 = S1.f16 - S0.f16.
6752  void
6754  {
6756  }
6757 
6759  : Inst_VOP2(iFmt, "v_mul_f16")
6760  {
6761  setFlag(ALU);
6762  setFlag(F16);
6763  } // Inst_VOP2__V_MUL_F16
6764 
6766  {
6767  } // ~Inst_VOP2__V_MUL_F16
6768 
6769  // D.f16 = S0.f16 * S1.f16.
6770  void
6772  {
6774  }
6775 
6777  : Inst_VOP2(iFmt, "v_mac_f16")
6778  {
6779  setFlag(ALU);
6780  setFlag(F16);
6781  setFlag(MAC);
6782  } // Inst_VOP2__V_MAC_F16
6783 
6785  {
6786  } // ~Inst_VOP2__V_MAC_F16
6787 
6788  // D.f16 = S0.f16 * S1.f16 + D.f16.
6789  void
6791  {
6793  }
6794 
6796  : Inst_VOP2(iFmt, "v_madmk_f16")
6797  {
6798  setFlag(ALU);
6799  setFlag(F16);
6800  setFlag(MAD);
6801  } // Inst_VOP2__V_MADMK_F16
6802 
6804  {
6805  } // ~Inst_VOP2__V_MADMK_F16
6806 
6807  // D.f16 = S0.f16 * K.f16 + S1.f16; K is a 16-bit inline constant stored
6808  // in the following literal DWORD.
6809  // This opcode cannot use the VOP3 encoding and cannot use input/output
6810  // modifiers.
6811  void
6813  {
6815  }
6816 
6818  : Inst_VOP2(iFmt, "v_madak_f16")
6819  {
6820  setFlag(ALU);
6821  setFlag(F16);
6822  setFlag(MAD);
6823  } // Inst_VOP2__V_MADAK_F16
6824 
6826  {
6827  } // ~Inst_VOP2__V_MADAK_F16
6828 
6829  // D.f16 = S0.f16 * S1.f16 + K.f16; K is a 16-bit inline constant stored
6830  // in the following literal DWORD.
6831  // This opcode cannot use the VOP3 encoding and cannot use input/output
6832  // modifiers.
6833  void
6835  {
6837  }
6838 
6840  : Inst_VOP2(iFmt, "v_add_u16")
6841  {
6842  setFlag(ALU);
6843  } // Inst_VOP2__V_ADD_U16
6844 
6846  {
6847  } // ~Inst_VOP2__V_ADD_U16
6848 
6849  // D.u16 = S0.u16 + S1.u16.
6850  void
6852  {
6853  Wavefront *wf = gpuDynInst->wavefront();
6854  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
6855  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
6856  VecOperandU16 vdst(gpuDynInst, instData.VDST);
6857 
6858  src0.readSrc();
6859  src1.read();
6860 
6861  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6862  if (wf->execMask(lane)) {
6863  vdst[lane] = src0[lane] + src1[lane];
6864  }
6865  }
6866 
6867  vdst.write();
6868  }
6869 
6871  : Inst_VOP2(iFmt, "v_sub_u16")
6872  {
6873  setFlag(ALU);
6874  } // Inst_VOP2__V_SUB_U16
6875 
6877  {
6878  } // ~Inst_VOP2__V_SUB_U16
6879 
6880  // D.u16 = S0.u16 - S1.u16.
6881  void
6883  {
6884  Wavefront *wf = gpuDynInst->wavefront();
6885  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
6886  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
6887  VecOperandU16 vdst(gpuDynInst, instData.VDST);
6888 
6889  src0.readSrc();
6890  src1.read();
6891 
6892  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6893  if (wf->execMask(lane)) {
6894  vdst[lane] = src0[lane] - src1[lane];
6895  }
6896  }
6897 
6898  vdst.write();
6899  }
6900 
6902  : Inst_VOP2(iFmt, "v_subrev_u16")
6903  {
6904  setFlag(ALU);
6905  } // Inst_VOP2__V_SUBREV_U16
6906 
6908  {
6909  } // ~Inst_VOP2__V_SUBREV_U16
6910 
6911  // D.u16 = S1.u16 - S0.u16.
6912  void
6914  {
6915  Wavefront *wf = gpuDynInst->wavefront();
6916  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
6917  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
6918  VecOperandU16 vdst(gpuDynInst, instData.VDST);
6919 
6920  src0.readSrc();
6921  src1.read();
6922 
6923  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6924  if (wf->execMask(lane)) {
6925  vdst[lane] = src1[lane] - src0[lane];
6926  }
6927  }
6928 
6929  vdst.write();
6930  }
6931 
6933  : Inst_VOP2(iFmt, "v_mul_lo_u16")
6934  {
6935  setFlag(ALU);
6936  } // Inst_VOP2__V_MUL_LO_U16
6937 
6939  {
6940  } // ~Inst_VOP2__V_MUL_LO_U16
6941 
6942  // D.u16 = S0.u16 * S1.u16.
6943  void
6945  {
6946  Wavefront *wf = gpuDynInst->wavefront();
6947  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
6948  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
6949  VecOperandU16 vdst(gpuDynInst, instData.VDST);
6950 
6951  src0.readSrc();
6952  src1.read();
6953 
6954  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6955  if (wf->execMask(lane)) {
6956  vdst[lane] = src0[lane] * src1[lane];
6957  }
6958  }
6959 
6960  vdst.write();
6961  }
6962 
6964  : Inst_VOP2(iFmt, "v_lshlrev_b16")
6965  {
6966  setFlag(ALU);
6967  } // Inst_VOP2__V_LSHLREV_B16
6968 
6970  {
6971  } // ~Inst_VOP2__V_LSHLREV_B16
6972 
6973  // D.u[15:0] = S1.u[15:0] << S0.u[3:0].
6974  void
6976  {
6977  Wavefront *wf = gpuDynInst->wavefront();
6978  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
6979  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
6980  VecOperandU16 vdst(gpuDynInst, instData.VDST);
6981 
6982  src0.readSrc();
6983  src1.read();
6984 
6985  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
6986  if (wf->execMask(lane)) {
6987  vdst[lane] = src1[lane] << bits(src0[lane], 3, 0);
6988  }
6989  }
6990 
6991  vdst.write();
6992  }
6993 
6995  : Inst_VOP2(iFmt, "v_lshrrev_b16")
6996  {
6997  setFlag(ALU);
6998  } // Inst_VOP2__V_LSHRREV_B16
6999 
7001  {
7002  } // ~Inst_VOP2__V_LSHRREV_B16
7003 
7004  // D.u[15:0] = S1.u[15:0] >> S0.u[3:0].
7005  // The vacated bits are set to zero.
7006  void
7008  {
7009  Wavefront *wf = gpuDynInst->wavefront();
7010  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
7011  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
7012  VecOperandU16 vdst(gpuDynInst, instData.VDST);
7013 
7014  src0.readSrc();
7015  src1.read();
7016 
7017  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7018  if (wf->execMask(lane)) {
7019  vdst[lane] = src1[lane] >> src0[lane];
7020  }
7021  }
7022 
7023  vdst.write();
7024  }
7025 
7027  : Inst_VOP2(iFmt, "v_ashrrev_i16")
7028  {
7029  setFlag(ALU);
7030  } // Inst_VOP2__V_ASHRREV_I16
7031 
7033  {
7034  } // ~Inst_VOP2__V_ASHRREV_I16
7035 
7036  // D.i[15:0] = signext(S1.i[15:0]) >> S0.i[3:0].
7037  // The vacated bits are set to the sign bit of the input value.
7038  void
7040  {
7041  Wavefront *wf = gpuDynInst->wavefront();
7042  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
7043  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
7044  VecOperandI16 vdst(gpuDynInst, instData.VDST);
7045 
7046  src0.readSrc();
7047  src1.read();
7048 
7049  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7050  if (wf->execMask(lane)) {
7051  vdst[lane] = src1[lane] >> src0[lane];
7052  }
7053  }
7054 
7055  vdst.write();
7056  }
7057 
7059  : Inst_VOP2(iFmt, "v_max_f16")
7060  {
7061  setFlag(ALU);
7062  setFlag(F16);
7063  } // Inst_VOP2__V_MAX_F16
7064 
7066  {
7067  } // ~Inst_VOP2__V_MAX_F16
7068 
7069  // D.f16 = max(S0.f16, S1.f16).
7070  void
7072  {
7074  }
7075 
7077  : Inst_VOP2(iFmt, "v_min_f16")
7078  {
7079  setFlag(ALU);
7080  setFlag(F16);
7081  } // Inst_VOP2__V_MIN_F16
7082 
7084  {
7085  } // ~Inst_VOP2__V_MIN_F16
7086 
7087  // D.f16 = min(S0.f16, S1.f16).
7088  void
7090  {
7092  }
7093 
7095  : Inst_VOP2(iFmt, "v_max_u16")
7096  {
7097  setFlag(ALU);
7098  } // Inst_VOP2__V_MAX_U16
7099 
7101  {
7102  } // ~Inst_VOP2__V_MAX_U16
7103 
7104  // D.u[15:0] = max(S0.u[15:0], S1.u[15:0]).
7105  void
7107  {
7108  Wavefront *wf = gpuDynInst->wavefront();
7109  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
7110  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
7111  VecOperandU16 vdst(gpuDynInst, instData.VDST);
7112 
7113  src0.readSrc();
7114  src1.read();
7115 
7116  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7117  if (wf->execMask(lane)) {
7118  vdst[lane] = std::max(src0[lane], src1[lane]);
7119  }
7120  }
7121 
7122  vdst.write();
7123  }
7124 
7126  : Inst_VOP2(iFmt, "v_max_i16")
7127  {
7128  setFlag(ALU);
7129  } // Inst_VOP2__V_MAX_I16
7130 
7132  {
7133  } // ~Inst_VOP2__V_MAX_I16
7134 
7135  // D.i[15:0] = max(S0.i[15:0], S1.i[15:0]).
7136  void
7138  {
7139  Wavefront *wf = gpuDynInst->wavefront();
7140  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
7141  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
7142  VecOperandI16 vdst(gpuDynInst, instData.VDST);
7143 
7144  src0.readSrc();
7145  src1.read();
7146 
7147  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7148  if (wf->execMask(lane)) {
7149  vdst[lane] = std::max(src0[lane], src1[lane]);
7150  }
7151  }
7152 
7153  vdst.write();
7154  }
7155 
7157  : Inst_VOP2(iFmt, "v_min_u16")
7158  {
7159  setFlag(ALU);
7160  } // Inst_VOP2__V_MIN_U16
7161 
7163  {
7164  } // ~Inst_VOP2__V_MIN_U16
7165 
7166  // D.u[15:0] = min(S0.u[15:0], S1.u[15:0]).
7167  void
7169  {
7170  Wavefront *wf = gpuDynInst->wavefront();
7171  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
7172  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
7173  VecOperandU16 vdst(gpuDynInst, instData.VDST);
7174 
7175  src0.readSrc();
7176  src1.read();
7177 
7178  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7179  if (wf->execMask(lane)) {
7180  vdst[lane] = std::min(src0[lane], src1[lane]);
7181  }
7182  }
7183 
7184  vdst.write();
7185  }
7186 
7188  : Inst_VOP2(iFmt, "v_min_i16")
7189  {
7190  setFlag(ALU);
7191  } // Inst_VOP2__V_MIN_I16
7192 
7194  {
7195  } // ~Inst_VOP2__V_MIN_I16
7196 
7197  // D.i[15:0] = min(S0.i[15:0], S1.i[15:0]).
7198  void
7200  {
7201  Wavefront *wf = gpuDynInst->wavefront();
7202  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
7203  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
7204  VecOperandI16 vdst(gpuDynInst, instData.VDST);
7205 
7206  src0.readSrc();
7207  src1.read();
7208 
7209  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7210  if (wf->execMask(lane)) {
7211  vdst[lane] = std::min(src0[lane], src1[lane]);
7212  }
7213  }
7214 
7215  vdst.write();
7216  }
7217 
7219  : Inst_VOP2(iFmt, "v_ldexp_f16")
7220  {
7221  setFlag(ALU);
7222  setFlag(F16);
7223  } // Inst_VOP2__V_LDEXP_F16
7224 
7226  {
7227  } // ~Inst_VOP2__V_LDEXP_F16
7228 
7229  // D.f16 = S0.f16 * (2 ** S1.i16).
7230  void
7232  {
7234  }
7235 
7237  : Inst_VOP1(iFmt, "v_nop")
7238  {
7239  setFlag(Nop);
7240  setFlag(ALU);
7241  } // Inst_VOP1__V_NOP
7242 
7244  {
7245  } // ~Inst_VOP1__V_NOP
7246 
7247  // Do nothing.
7248  void
7250  {
7251  }
7252 
7254  : Inst_VOP1(iFmt, "v_mov_b32")
7255  {
7256  setFlag(ALU);
7257  } // Inst_VOP1__V_MOV_B32
7258 
7260  {
7261  } // ~Inst_VOP1__V_MOV_B32
7262 
7263  // D.u = S0.u.
7264  // Input and output modifiers not supported; this is an untyped operation.
7265  void
7267  {
7268  Wavefront *wf = gpuDynInst->wavefront();
7269  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
7270  VecOperandU32 vdst(gpuDynInst, instData.VDST);
7271 
7272  src.readSrc();
7273 
7274  if (isDPPInst()) {
7275  VecOperandU32 src_dpp(gpuDynInst, extData.iFmt_VOP_DPP.SRC0);
7276  src_dpp.read();
7277 
7278  DPRINTF(GCN3, "Handling V_MOV_B32 SRC DPP. SRC0: register v[%d], "
7279  "DPP_CTRL: 0x%#x, SRC0_ABS: %d, SRC0_NEG: %d, "
7280  "SRC1_ABS: %d, SRC1_NEG: %d, BOUND_CTRL: %d, "
7281  "BANK_MASK: %d, ROW_MASK: %d\n", extData.iFmt_VOP_DPP.SRC0,
7290 
7291  // NOTE: For VOP1, there is no SRC1, so make sure we're not trying
7292  // to negate it or take the absolute value of it
7293  assert(!extData.iFmt_VOP_DPP.SRC1_ABS);
7294  assert(!extData.iFmt_VOP_DPP.SRC1_NEG);
7295  processDPP(gpuDynInst, extData.iFmt_VOP_DPP, src_dpp);
7296 
7297  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7298  if (wf->execMask(lane)) {
7299  vdst[lane] = src_dpp[lane];
7300  }
7301  }
7302  } else {
7303  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7304  if (wf->execMask(lane)) {
7305  vdst[lane] = src[lane];
7306  }
7307  }
7308  }
7309 
7310  vdst.write();
7311  }
7312 
7314  InFmt_VOP1 *iFmt)
7315  : Inst_VOP1(iFmt, "v_readfirstlane_b32")
7316  {
7317  setFlag(ALU);
7318  } // Inst_VOP1__V_READFIRSTLANE_B32
7319 
7321  {
7322  } // ~Inst_VOP1__V_READFIRSTLANE_B32
7323 
7324  // Copy one VGPR value to one SGPR. D = SGPR destination, S0 = source data
7325  // (VGPR# or M0 for lds direct access), Lane# = FindFirst1fromLSB(exec)
7326  // (Lane# = 0 if exec is zero). Ignores exec mask for the access.
7327  // Input and output modifiers not supported; this is an untyped operation.
7328  void
7330  {
7331  Wavefront *wf = gpuDynInst->wavefront();
7332  ScalarRegI32 src_lane(0);
7333  ScalarRegU64 exec_mask = wf->execMask().to_ullong();
7334  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
7335  ScalarOperandU32 sdst(gpuDynInst, instData.VDST);
7336 
7337  src.readSrc();
7338 
7339  if (exec_mask) {
7340  src_lane = findLsbSet(exec_mask);
7341  }
7342 
7343  sdst = src[src_lane];
7344 
7345  sdst.write();
7346  }
7347 
7349  : Inst_VOP1(iFmt, "v_cvt_i32_f64")
7350  {
7351  setFlag(ALU);
7352  setFlag(F64);
7353  } // Inst_VOP1__V_CVT_I32_F64
7354 
7356  {
7357  } // ~Inst_VOP1__V_CVT_I32_F64
7358 
7359  // D.i = (int)S0.d.
7360  // Out-of-range floating point values (including infinity) saturate. NaN
7361  // is converted to 0.
7362  void
7364  {
7365  Wavefront *wf = gpuDynInst->wavefront();
7366  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
7367  VecOperandI32 vdst(gpuDynInst, instData.VDST);
7368 
7369  src.readSrc();
7370 
7371  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7372  if (wf->execMask(lane)) {
7373  int exp;
7374  std::frexp(src[lane],&exp);
7375  if (std::isnan(src[lane])) {
7376  vdst[lane] = 0;
7377  } else if (std::isinf(src[lane]) || exp > 30) {
7378  if (std::signbit(src[lane])) {
7379  vdst[lane] = INT_MIN;
7380  } else {
7381  vdst[lane] = INT_MAX;
7382  }
7383  } else {
7384  vdst[lane] = (VecElemI32)src[lane];
7385  }
7386  }
7387  }
7388 
7389  vdst.write();
7390  }
7391 
7393  : Inst_VOP1(iFmt, "v_cvt_f64_i32")
7394  {
7395  setFlag(ALU);
7396  setFlag(F64);
7397  } // Inst_VOP1__V_CVT_F64_I32
7398 
7400  {
7401  } // ~Inst_VOP1__V_CVT_F64_I32
7402 
7403  // D.d = (double)S0.i.
7404  void
7406  {
7407  Wavefront *wf = gpuDynInst->wavefront();
7408  ConstVecOperandI32 src(gpuDynInst, instData.SRC0);
7409  VecOperandF64 vdst(gpuDynInst, instData.VDST);
7410 
7411  src.readSrc();
7412 
7413  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7414  if (wf->execMask(lane)) {
7415  vdst[lane] = (VecElemF64)src[lane];
7416  }
7417  }
7418 
7419  vdst.write();
7420  }
7421 
7423  : Inst_VOP1(iFmt, "v_cvt_f32_i32")
7424  {
7425  setFlag(ALU);
7426  setFlag(F32);
7427  } // Inst_VOP1__V_CVT_F32_I32
7428 
7430  {
7431  } // ~Inst_VOP1__V_CVT_F32_I32
7432 
7433  // D.f = (float)S0.i.
7434  void
7436  {
7437  Wavefront *wf = gpuDynInst->wavefront();
7438  ConstVecOperandI32 src(gpuDynInst, instData.SRC0);
7439  VecOperandF32 vdst(gpuDynInst, instData.VDST);
7440 
7441  src.readSrc();
7442 
7443  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7444  if (wf->execMask(lane)) {
7445  vdst[lane] = (VecElemF32)src[lane];
7446  }
7447  }
7448 
7449  vdst.write();
7450  }
7451 
7453  : Inst_VOP1(iFmt, "v_cvt_f32_u32")
7454  {
7455  setFlag(ALU);
7456  setFlag(F32);
7457  } // Inst_VOP1__V_CVT_F32_U32
7458 
7460  {
7461  } // ~Inst_VOP1__V_CVT_F32_U32
7462 
7463  // D.f = (float)S0.u.
7464  void
7466  {
7467  Wavefront *wf = gpuDynInst->wavefront();
7468  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
7469  VecOperandF32 vdst(gpuDynInst, instData.VDST);
7470 
7471  src.readSrc();
7472 
7473  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7474  if (wf->execMask(lane)) {
7475  vdst[lane] = (VecElemF32)src[lane];
7476  }
7477  }
7478 
7479  vdst.write();
7480  }
7481 
7483  : Inst_VOP1(iFmt, "v_cvt_u32_f32")
7484  {
7485  setFlag(ALU);
7486  setFlag(F32);
7487  } // Inst_VOP1__V_CVT_U32_F32
7488 
7490  {
7491  } // ~Inst_VOP1__V_CVT_U32_F32
7492 
7493  // D.u = (unsigned)S0.f.
7494  // Out-of-range floating point values (including infinity) saturate. NaN
7495  // is converted to 0.
7496  void
7498  {
7499  Wavefront *wf = gpuDynInst->wavefront();
7500  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
7501  VecOperandU32 vdst(gpuDynInst, instData.VDST);
7502 
7503  src.readSrc();
7504 
7505  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7506  if (wf->execMask(lane)) {
7507  int exp;
7508  std::frexp(src[lane],&exp);
7509  if (std::isnan(src[lane])) {
7510  vdst[lane] = 0;
7511  } else if (std::isinf(src[lane])) {
7512  if (std::signbit(src[lane])) {
7513  vdst[lane] = 0;
7514  } else {
7515  vdst[lane] = UINT_MAX;
7516  }
7517  } else if (exp > 31) {
7518  vdst[lane] = UINT_MAX;
7519  } else {
7520  vdst[lane] = (VecElemU32)src[lane];
7521  }
7522  }
7523  }
7524 
7525  vdst.write();
7526  }
7527 
7529  : Inst_VOP1(iFmt, "v_cvt_i32_f32")
7530  {
7531  setFlag(ALU);
7532  setFlag(F32);
7533  } // Inst_VOP1__V_CVT_I32_F32
7534 
7536  {
7537  } // ~Inst_VOP1__V_CVT_I32_F32
7538 
7539  // D.i = (int)S0.f.
7540  // Out-of-range floating point values (including infinity) saturate. NaN
7541  // is converted to 0.
7542  void
7544  {
7545  Wavefront *wf = gpuDynInst->wavefront();
7546  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
7547  VecOperandI32 vdst(gpuDynInst, instData.VDST);
7548 
7549  src.readSrc();
7550 
7551  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7552  if (wf->execMask(lane)) {
7553  int exp;
7554  std::frexp(src[lane],&exp);
7555  if (std::isnan(src[lane])) {
7556  vdst[lane] = 0;
7557  } else if (std::isinf(src[lane]) || exp > 30) {
7558  if (std::signbit(src[lane])) {
7559  vdst[lane] = INT_MIN;
7560  } else {
7561  vdst[lane] = INT_MAX;
7562  }
7563  } else {
7564  vdst[lane] = (VecElemI32)src[lane];
7565  }
7566  }
7567  }
7568 
7569  vdst.write();
7570  }
7571 
7573  : Inst_VOP1(iFmt, "v_mov_fed_b32")
7574  {
7575  setFlag(ALU);
7576  } // Inst_VOP1__V_MOV_FED_B32
7577 
7579  {
7580  } // ~Inst_VOP1__V_MOV_FED_B32
7581 
7582  // D.u = S0.u;
7583  // Input and output modifiers not supported; this is an untyped operation.
7584  void
7586  {
7588  }
7589 
7591  : Inst_VOP1(iFmt, "v_cvt_f16_f32")
7592  {
7593  setFlag(ALU);
7594  setFlag(F32);
7595  } // Inst_VOP1__V_CVT_F16_F32
7596 
7598  {
7599  } // ~Inst_VOP1__V_CVT_F16_F32
7600 
7601  // D.f16 = flt32_to_flt16(S0.f).
7602  void
7604  {
7606  }
7607 
7609  : Inst_VOP1(iFmt, "v_cvt_f32_f16")
7610  {
7611  setFlag(ALU);
7612  setFlag(F32);
7613  } // Inst_VOP1__V_CVT_F32_F16
7614 
7616  {
7617  } // ~Inst_VOP1__V_CVT_F32_F16
7618 
7619  // D.f = flt16_to_flt32(S0.f16).
7620  void
7622  {
7624  }
7625 
7627  InFmt_VOP1 *iFmt)
7628  : Inst_VOP1(iFmt, "v_cvt_rpi_i32_f32")
7629  {
7630  setFlag(ALU);
7631  setFlag(F32);
7632  } // Inst_VOP1__V_CVT_RPI_I32_F32
7633 
7635  {
7636  } // ~Inst_VOP1__V_CVT_RPI_I32_F32
7637 
7638  // D.i = (int)floor(S0.f + 0.5).
7639  void
7641  {
7642  Wavefront *wf = gpuDynInst->wavefront();
7643  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
7644  VecOperandI32 vdst(gpuDynInst, instData.VDST);
7645 
7646  src.readSrc();
7647 
7648  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7649  if (wf->execMask(lane)) {
7650  vdst[lane] = (VecElemI32)std::floor(src[lane] + 0.5);
7651  }
7652  }
7653 
7654  vdst.write();
7655  }
7656 
7658  InFmt_VOP1 *iFmt)
7659  : Inst_VOP1(iFmt, "v_cvt_flr_i32_f32")
7660  {
7661  setFlag(ALU);
7662  setFlag(F32);
7663  } // Inst_VOP1__V_CVT_FLR_I32_F32
7664 
7666  {
7667  } // ~Inst_VOP1__V_CVT_FLR_I32_F32
7668 
7669  // D.i = (int)floor(S0.f).
7670  void
7672  {
7673  Wavefront *wf = gpuDynInst->wavefront();
7674  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
7675  VecOperandI32 vdst(gpuDynInst, instData.VDST);
7676 
7677  src.readSrc();
7678 
7679  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7680  if (wf->execMask(lane)) {
7681  vdst[lane] = (VecElemI32)std::floor(src[lane]);
7682  }
7683  }
7684 
7685  vdst.write();
7686  }
7687 
7689  : Inst_VOP1(iFmt, "v_cvt_off_f32_i4")
7690  {
7691  setFlag(ALU);
7692  setFlag(F32);
7693  } // Inst_VOP1__V_CVT_OFF_F32_I4
7694 
7696  {
7697  } // ~Inst_VOP1__V_CVT_OFF_F32_I4
7698 
7699  // 4-bit signed int to 32-bit float.
7700  void
7702  {
7704  }
7705 
7707  : Inst_VOP1(iFmt, "v_cvt_f32_f64")
7708  {
7709  setFlag(ALU);
7710  setFlag(F64);
7711  } // Inst_VOP1__V_CVT_F32_F64
7712 
7714  {
7715  } // ~Inst_VOP1__V_CVT_F32_F64
7716 
7717  // D.f = (float)S0.d.
7718  void
7720  {
7721  Wavefront *wf = gpuDynInst->wavefront();
7722  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
7723  VecOperandF32 vdst(gpuDynInst, instData.VDST);
7724 
7725  src.readSrc();
7726 
7727  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7728  if (wf->execMask(lane)) {
7729  vdst[lane] = (VecElemF32)src[lane];
7730  }
7731  }
7732 
7733  vdst.write();
7734  }
7735 
7737  : Inst_VOP1(iFmt, "v_cvt_f64_f32")
7738  {
7739  setFlag(ALU);
7740  setFlag(F64);
7741  } // Inst_VOP1__V_CVT_F64_F32
7742 
7744  {
7745  } // ~Inst_VOP1__V_CVT_F64_F32
7746 
7747  // D.d = (double)S0.f.
7748  void
7750  {
7751  Wavefront *wf = gpuDynInst->wavefront();
7752  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
7753  VecOperandF64 vdst(gpuDynInst, instData.VDST);
7754 
7755  src.readSrc();
7756 
7757  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7758  if (wf->execMask(lane)) {
7759  vdst[lane] = (VecElemF64)src[lane];
7760  }
7761  }
7762 
7763  vdst.write();
7764  }
7765 
7767  : Inst_VOP1(iFmt, "v_cvt_f32_ubyte0")
7768  {
7769  setFlag(ALU);
7770  setFlag(F32);
7771  } // Inst_VOP1__V_CVT_F32_UBYTE0
7772 
7774  {
7775  } // ~Inst_VOP1__V_CVT_F32_UBYTE0
7776 
7777  // D.f = (float)(S0.u[7:0]).
7778  void
7780  {
7781  Wavefront *wf = gpuDynInst->wavefront();
7782  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
7783  VecOperandF32 vdst(gpuDynInst, instData.VDST);
7784 
7785  src.readSrc();
7786 
7787  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7788  if (wf->execMask(lane)) {
7789  vdst[lane] = (VecElemF32)(bits(src[lane], 7, 0));
7790  }
7791  }
7792 
7793  vdst.write();
7794  }
7795 
7797  : Inst_VOP1(iFmt, "v_cvt_f32_ubyte1")
7798  {
7799  setFlag(ALU);
7800  setFlag(F32);
7801  } // Inst_VOP1__V_CVT_F32_UBYTE1
7802 
7804  {
7805  } // ~Inst_VOP1__V_CVT_F32_UBYTE1
7806 
7807  // D.f = (float)(S0.u[15:8]).
7808  void
7810  {
7811  Wavefront *wf = gpuDynInst->wavefront();
7812  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
7813  VecOperandF32 vdst(gpuDynInst, instData.VDST);
7814 
7815  src.readSrc();
7816 
7817  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7818  if (wf->execMask(lane)) {
7819  vdst[lane] = (VecElemF32)(bits(src[lane], 15, 8));
7820  }
7821  }
7822 
7823  vdst.write();
7824  }
7825 
7827  : Inst_VOP1(iFmt, "v_cvt_f32_ubyte2")
7828  {
7829  setFlag(ALU);
7830  setFlag(F32);
7831  } // Inst_VOP1__V_CVT_F32_UBYTE2
7832 
7834  {
7835  } // ~Inst_VOP1__V_CVT_F32_UBYTE2
7836 
7837  // D.f = (float)(S0.u[23:16]).
7838  void
7840  {
7841  Wavefront *wf = gpuDynInst->wavefront();
7842  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
7843  VecOperandF32 vdst(gpuDynInst, instData.VDST);
7844 
7845  src.readSrc();
7846 
7847  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7848  if (wf->execMask(lane)) {
7849  vdst[lane] = (VecElemF32)(bits(src[lane], 23, 16));
7850  }
7851  }
7852 
7853  vdst.write();
7854  }
7855 
7857  : Inst_VOP1(iFmt, "v_cvt_f32_ubyte3")
7858  {
7859  setFlag(ALU);
7860  setFlag(F32);
7861  } // Inst_VOP1__V_CVT_F32_UBYTE3
7862 
7864  {
7865  } // ~Inst_VOP1__V_CVT_F32_UBYTE3
7866 
7867  // D.f = (float)(S0.u[31:24]).
7868  void
7870  {
7871  Wavefront *wf = gpuDynInst->wavefront();
7872  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
7873  VecOperandF32 vdst(gpuDynInst, instData.VDST);
7874 
7875  src.readSrc();
7876 
7877  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7878  if (wf->execMask(lane)) {
7879  vdst[lane] = (VecElemF32)(bits(src[lane], 31, 24));
7880  }
7881  }
7882 
7883  vdst.write();
7884  }
7885 
7887  : Inst_VOP1(iFmt, "v_cvt_u32_f64")
7888  {
7889  setFlag(ALU);
7890  setFlag(F64);
7891  } // Inst_VOP1__V_CVT_U32_F64
7892 
7894  {
7895  } // ~Inst_VOP1__V_CVT_U32_F64
7896 
7897  // D.u = (unsigned)S0.d.
7898  // Out-of-range floating point values (including infinity) saturate. NaN
7899  // is converted to 0.
7900  void
7902  {
7903  Wavefront *wf = gpuDynInst->wavefront();
7904  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
7905  VecOperandU32 vdst(gpuDynInst, instData.VDST);
7906 
7907  src.readSrc();
7908 
7909  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7910  if (wf->execMask(lane)) {
7911  int exp;
7912  std::frexp(src[lane],&exp);
7913  if (std::isnan(src[lane])) {
7914  vdst[lane] = 0;
7915  } else if (std::isinf(src[lane])) {
7916  if (std::signbit(src[lane])) {
7917  vdst[lane] = 0;
7918  } else {
7919  vdst[lane] = UINT_MAX;
7920  }
7921  } else if (exp > 31) {
7922  vdst[lane] = UINT_MAX;
7923  } else {
7924  vdst[lane] = (VecElemU32)src[lane];
7925  }
7926  }
7927  }
7928 
7929  vdst.write();
7930  }
7931 
7933  : Inst_VOP1(iFmt, "v_cvt_f64_u32")
7934  {
7935  setFlag(ALU);
7936  setFlag(F64);
7937  } // Inst_VOP1__V_CVT_F64_U32
7938 
7940  {
7941  } // ~Inst_VOP1__V_CVT_F64_U32
7942 
7943  // D.d = (double)S0.u.
7944  void
7946  {
7947  Wavefront *wf = gpuDynInst->wavefront();
7948  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
7949  VecOperandF64 vdst(gpuDynInst, instData.VDST);
7950 
7951  src.readSrc();
7952 
7953  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7954  if (wf->execMask(lane)) {
7955  vdst[lane] = (VecElemF64)src[lane];
7956  }
7957  }
7958 
7959  vdst.write();
7960  }
7961 
7963  : Inst_VOP1(iFmt, "v_trunc_f64")
7964  {
7965  setFlag(ALU);
7966  setFlag(F64);
7967  } // Inst_VOP1__V_TRUNC_F64
7968 
7970  {
7971  } // ~Inst_VOP1__V_TRUNC_F64
7972 
7973  // D.d = trunc(S0.d), return integer part of S0.d.
7974  void
7976  {
7977  Wavefront *wf = gpuDynInst->wavefront();
7978  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
7979  VecOperandF64 vdst(gpuDynInst, instData.VDST);
7980 
7981  src.readSrc();
7982 
7983  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
7984  if (wf->execMask(lane)) {
7985  vdst[lane] = std::trunc(src[lane]);
7986  }
7987  }
7988 
7989  vdst.write();
7990  }
7991 
7993  : Inst_VOP1(iFmt, "v_ceil_f64")
7994  {
7995  setFlag(ALU);
7996  setFlag(F64);
7997  } // Inst_VOP1__V_CEIL_F64
7998 
8000  {
8001  } // ~Inst_VOP1__V_CEIL_F64
8002 
8003  // D.d = ceil(S0.d);
8004  void
8006  {
8007  Wavefront *wf = gpuDynInst->wavefront();
8008  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
8009  VecOperandF64 vdst(gpuDynInst, instData.VDST);
8010 
8011  src.readSrc();
8012 
8013  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8014  if (wf->execMask(lane)) {
8015  vdst[lane] = std::ceil(src[lane]);
8016  }
8017  }
8018 
8019  vdst.write();
8020  }
8021 
8023  : Inst_VOP1(iFmt, "v_rndne_f64")
8024  {
8025  setFlag(ALU);
8026  setFlag(F64);
8027  } // Inst_VOP1__V_RNDNE_F64
8028 
8030  {
8031  } // ~Inst_VOP1__V_RNDNE_F64
8032 
8033  // D.d = round_nearest_even(S0.d).
8034  void
8036  {
8037  Wavefront *wf = gpuDynInst->wavefront();
8038  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
8039  VecOperandF64 vdst(gpuDynInst, instData.VDST);
8040 
8041  src.readSrc();
8042 
8043  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8044  if (wf->execMask(lane)) {
8045  vdst[lane] = roundNearestEven(src[lane]);
8046  }
8047  }
8048 
8049  vdst.write();
8050  }
8051 
8053  : Inst_VOP1(iFmt, "v_floor_f64")
8054  {
8055  setFlag(ALU);
8056  setFlag(F64);
8057  } // Inst_VOP1__V_FLOOR_F64
8058 
8060  {
8061  } // ~Inst_VOP1__V_FLOOR_F64
8062 
8063  // D.d = floor(S0.d);
8064  void
8066  {
8067  Wavefront *wf = gpuDynInst->wavefront();
8068  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
8069  VecOperandF64 vdst(gpuDynInst, instData.VDST);
8070 
8071  src.readSrc();
8072 
8073  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8074  if (wf->execMask(lane)) {
8075  vdst[lane] = std::floor(src[lane]);
8076  }
8077  }
8078 
8079  vdst.write();
8080  }
8081 
8083  : Inst_VOP1(iFmt, "v_fract_f32")
8084  {
8085  setFlag(ALU);
8086  setFlag(F32);
8087  } // Inst_VOP1__V_FRACT_F32
8088 
8090  {
8091  } // ~Inst_VOP1__V_FRACT_F32
8092 
8093  // D.f = modf(S0.f).
8094  void
8096  {
8097  Wavefront *wf = gpuDynInst->wavefront();
8098  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8099  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8100 
8101  src.readSrc();
8102 
8103  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8104  if (wf->execMask(lane)) {
8105  VecElemF32 int_part(0.0);
8106  vdst[lane] = std::modf(src[lane], &int_part);
8107  }
8108  }
8109 
8110  vdst.write();
8111  }
8112 
8114  : Inst_VOP1(iFmt, "v_trunc_f32")
8115  {
8116  setFlag(ALU);
8117  setFlag(F32);
8118  } // Inst_VOP1__V_TRUNC_F32
8119 
8121  {
8122  } // ~Inst_VOP1__V_TRUNC_F32
8123 
8124  // D.f = trunc(S0.f), return integer part of S0.f.
8125  void
8127  {
8128  Wavefront *wf = gpuDynInst->wavefront();
8129  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8130  VecOperandF32 vdst (gpuDynInst, instData.VDST);
8131 
8132  src.readSrc();
8133 
8134  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8135  if (wf->execMask(lane)) {
8136  vdst[lane] = std::trunc(src[lane]);
8137  }
8138  }
8139 
8140  vdst.write();
8141  }
8142 
8144  : Inst_VOP1(iFmt, "v_ceil_f32")
8145  {
8146  setFlag(ALU);
8147  setFlag(F32);
8148  } // Inst_VOP1__V_CEIL_F32
8149 
8151  {
8152  } // ~Inst_VOP1__V_CEIL_F32
8153 
8154  // D.f = ceil(S0.f);
8155  void
8157  {
8158  Wavefront *wf = gpuDynInst->wavefront();
8159  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8160  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8161 
8162  src.readSrc();
8163 
8164  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8165  if (wf->execMask(lane)) {
8166  vdst[lane] = std::ceil(src[lane]);
8167  }
8168  }
8169 
8170  vdst.write();
8171  }
8172 
8174  : Inst_VOP1(iFmt, "v_rndne_f32")
8175  {
8176  setFlag(ALU);
8177  setFlag(F32);
8178  } // Inst_VOP1__V_RNDNE_F32
8179 
8181  {
8182  } // ~Inst_VOP1__V_RNDNE_F32
8183 
8184  // D.f = round_nearest_even(S0.f).
8185  void
8187  {
8188  Wavefront *wf = gpuDynInst->wavefront();
8189  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8190  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8191 
8192  src.readSrc();
8193 
8194  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8195  if (wf->execMask(lane)) {
8196  vdst[lane] = roundNearestEven(src[lane]);
8197  }
8198  }
8199 
8200  vdst.write();
8201  }
8202 
8204  : Inst_VOP1(iFmt, "v_floor_f32")
8205  {
8206  setFlag(ALU);
8207  setFlag(F32);
8208  } // Inst_VOP1__V_FLOOR_F32
8209 
8211  {
8212  } // ~Inst_VOP1__V_FLOOR_F32
8213 
8214  // D.f = floor(S0.f);
8215  void
8217  {
8218  Wavefront *wf = gpuDynInst->wavefront();
8219  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8220  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8221 
8222  src.readSrc();
8223 
8224  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8225  if (wf->execMask(lane)) {
8226  vdst[lane] = std::floor(src[lane]);
8227  }
8228  }
8229 
8230  vdst.write();
8231  }
8232 
8234  : Inst_VOP1(iFmt, "v_exp_f32")
8235  {
8236  setFlag(ALU);
8237  setFlag(F32);
8238  } // Inst_VOP1__V_EXP_F32
8239 
8241  {
8242  } // ~Inst_VOP1__V_EXP_F32
8243 
8244  // D.f = pow(2.0, S0.f).
8245  void
8247  {
8248  Wavefront *wf = gpuDynInst->wavefront();
8249  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8250  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8251 
8252  src.readSrc();
8253 
8254  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8255  if (wf->execMask(lane)) {
8256  vdst[lane] = std::pow(2.0, src[lane]);
8257  }
8258  }
8259 
8260  vdst.write();
8261  }
8262 
8264  : Inst_VOP1(iFmt, "v_log_f32")
8265  {
8266  setFlag(ALU);
8267  setFlag(F32);
8268  } // Inst_VOP1__V_LOG_F32
8269 
8271  {
8272  } // ~Inst_VOP1__V_LOG_F32
8273 
8274  // D.f = log2(S0.f).
8275  void
8277  {
8278  Wavefront *wf = gpuDynInst->wavefront();
8279  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8280  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8281 
8282  src.readSrc();
8283 
8284  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8285  if (wf->execMask(lane)) {
8286  vdst[lane] = std::log2(src[lane]);
8287  }
8288  }
8289 
8290  vdst.write();
8291  }
8292 
8294  : Inst_VOP1(iFmt, "v_rcp_f32")
8295  {
8296  setFlag(ALU);
8297  setFlag(F32);
8298  } // Inst_VOP1__V_RCP_F32
8299 
8301  {
8302  } // ~Inst_VOP1__V_RCP_F32
8303 
8304  // D.f = 1.0 / S0.f.
8305  void
8307  {
8308  Wavefront *wf = gpuDynInst->wavefront();
8309  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8310  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8311 
8312  src.readSrc();
8313 
8314  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8315  if (wf->execMask(lane)) {
8316  vdst[lane] = 1.0 / src[lane];
8317  }
8318  }
8319 
8320  vdst.write();
8321  }
8322 
8324  : Inst_VOP1(iFmt, "v_rcp_iflag_f32")
8325  {
8326  setFlag(ALU);
8327  setFlag(F32);
8328  } // Inst_VOP1__V_RCP_IFLAG_F32
8329 
8331  {
8332  } // ~Inst_VOP1__V_RCP_IFLAG_F32
8333 
8334  // D.f = 1.0 / S0.f.
8335  void
8337  {
8338  Wavefront *wf = gpuDynInst->wavefront();
8339  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8340  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8341 
8342  src.readSrc();
8343 
8344  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8345  if (wf->execMask(lane)) {
8346  vdst[lane] = 1.0 / src[lane];
8347  }
8348  }
8349 
8350  vdst.write();
8351  }
8352 
8354  : Inst_VOP1(iFmt, "v_rsq_f32")
8355  {
8356  setFlag(ALU);
8357  setFlag(F32);
8358  } // Inst_VOP1__V_RSQ_F32
8359 
8361  {
8362  } // ~Inst_VOP1__V_RSQ_F32
8363 
8364  // D.f = 1.0 / sqrt(S0.f).
8365  void
8367  {
8368  Wavefront *wf = gpuDynInst->wavefront();
8369  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8370  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8371 
8372  src.readSrc();
8373 
8374  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8375  if (wf->execMask(lane)) {
8376  vdst[lane] = 1.0 / std::sqrt(src[lane]);
8377  }
8378  }
8379 
8380  vdst.write();
8381  }
8382 
8384  : Inst_VOP1(iFmt, "v_rcp_f64")
8385  {
8386  setFlag(ALU);
8387  setFlag(F64);
8388  } // Inst_VOP1__V_RCP_F64
8389 
8391  {
8392  } // ~Inst_VOP1__V_RCP_F64
8393 
8394  // D.d = 1.0 / S0.d.
8395  void
8397  {
8398  Wavefront *wf = gpuDynInst->wavefront();
8399  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
8400  VecOperandF64 vdst(gpuDynInst, instData.VDST);
8401 
8402  src.readSrc();
8403 
8404  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8405  if (wf->execMask(lane)) {
8406  if (std::fpclassify(src[lane]) == FP_ZERO) {
8407  vdst[lane] = +INFINITY;
8408  } else if (std::isnan(src[lane])) {
8409  vdst[lane] = NAN;
8410  } else if (std::isinf(src[lane])) {
8411  if (std::signbit(src[lane])) {
8412  vdst[lane] = -0.0;
8413  } else {
8414  vdst[lane] = 0.0;
8415  }
8416  } else {
8417  vdst[lane] = 1.0 / src[lane];
8418  }
8419  }
8420  }
8421 
8422  vdst.write();
8423  }
8424 
8426  : Inst_VOP1(iFmt, "v_rsq_f64")
8427  {
8428  setFlag(ALU);
8429  setFlag(F64);
8430  } // Inst_VOP1__V_RSQ_F64
8431 
8433  {
8434  } // ~Inst_VOP1__V_RSQ_F64
8435 
8436  // D.d = 1.0 / sqrt(S0.d).
8437  void
8439  {
8440  Wavefront *wf = gpuDynInst->wavefront();
8441  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
8442  VecOperandF64 vdst(gpuDynInst, instData.VDST);
8443 
8444  src.readSrc();
8445 
8446  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8447  if (wf->execMask(lane)) {
8448  if (std::fpclassify(src[lane]) == FP_ZERO) {
8449  vdst[lane] = +INFINITY;
8450  } else if (std::isnan(src[lane])) {
8451  vdst[lane] = NAN;
8452  } else if (std::isinf(src[lane])
8453  && !std::signbit(src[lane])) {
8454  vdst[lane] = 0.0;
8455  } else if (std::signbit(src[lane])) {
8456  vdst[lane] = NAN;
8457  } else {
8458  vdst[lane] = 1.0 / std::sqrt(src[lane]);
8459  }
8460  }
8461  }
8462 
8463  vdst.write();
8464  }
8465 
8467  : Inst_VOP1(iFmt, "v_sqrt_f32")
8468  {
8469  setFlag(ALU);
8470  setFlag(F32);
8471  } // Inst_VOP1__V_SQRT_F32
8472 
8474  {
8475  } // ~Inst_VOP1__V_SQRT_F32
8476 
8477  // D.f = sqrt(S0.f).
8478  void
8480  {
8481  Wavefront *wf = gpuDynInst->wavefront();
8482  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8483  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8484 
8485  src.readSrc();
8486 
8487  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8488  if (wf->execMask(lane)) {
8489  vdst[lane] = std::sqrt(src[lane]);
8490  }
8491  }
8492 
8493  vdst.write();
8494  }
8495 
8497  : Inst_VOP1(iFmt, "v_sqrt_f64")
8498  {
8499  setFlag(ALU);
8500  setFlag(F64);
8501  } // Inst_VOP1__V_SQRT_F64
8502 
8504  {
8505  } // ~Inst_VOP1__V_SQRT_F64
8506 
8507  // D.d = sqrt(S0.d).
8508  void
8510  {
8511  Wavefront *wf = gpuDynInst->wavefront();
8512  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
8513  VecOperandF64 vdst(gpuDynInst, instData.VDST);
8514 
8515  src.readSrc();
8516 
8517  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8518  if (wf->execMask(lane)) {
8519  vdst[lane] = std::sqrt(src[lane]);
8520  }
8521  }
8522 
8523  vdst.write();
8524  }
8525 
8527  : Inst_VOP1(iFmt, "v_sin_f32")
8528  {
8529  setFlag(ALU);
8530  setFlag(F32);
8531  } // Inst_VOP1__V_SIN_F32
8532 
8534  {
8535  } // ~Inst_VOP1__V_SIN_F32
8536 
8537  // D.f = sin(S0.f * 2 * PI).
8538  void
8540  {
8541  Wavefront *wf = gpuDynInst->wavefront();
8542  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8543  ConstScalarOperandF32 pi(gpuDynInst, REG_PI);
8544  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8545 
8546  src.readSrc();
8547  pi.read();
8548 
8549  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8550  if (wf->execMask(lane)) {
8551  if (src[lane] < -256.0 || src[lane] > 256.0) {
8552  vdst[lane] = 0.0;
8553  } else {
8554  vdst[lane] = std::sin(src[lane] * 2.0 * pi.rawData());
8555  }
8556  }
8557  }
8558 
8559  vdst.write();
8560  }
8561 
8563  : Inst_VOP1(iFmt, "v_cos_f32")
8564  {
8565  setFlag(ALU);
8566  setFlag(F32);
8567  } // Inst_VOP1__V_COS_F32
8568 
8570  {
8571  } // ~Inst_VOP1__V_COS_F32
8572 
8573  // D.f = cos(S0.f * 2 * PI).
8574  void
8576  {
8577  Wavefront *wf = gpuDynInst->wavefront();
8578  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8579  ConstScalarOperandF32 pi(gpuDynInst, REG_PI);
8580  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8581 
8582  src.readSrc();
8583  pi.read();
8584 
8585  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8586  if (wf->execMask(lane)) {
8587  if (src[lane] < -256.0 || src[lane] > 256.0) {
8588  vdst[lane] = 0.0;
8589  } else {
8590  vdst[lane] = std::cos(src[lane] * 2.0 * pi.rawData());
8591  }
8592  }
8593  }
8594 
8595  vdst.write();
8596  }
8597 
8599  : Inst_VOP1(iFmt, "v_not_b32")
8600  {
8601  setFlag(ALU);
8602  } // Inst_VOP1__V_NOT_B32
8603 
8605  {
8606  } // ~Inst_VOP1__V_NOT_B32
8607 
8608  // D.u = ~S0.u.
8609  // Input and output modifiers not supported.
8610  void
8612  {
8613  Wavefront *wf = gpuDynInst->wavefront();
8614  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
8615  VecOperandU32 vdst(gpuDynInst, instData.VDST);
8616 
8617  src.readSrc();
8618 
8619  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8620  if (wf->execMask(lane)) {
8621  vdst[lane] = ~src[lane];
8622  }
8623  }
8624 
8625  vdst.write();
8626  }
8627 
8629  : Inst_VOP1(iFmt, "v_bfrev_b32")
8630  {
8631  setFlag(ALU);
8632  } // Inst_VOP1__V_BFREV_B32
8633 
8635  {
8636  } // ~Inst_VOP1__V_BFREV_B32
8637 
8638  // D.u[31:0] = S0.u[0:31], bitfield reverse.
8639  // Input and output modifiers not supported.
8640  void
8642  {
8643  Wavefront *wf = gpuDynInst->wavefront();
8644  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
8645  VecOperandU32 vdst(gpuDynInst, instData.VDST);
8646 
8647  src.readSrc();
8648 
8649  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8650  if (wf->execMask(lane)) {
8651  vdst[lane] = reverseBits(src[lane]);
8652  }
8653  }
8654 
8655  vdst.write();
8656  }
8657 
8659  : Inst_VOP1(iFmt, "v_ffbh_u32")
8660  {
8661  setFlag(ALU);
8662  } // Inst_VOP1__V_FFBH_U32
8663 
8665  {
8666  } // ~Inst_VOP1__V_FFBH_U32
8667 
8668  // D.u = position of first 1 in S0.u from MSB;
8669  // D.u = 0xffffffff if S0.u == 0.
8670  void
8672  {
8673  Wavefront *wf = gpuDynInst->wavefront();
8674  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
8675  VecOperandU32 vdst(gpuDynInst, instData.VDST);
8676 
8677  src.readSrc();
8678 
8679  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8680  if (wf->execMask(lane)) {
8681  vdst[lane] = findFirstOneMsb(src[lane]);
8682  }
8683  }
8684 
8685  vdst.write();
8686  }
8687 
8689  : Inst_VOP1(iFmt, "v_ffbl_b32")
8690  {
8691  setFlag(ALU);
8692  } // Inst_VOP1__V_FFBL_B32
8693 
8695  {
8696  } // ~Inst_VOP1__V_FFBL_B32
8697 
8698  // D.u = position of first 1 in S0.u from LSB;
8699  // D.u = 0xffffffff if S0.u == 0.
8700  void
8702  {
8703  Wavefront *wf = gpuDynInst->wavefront();
8704  ConstVecOperandU32 src(gpuDynInst, instData.SRC0);
8705  VecOperandU32 vdst(gpuDynInst, instData.VDST);
8706 
8707  src.readSrc();
8708 
8709  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8710  if (wf->execMask(lane)) {
8711  vdst[lane] = findFirstOne(src[lane]);
8712  }
8713  }
8714 
8715  vdst.write();
8716  }
8717 
8719  : Inst_VOP1(iFmt, "v_ffbh_i32")
8720  {
8721  setFlag(ALU);
8722  } // Inst_VOP1__V_FFBH_I32
8723 
8725  {
8726  } // ~Inst_VOP1__V_FFBH_I32
8727 
8728  // D.u = position of first bit different from sign bit in S0.i from MSB;
8729  // D.u = 0xffffffff if S0.i == 0 or S0.i == 0xffffffff.
8730  void
8732  {
8733  Wavefront *wf = gpuDynInst->wavefront();
8734  ConstVecOperandI32 src(gpuDynInst, instData.SRC0);
8735  VecOperandU32 vdst(gpuDynInst, instData.VDST);
8736 
8737  src.readSrc();
8738 
8739  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8740  if (wf->execMask(lane)) {
8741  vdst[lane] = firstOppositeSignBit(src[lane]);
8742  }
8743  }
8744 
8745  vdst.write();
8746  }
8747 
8749  InFmt_VOP1 *iFmt)
8750  : Inst_VOP1(iFmt, "v_frexp_exp_i32_f64")
8751  {
8752  setFlag(ALU);
8753  setFlag(F64);
8754  } // Inst_VOP1__V_FREXP_EXP_I32_F64
8755 
8757  {
8758  } // ~Inst_VOP1__V_FREXP_EXP_I32_F64
8759 
8760  void
8762  {
8763  Wavefront *wf = gpuDynInst->wavefront();
8764  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
8765  VecOperandI32 vdst(gpuDynInst, instData.VDST);
8766 
8767  src.readSrc();
8768 
8769  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8770  if (wf->execMask(lane)) {
8771  if (std::isinf(src[lane]) || std::isnan(src[lane])) {
8772  vdst[lane] = 0;
8773  } else {
8774  VecElemI32 exp = 0;
8775  std::frexp(src[lane], &exp);
8776  vdst[lane] = exp;
8777  }
8778  }
8779  }
8780 
8781  vdst.write();
8782  }
8783 
8785  : Inst_VOP1(iFmt, "v_frexp_mant_f64")
8786  {
8787  setFlag(ALU);
8788  setFlag(F64);
8789  } // Inst_VOP1__V_FREXP_MANT_F64
8790 
8792  {
8793  } // ~Inst_VOP1__V_FREXP_MANT_F64
8794 
8795  void
8797  {
8798  Wavefront *wf = gpuDynInst->wavefront();
8799  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
8800  VecOperandF64 vdst(gpuDynInst, instData.VDST);
8801 
8802  src.readSrc();
8803 
8804  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8805  if (wf->execMask(lane)) {
8806  if (std::isinf(src[lane]) || std::isnan(src[lane])) {
8807  vdst[lane] = src[lane];
8808  } else {
8809  VecElemI32 exp(0);
8810  vdst[lane] = std::frexp(src[lane], &exp);
8811  }
8812  }
8813  }
8814 
8815  vdst.write();
8816  }
8817 
8819  : Inst_VOP1(iFmt, "v_fract_f64")
8820  {
8821  setFlag(ALU);
8822  setFlag(F64);
8823  } // Inst_VOP1__V_FRACT_F64
8824 
8826  {
8827  } // ~Inst_VOP1__V_FRACT_F64
8828 
8829  void
8831  {
8832  Wavefront *wf = gpuDynInst->wavefront();
8833  ConstVecOperandF64 src(gpuDynInst, instData.SRC0);
8834  VecOperandF64 vdst(gpuDynInst, instData.VDST);
8835 
8836  src.readSrc();
8837 
8838  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8839  if (wf->execMask(lane)) {
8840  VecElemF64 int_part(0.0);
8841  vdst[lane] = std::modf(src[lane], &int_part);
8842  }
8843  }
8844 
8845  vdst.write();
8846  }
8847 
8849  InFmt_VOP1 *iFmt)
8850  : Inst_VOP1(iFmt, "v_frexp_exp_i32_f32")
8851  {
8852  setFlag(ALU);
8853  setFlag(F32);
8854  } // Inst_VOP1__V_FREXP_EXP_I32_F32
8855 
8857  {
8858  } // ~Inst_VOP1__V_FREXP_EXP_I32_F32
8859 
8860  // frexp(S0.f, Exponent(S0.f))
8861  // if (S0.f == INF || S0.f == NAN) then D.i = 0;
8862  // else D.i = Exponent(S0.f);
8863  void
8865  {
8866  Wavefront *wf = gpuDynInst->wavefront();
8867  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8868  VecOperandI32 vdst(gpuDynInst, instData.VDST);
8869 
8870  src.readSrc();
8871 
8872  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8873  if (wf->execMask(lane)) {
8874  if (std::isinf(src[lane]) || std::isnan(src[lane])) {
8875  vdst[lane] = 0;
8876  } else {
8877  VecElemI32 exp(0);
8878  std::frexp(src[lane], &exp);
8879  vdst[lane] = exp;
8880  }
8881  }
8882  }
8883 
8884  vdst.write();
8885  }
8886 
8888  : Inst_VOP1(iFmt, "v_frexp_mant_f32")
8889  {
8890  setFlag(ALU);
8891  setFlag(F32);
8892  } // Inst_VOP1__V_FREXP_MANT_F32
8893 
8895  {
8896  } // ~Inst_VOP1__V_FREXP_MANT_F32
8897 
8898  // if (S0.f == INF || S0.f == NAN) then D.f = S0.f;
8899  // else D.f = frexp(S0.f, Exponent(S0.f)).
8900  void
8902  {
8903  Wavefront *wf = gpuDynInst->wavefront();
8904  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
8905  VecOperandF32 vdst(gpuDynInst, instData.VDST);
8906 
8907  src.readSrc();
8908 
8909  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
8910  if (wf->execMask(lane)) {
8911  if (std::isinf(src[lane]) || std::isnan(src[lane])) {
8912  vdst[lane] = src[lane];
8913  } else {
8914  VecElemI32 exp(0);
8915  vdst[lane] = std::frexp(src[lane], &exp);
8916  }
8917  }
8918  }
8919 
8920  vdst.write();
8921  }
8922 
8924  : Inst_VOP1(iFmt, "v_clrexcp")
8925  {
8926  setFlag(ALU);
8927  } // Inst_VOP1__V_CLREXCP
8928 
8930  {
8931  } // ~Inst_VOP1__V_CLREXCP
8932 
8933  void
8935  {
8937  }
8938 
8940  : Inst_VOP1(iFmt, "v_cvt_f16_u16")
8941  {
8942  setFlag(ALU);
8943  setFlag(F16);
8944  } // Inst_VOP1__V_CVT_F16_U16
8945 
8947  {
8948  } // ~Inst_VOP1__V_CVT_F16_U16
8949 
8950  // D.f16 = uint16_to_flt16(S.u16).
8951  void
8953  {
8955  }
8956 
8958  : Inst_VOP1(iFmt, "v_cvt_f16_i16")
8959  {
8960  setFlag(ALU);
8961  setFlag(F16);
8962  } // Inst_VOP1__V_CVT_F16_I16
8963 
8965  {
8966  } // ~Inst_VOP1__V_CVT_F16_I16
8967 
8968  // D.f16 = int16_to_flt16(S.i16).
8969  void
8971  {
8973  }
8974 
8976  : Inst_VOP1(iFmt, "v_cvt_u16_f16")
8977  {
8978  setFlag(ALU);
8979  setFlag(F16);
8980  } // Inst_VOP1__V_CVT_U16_F16
8981 
8983  {
8984  } // ~Inst_VOP1__V_CVT_U16_F16
8985 
8986  // D.u16 = flt16_to_uint16(S.f16).
8987  void
8989  {
8991  }
8992 
8994  : Inst_VOP1(iFmt, "v_cvt_i16_f16")
8995  {
8996  setFlag(ALU);
8997  setFlag(F16);
8998  } // Inst_VOP1__V_CVT_I16_F16
8999 
9001  {
9002  } // ~Inst_VOP1__V_CVT_I16_F16
9003 
9004  // D.i16 = flt16_to_int16(S.f16).
9005  void
9007  {
9009  }
9010 
9012  : Inst_VOP1(iFmt, "v_rcp_f16")
9013  {
9014  setFlag(ALU);
9015  setFlag(F16);
9016  } // Inst_VOP1__V_RCP_F16
9017 
9019  {
9020  } // ~Inst_VOP1__V_RCP_F16
9021 
9022  // if (S0.f16 == 1.0f)
9023  // D.f16 = 1.0f;
9024  // else
9025  // D.f16 = 1 / S0.f16;
9026  void
9028  {
9030  }
9031 
9033  : Inst_VOP1(iFmt, "v_sqrt_f16")
9034  {
9035  setFlag(ALU);
9036  setFlag(F16);
9037  } // Inst_VOP1__V_SQRT_F16
9038 
9040  {
9041  } // ~Inst_VOP1__V_SQRT_F16
9042 
9043  // if (S0.f16 == 1.0f)
9044  // D.f16 = 1.0f;
9045  // else
9046  // D.f16 = sqrt(S0.f16);
9047  void
9049  {
9051  }
9052 
9054  : Inst_VOP1(iFmt, "v_rsq_f16")
9055  {
9056  setFlag(ALU);
9057  setFlag(F16);
9058  } // Inst_VOP1__V_RSQ_F16
9059 
9061  {
9062  } // ~Inst_VOP1__V_RSQ_F16
9063 
9064  // if (S0.f16 == 1.0f)
9065  // D.f16 = 1.0f;
9066  // else
9067  // D.f16 = 1 / sqrt(S0.f16);
9068  void
9070  {
9072  }
9073 
9075  : Inst_VOP1(iFmt, "v_log_f16")
9076  {
9077  setFlag(ALU);
9078  setFlag(F16);
9079  } // Inst_VOP1__V_LOG_F16
9080 
9082  {
9083  } // ~Inst_VOP1__V_LOG_F16
9084 
9085  // if (S0.f16 == 1.0f)
9086  // D.f16 = 0.0f;
9087  // else
9088  // D.f16 = log2(S0.f16);
9089  void
9091  {
9093  }
9094 
9096  : Inst_VOP1(iFmt, "v_exp_f16")
9097  {
9098  setFlag(ALU);
9099  setFlag(F16);
9100  } // Inst_VOP1__V_EXP_F16
9101 
9103  {
9104  } // ~Inst_VOP1__V_EXP_F16
9105 
9106  // if (S0.f16 == 0.0f)
9107  // D.f16 = 1.0f;
9108  // else
9109  // D.f16 = pow(2.0, S0.f16).
9110  void
9112  {
9114  }
9115 
9117  : Inst_VOP1(iFmt, "v_frexp_mant_f16")
9118  {
9119  setFlag(ALU);
9120  setFlag(F16);
9121  } // Inst_VOP1__V_FREXP_MANT_F16
9122 
9124  {
9125  } // ~Inst_VOP1__V_FREXP_MANT_F16
9126 
9127  // if (S0.f16 == +-INF || S0.f16 == NAN)
9128  // D.f16 = S0.f16;
9129  // else
9130  // D.f16 = mantissa(S0.f16).
9131  void
9133  {
9135  }
9136 
9138  InFmt_VOP1 *iFmt)
9139  : Inst_VOP1(iFmt, "v_frexp_exp_i16_f16")
9140  {
9141  setFlag(ALU);
9142  setFlag(F16);
9143  } // Inst_VOP1__V_FREXP_EXP_I16_F16
9144 
9146  {
9147  } // ~Inst_VOP1__V_FREXP_EXP_I16_F16
9148 
9149  // frexp(S0.f16, Exponent(S0.f16))
9150  // if (S0.f16 == +-INF || S0.f16 == NAN)
9151  // D.i16 = 0;
9152  // else
9153  // D.i16 = Exponent(S0.f16);
9154  void
9156  {
9158  }
9159 
9161  : Inst_VOP1(iFmt, "v_floor_f16")
9162  {
9163  setFlag(ALU);
9164  setFlag(F16);
9165  } // Inst_VOP1__V_FLOOR_F16
9166 
9168  {
9169  } // ~Inst_VOP1__V_FLOOR_F16
9170 
9171  // D.f16 = floor(S0.f16);
9172  void
9174  {
9176  }
9177 
9179  : Inst_VOP1(iFmt, "v_ceil_f16")
9180  {
9181  setFlag(ALU);
9182  setFlag(F16);
9183  } // Inst_VOP1__V_CEIL_F16
9184 
9186  {
9187  } // ~Inst_VOP1__V_CEIL_F16
9188 
9189  // D.f16 = ceil(S0.f16);
9190  void
9192  {
9194  }
9195 
9197  : Inst_VOP1(iFmt, "v_trunc_f16")
9198  {
9199  setFlag(ALU);
9200  setFlag(F16);
9201  } // Inst_VOP1__V_TRUNC_F16
9202 
9204  {
9205  } // ~Inst_VOP1__V_TRUNC_F16
9206 
9207  // D.f16 = trunc(S0.f16).
9208  void
9210  {
9212  }
9213 
9215  : Inst_VOP1(iFmt, "v_rndne_f16")
9216  {
9217  setFlag(ALU);
9218  setFlag(F16);
9219  } // Inst_VOP1__V_RNDNE_F16
9220 
9222  {
9223  } // ~Inst_VOP1__V_RNDNE_F16
9224 
9225  // D.f16 = roundNearestEven(S0.f16);
9226  void
9228  {
9230  }
9231 
9233  : Inst_VOP1(iFmt, "v_fract_f16")
9234  {
9235  setFlag(ALU);
9236  setFlag(F16);
9237  } // Inst_VOP1__V_FRACT_F16
9238 
9240  {
9241  } // ~Inst_VOP1__V_FRACT_F16
9242 
9243  // D.f16 = S0.f16 + -floor(S0.f16).
9244  void
9246  {
9248  }
9249 
9251  : Inst_VOP1(iFmt, "v_sin_f16")
9252  {
9253  setFlag(ALU);
9254  setFlag(F16);
9255  } // Inst_VOP1__V_SIN_F16
9256 
9258  {
9259  } // ~Inst_VOP1__V_SIN_F16
9260 
9261  // D.f16 = sin(S0.f16 * 2 * PI).
9262  void
9264  {
9266  }
9267 
9269  : Inst_VOP1(iFmt, "v_cos_f16")
9270  {
9271  setFlag(ALU);
9272  setFlag(F16);
9273  } // Inst_VOP1__V_COS_F16
9274 
9276  {
9277  } // ~Inst_VOP1__V_COS_F16
9278 
9279  // D.f16 = cos(S0.f16 * 2 * PI).
9280  void
9282  {
9284  }
9285 
9287  : Inst_VOP1(iFmt, "v_exp_legacy_f32")
9288  {
9289  setFlag(ALU);
9290  setFlag(F32);
9291  } // Inst_VOP1__V_EXP_LEGACY_F32
9292 
9294  {
9295  } // ~Inst_VOP1__V_EXP_LEGACY_F32
9296 
9297  // D.f = pow(2.0, S0.f)
9298  void
9300  {
9301  Wavefront *wf = gpuDynInst->wavefront();
9302  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
9303  VecOperandF32 vdst(gpuDynInst, instData.VDST);
9304 
9305  src.readSrc();
9306 
9307  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
9308  if (wf->execMask(lane)) {
9309  vdst[lane] = std::pow(2.0, src[lane]);
9310  }
9311  }
9312 
9313  vdst.write();
9314  }
9315 
9317  : Inst_VOP1(iFmt, "v_log_legacy_f32")
9318  {
9319  setFlag(ALU);
9320  setFlag(F32);
9321  } // Inst_VOP1__V_LOG_LEGACY_F32
9322 
9324  {
9325  } // ~Inst_VOP1__V_LOG_LEGACY_F32
9326 
9327  // D.f = log2(S0.f).
9328  void
9330  {
9331  Wavefront *wf = gpuDynInst->wavefront();
9332  ConstVecOperandF32 src(gpuDynInst, instData.SRC0);
9333  VecOperandF32 vdst(gpuDynInst, instData.VDST);
9334 
9335  src.readSrc();
9336 
9337  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
9338  if (wf->execMask(lane)) {
9339  vdst[lane] = std::log2(src[lane]);
9340  }
9341  }
9342 
9343  vdst.write();
9344  }
9345 
9347  : Inst_VOPC(iFmt, "v_cmp_class_f32")
9348  {
9349  setFlag(ALU);
9350  setFlag(F32);
9351  } // Inst_VOPC__V_CMP_CLASS_F32
9352 
9354  {
9355  } // ~Inst_VOPC__V_CMP_CLASS_F32
9356 
9357  // VCC = IEEE numeric class function specified in S1.u, performed on S0.f
9358  // The function reports true if the floating point value is any of the
9359  // numeric types selected in S1.u according to the following list:
9360  // S1.u[0] -- value is a signaling NaN.
9361  // S1.u[1] -- value is a quiet NaN.
9362  // S1.u[2] -- value is negative infinity.
9363  // S1.u[3] -- value is a negative normal value.
9364  // S1.u[4] -- value is a negative denormal value.
9365  // S1.u[5] -- value is negative zero.
9366  // S1.u[6] -- value is positive zero.
9367  // S1.u[7] -- value is a positive denormal value.
9368  // S1.u[8] -- value is a positive normal value.
9369  // S1.u[9] -- value is positive infinity.
9370  void
9372  {
9373  Wavefront *wf = gpuDynInst->wavefront();
9374  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
9375  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
9376  ConstScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
9377 
9378  src0.readSrc();
9379  src1.read();
9380 
9381  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
9382  if (wf->execMask(lane)) {
9383  if (bits(src1[lane], 0) || bits(src1[lane], 1)) {
9384  // is NaN
9385  if (std::isnan(src0[lane])) {
9386  vcc.setBit(lane, 1);
9387  continue;
9388  }
9389  }
9390  if (bits(src1[lane], 2)) {
9391  // is -infinity
9392  if (std::isinf(src0[lane]) && std::signbit(src0[lane])) {
9393  vcc.setBit(lane, 1);
9394  continue;
9395  }
9396  }
9397  if (bits(src1[lane], 3)) {
9398  // is -normal
9399  if (std::isnormal(src0[lane])
9400  && std::signbit(src0[lane])) {
9401  vcc.setBit(lane, 1);
9402  continue;
9403  }
9404  }
9405  if (bits(src1[lane], 4)) {
9406  // is -denormal
9407  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
9408  && std::signbit(src0[lane])) {
9409  vcc.setBit(lane, 1);
9410  continue;
9411  }
9412  }
9413  if (bits(src1[lane], 5)) {
9414  // is -zero
9415  if (std::fpclassify(src0[lane]) == FP_ZERO
9416  && std::signbit(src0[lane])) {
9417  vcc.setBit(lane, 1);
9418  continue;
9419  }
9420  }
9421  if (bits(src1[lane], 6)) {
9422  // is +zero
9423  if (std::fpclassify(src0[lane]) == FP_ZERO
9424  && !std::signbit(src0[lane])) {
9425  vcc.setBit(lane, 1);
9426  continue;
9427  }
9428  }
9429  if (bits(src1[lane], 7)) {
9430  // is +denormal
9431  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
9432  && !std::signbit(src0[lane])) {
9433  vcc.setBit(lane, 1);
9434  continue;
9435  }
9436  }
9437  if (bits(src1[lane], 8)) {
9438  // is +normal
9439  if (std::isnormal(src0[lane])
9440  && !std::signbit(src0[lane])) {
9441  vcc.setBit(lane, 1);
9442  continue;
9443  }
9444  }
9445  if (bits(src1[lane], 9)) {
9446  // is +infinity
9447  if (std::isinf(src0[lane]) && !std::signbit(src0[lane])) {
9448  vcc.setBit(lane, 1);
9449  continue;
9450  }
9451  }
9452  }
9453  }
9454 
9455  vcc.write();
9456  }
9457 
9459  : Inst_VOPC(iFmt, "v_cmpx_class_f32")
9460  {
9461  setFlag(ALU);
9462  setFlag(F32);
9463  } // Inst_VOPC__V_CMPX_CLASS_F32
9464 
9466  {
9467  } // ~Inst_VOPC__V_CMPX_CLASS_F32
9468 
9469  // EXEC, VCC = IEEE numeric class function specified in S1.u, performed on
9470  // S0.f The function reports true if the floating point value is any of
9471  // the numeric types selected in S1.u according to the following list:
9472  // S1.u[0] -- value is a signaling NaN.
9473  // S1.u[1] -- value is a quiet NaN.
9474  // S1.u[2] -- value is negative infinity.
9475  // S1.u[3] -- value is a negative normal value.
9476  // S1.u[4] -- value is a negative denormal value.
9477  // S1.u[5] -- value is negative zero.
9478  // S1.u[6] -- value is positive zero.
9479  // S1.u[7] -- value is a positive denormal value.
9480  // S1.u[8] -- value is a positive normal value.
9481  // S1.u[9] -- value is positive infinity.
9482  void
9484  {
9485  Wavefront *wf = gpuDynInst->wavefront();
9486  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
9487  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
9488  ConstScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
9489 
9490  src0.readSrc();
9491  src1.read();
9492 
9493  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
9494  if (wf->execMask(lane)) {
9495  if (bits(src1[lane], 0) || bits(src1[lane], 1)) {
9496  // is NaN
9497  if (std::isnan(src0[lane])) {
9498  vcc.setBit(lane, 1);
9499  continue;
9500  }
9501  }
9502  if (bits(src1[lane], 2)) {
9503  // is -infinity
9504  if (std::isinf(src0[lane]) && std::signbit(src0[lane])) {
9505  vcc.setBit(lane, 1);
9506  continue;
9507  }
9508  }
9509  if (bits(src1[lane], 3)) {
9510  // is -normal
9511  if (std::isnormal(src0[lane])
9512  && std::signbit(src0[lane])) {
9513  vcc.setBit(lane, 1);
9514  continue;
9515  }
9516  }
9517  if (bits(src1[lane], 4)) {
9518  // is -denormal
9519  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
9520  && std::signbit(src0[lane])) {
9521  vcc.setBit(lane, 1);
9522  continue;
9523  }
9524  }
9525  if (bits(src1[lane], 5)) {
9526  // is -zero
9527  if (std::fpclassify(src0[lane]) == FP_ZERO
9528  && std::signbit(src0[lane])) {
9529  vcc.setBit(lane, 1);
9530  continue;
9531  }
9532  }
9533  if (bits(src1[lane], 6)) {
9534  // is +zero
9535  if (std::fpclassify(src0[lane]) == FP_ZERO
9536  && !std::signbit(src0[lane])) {
9537  vcc.setBit(lane, 1);
9538  continue;
9539  }
9540  }
9541  if (bits(src1[lane], 7)) {
9542  // is +denormal
9543  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
9544  && !std::signbit(src0[lane])) {
9545  vcc.setBit(lane, 1);
9546  continue;
9547  }
9548  }
9549  if (bits(src1[lane], 8)) {
9550  // is +normal
9551  if (std::isnormal(src0[lane])
9552  && !std::signbit(src0[lane])) {
9553  vcc.setBit(lane, 1);
9554  continue;
9555  }
9556  }
9557  if (bits(src1[lane], 9)) {
9558  // is +infinity
9559  if (std::isinf(src0[lane]) && !std::signbit(src0[lane])) {
9560  vcc.setBit(lane, 1);
9561  continue;
9562  }
9563  }
9564  }
9565  }
9566 
9567  vcc.write();
9568  wf->execMask() = vcc.rawData();
9569  }
9570 
9572  : Inst_VOPC(iFmt, "v_cmp_class_f64")
9573  {
9574  setFlag(ALU);
9575  setFlag(F64);
9576  } // Inst_VOPC__V_CMP_CLASS_F64
9577 
9579  {
9580  } // ~Inst_VOPC__V_CMP_CLASS_F64
9581 
9582  // VCC = IEEE numeric class function specified in S1.u, performed on S0.d
9583  // The function reports true if the floating point value is any of the
9584  // numeric types selected in S1.u according to the following list:
9585  // S1.u[0] -- value is a signaling NaN.
9586  // S1.u[1] -- value is a quiet NaN.
9587  // S1.u[2] -- value is negative infinity.
9588  // S1.u[3] -- value is a negative normal value.
9589  // S1.u[4] -- value is a negative denormal value.
9590  // S1.u[5] -- value is negative zero.
9591  // S1.u[6] -- value is positive zero.
9592  // S1.u[7] -- value is a positive denormal value.
9593  // S1.u[8] -- value is a positive normal value.
9594  // S1.u[9] -- value is positive infinity.
9595  void
9597  {
9598  Wavefront *wf = gpuDynInst->wavefront();
9599  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
9600  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
9601  ConstScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
9602 
9603  src0.readSrc();
9604  src1.read();
9605 
9606  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
9607  if (wf->execMask(lane)) {
9608  if (bits(src1[lane], 0) || bits(src1[lane], 1)) {
9609  // is NaN
9610  if (std::isnan(src0[lane])) {
9611  vcc.setBit(lane, 1);
9612  continue;
9613  }
9614  }
9615  if (bits(src1[lane], 2)) {
9616  // is -infinity
9617  if (std::isinf(src0[lane]) && std::signbit(src0[lane])) {
9618  vcc.setBit(lane, 1);
9619  continue;
9620  }
9621  }
9622  if (bits(src1[lane], 3)) {
9623  // is -normal
9624  if (std::isnormal(src0[lane])
9625  && std::signbit(src0[lane])) {
9626  vcc.setBit(lane, 1);
9627  continue;
9628  }
9629  }
9630  if (bits(src1[lane], 4)) {
9631  // is -denormal
9632  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
9633  && std::signbit(src0[lane])) {
9634  vcc.setBit(lane, 1);
9635  continue;
9636  }
9637  }
9638  if (bits(src1[lane], 5)) {
9639  // is -zero
9640  if (std::fpclassify(src0[lane]) == FP_ZERO
9641  && std::signbit(src0[lane])) {
9642  vcc.setBit(lane, 1);
9643  continue;
9644  }
9645  }
9646  if (bits(src1[lane], 6)) {
9647  // is +zero
9648  if (std::fpclassify(src0[lane]) == FP_ZERO
9649  && !std::signbit(src0[lane])) {
9650  vcc.setBit(lane, 1);
9651  continue;
9652  }
9653  }
9654  if (bits(src1[lane], 7)) {
9655  // is +denormal
9656  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
9657  && !std::signbit(src0[lane])) {
9658  vcc.setBit(lane, 1);
9659  continue;
9660  }
9661  }
9662  if (bits(src1[lane], 8)) {
9663  // is +normal
9664  if (std::isnormal(src0[lane])
9665  && !std::signbit(src0[lane])) {
9666  vcc.setBit(lane, 1);
9667  continue;
9668  }
9669  }
9670  if (bits(src1[lane], 9)) {
9671  // is +infinity
9672  if (std::isinf(src0[lane])
9673  && !std::signbit(src0[lane])) {
9674  vcc.setBit(lane, 1);
9675  continue;
9676  }
9677  }
9678  }
9679  }
9680 
9681  vcc.write();
9682  }
9683 
9685  : Inst_VOPC(iFmt, "v_cmpx_class_f64")
9686  {
9687  setFlag(ALU);
9688  setFlag(F64);
9689  } // Inst_VOPC__V_CMPX_CLASS_F64
9690 
9692  {
9693  } // ~Inst_VOPC__V_CMPX_CLASS_F64
9694 
9695  // EXEC, VCC = IEEE numeric class function specified in S1.u, performed on
9696  // S0.d The function reports true if the floating point value is any of
9697  // the numeric types selected in S1.u according to the following list:
9698  // S1.u[0] -- value is a signaling NaN.
9699  // S1.u[1] -- value is a quiet NaN.
9700  // S1.u[2] -- value is negative infinity.
9701  // S1.u[3] -- value is a negative normal value.
9702  // S1.u[4] -- value is a negative denormal value.
9703  // S1.u[5] -- value is negative zero.
9704  // S1.u[6] -- value is positive zero.
9705  // S1.u[7] -- value is a positive denormal value.
9706  // S1.u[8] -- value is a positive normal value.
9707  // S1.u[9] -- value is positive infinity.
9708  void
9710  {
9711  Wavefront *wf = gpuDynInst->wavefront();
9712  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
9713  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
9714  ConstScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
9715 
9716  src0.readSrc();
9717  src1.read();
9718 
9719  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
9720  if (wf->execMask(lane)) {
9721  if (bits(src1[lane], 0) || bits(src1[lane], 1)) {
9722  // is NaN
9723  if (std::isnan(src0[lane])) {
9724  vcc.setBit(lane, 1);
9725  continue;
9726  }
9727  }
9728  if (bits(src1[lane], 2)) {
9729  // is -infinity
9730  if (std::isinf(src0[lane]) && std::signbit(src0[lane])) {
9731  vcc.setBit(lane, 1);
9732  continue;
9733  }
9734  }
9735  if (bits(src1[lane], 3)) {
9736  // is -normal
9737  if (std::isnormal(src0[lane])
9738  && std::signbit(src0[lane])) {
9739  vcc.setBit(lane, 1);
9740  continue;
9741  }
9742  }
9743  if (bits(src1[lane], 4)) {
9744  // is -denormal
9745  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
9746  && std::signbit(src0[lane])) {
9747  vcc.setBit(lane, 1);
9748  continue;
9749  }
9750  }
9751  if (bits(src1[lane], 5)) {
9752  // is -zero
9753  if (std::fpclassify(src0[lane]) == FP_ZERO
9754  && std::signbit(src0[lane])) {
9755  vcc.setBit(lane, 1);
9756  continue;
9757  }
9758  }
9759  if (bits(src1[lane], 6)) {
9760  // is +zero
9761  if (std::fpclassify(src0[lane]) == FP_ZERO
9762  && !std::signbit(src0[lane])) {
9763  vcc.setBit(lane, 1);
9764  continue;
9765  }
9766  }
9767  if (bits(src1[lane], 7)) {
9768  // is +denormal
9769  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
9770  && !std::signbit(src0[lane])) {
9771  vcc.setBit(lane, 1);
9772  continue;
9773  }
9774  }
9775  if (bits(src1[lane], 8)) {
9776  // is +normal
9777  if (std::isnormal(src0[lane])
9778  && !std::signbit(src0[lane])) {
9779  vcc.setBit(lane, 1);
9780  continue;
9781  }
9782  }
9783  if (bits(src1[lane], 9)) {
9784  // is +infinity
9785  if (std::isinf(src0[lane])
9786  && !std::signbit(src0[lane])) {
9787  vcc.setBit(lane, 1);
9788  continue;
9789  }
9790  }
9791  }
9792  }
9793 
9794  vcc.write();
9795  wf->execMask() = vcc.rawData();
9796  }
9797 
9799  : Inst_VOPC(iFmt, "v_cmp_class_f16")
9800  {
9801  setFlag(ALU);
9802  setFlag(F16);
9803  } // Inst_VOPC__V_CMP_CLASS_F16
9804 
9806  {
9807  } // ~Inst_VOPC__V_CMP_CLASS_F16
9808 
9809  // VCC = IEEE numeric class function specified in S1.u, performed on S0.f16
9810  // The function reports true if the floating point value is any of the
9811  // numeric types selected in S1.u according to the following list:
9812  // S1.u[0] -- value is a signaling NaN.
9813  // S1.u[1] -- value is a quiet NaN.
9814  // S1.u[2] -- value is negative infinity.
9815  // S1.u[3] -- value is a negative normal value.
9816  // S1.u[4] -- value is a negative denormal value.
9817  // S1.u[5] -- value is negative zero.
9818  // S1.u[6] -- value is positive zero.
9819  // S1.u[7] -- value is a positive denormal value.
9820  // S1.u[8] -- value is a positive normal value.
9821  // S1.u[9] -- value is positive infinity.
9822  void
9824  {
9826  }
9827 
9829  : Inst_VOPC(iFmt, "v_cmpx_class_f16")
9830  {
9831  setFlag(ALU);
9832  setFlag(F16);
9833  } // Inst_VOPC__V_CMPX_CLASS_F16
9834 
9836  {
9837  } // ~Inst_VOPC__V_CMPX_CLASS_F16
9838 
9839  // EXEC, VCC = IEEE numeric class function specified in S1.u, performed on
9840  // S0.f16
9841  // The function reports true if the floating point value is any of the
9842  // numeric types selected in S1.u according to the following list:
9843  // S1.u[0] -- value is a signaling NaN.
9844  // S1.u[1] -- value is a quiet NaN.
9845  // S1.u[2] -- value is negative infinity.
9846  // S1.u[3] -- value is a negative normal value.
9847  // S1.u[4] -- value is a negative denormal value.
9848  // S1.u[5] -- value is negative zero.
9849  // S1.u[6] -- value is positive zero.
9850  // S1.u[7] -- value is a positive denormal value.
9851  // S1.u[8] -- value is a positive normal value.
9852  // S1.u[9] -- value is positive infinity.
9853  void
9855  {
9857  }
9858 
9860  : Inst_VOPC(iFmt, "v_cmp_f_f16")
9861  {
9862  setFlag(ALU);
9863  setFlag(F16);
9864  } // Inst_VOPC__V_CMP_F_F16
9865 
9867  {
9868  } // ~Inst_VOPC__V_CMP_F_F16
9869 
9870  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
9871  void
9873  {
9875  }
9876 
9878  : Inst_VOPC(iFmt, "v_cmp_lt_f16")
9879  {
9880  setFlag(ALU);
9881  setFlag(F16);
9882  } // Inst_VOPC__V_CMP_LT_F16
9883 
9885  {
9886  } // ~Inst_VOPC__V_CMP_LT_F16
9887 
9888  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
9889  void
9891  {
9893  }
9894 
9896  : Inst_VOPC(iFmt, "v_cmp_eq_f16")
9897  {
9898  setFlag(ALU);
9899  setFlag(F16);
9900  } // Inst_VOPC__V_CMP_EQ_F16
9901 
9903  {
9904  } // ~Inst_VOPC__V_CMP_EQ_F16
9905 
9906  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
9907  void
9909  {
9911  }
9912 
9914  : Inst_VOPC(iFmt, "v_cmp_le_f16")
9915  {
9916  setFlag(ALU);
9917  setFlag(F16);
9918  } // Inst_VOPC__V_CMP_LE_F16
9919 
9921  {
9922  } // ~Inst_VOPC__V_CMP_LE_F16
9923 
9924  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
9925  void
9927  {
9929  }
9930 
9932  : Inst_VOPC(iFmt, "v_cmp_gt_f16")
9933  {
9934  setFlag(ALU);
9935  setFlag(F16);
9936  } // Inst_VOPC__V_CMP_GT_F16
9937 
9939  {
9940  } // ~Inst_VOPC__V_CMP_GT_F16
9941 
9942  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
9943  void
9945  {
9947  }
9948 
9950  : Inst_VOPC(iFmt, "v_cmp_lg_f16")
9951  {
9952  setFlag(ALU);
9953  setFlag(F16);
9954  } // Inst_VOPC__V_CMP_LG_F16
9955 
9957  {
9958  } // ~Inst_VOPC__V_CMP_LG_F16
9959 
9960  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
9961  void
9963  {
9965  }
9966 
9968  : Inst_VOPC(iFmt, "v_cmp_ge_f16")
9969  {
9970  setFlag(ALU);
9971  setFlag(F16);
9972  } // Inst_VOPC__V_CMP_GE_F16
9973 
9975  {
9976  } // ~Inst_VOPC__V_CMP_GE_F16
9977 
9978  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
9979  void
9981  {
9983  }
9984 
9986  : Inst_VOPC(iFmt, "v_cmp_o_f16")
9987  {
9988  setFlag(ALU);
9989  setFlag(F16);
9990  } // Inst_VOPC__V_CMP_O_F16
9991 
9993  {
9994  } // ~Inst_VOPC__V_CMP_O_F16
9995 
9996  // D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC encoding.
9997  void
9999  {
10001  }
10002 
10004  : Inst_VOPC(iFmt, "v_cmp_u_f16")
10005  {
10006  setFlag(ALU);
10007  setFlag(F16);
10008  } // Inst_VOPC__V_CMP_U_F16
10009 
10011  {
10012  } // ~Inst_VOPC__V_CMP_U_F16
10013 
10014  // D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC encoding.
10015  void
10017  {
10019  }
10020 
10022  : Inst_VOPC(iFmt, "v_cmp_nge_f16")
10023  {
10024  setFlag(ALU);
10025  setFlag(F16);
10026  } // Inst_VOPC__V_CMP_NGE_F16
10027 
10029  {
10030  } // ~Inst_VOPC__V_CMP_NGE_F16
10031 
10032  // D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
10033  void
10035  {
10037  }
10038 
10040  : Inst_VOPC(iFmt, "v_cmp_nlg_f16")
10041  {
10042  setFlag(ALU);
10043  setFlag(F16);
10044  } // Inst_VOPC__V_CMP_NLG_F16
10045 
10047  {
10048  } // ~Inst_VOPC__V_CMP_NLG_F16
10049 
10050  // D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
10051  void
10053  {
10055  }
10056 
10058  : Inst_VOPC(iFmt, "v_cmp_ngt_f16")
10059  {
10060  setFlag(ALU);
10061  setFlag(F16);
10062  } // Inst_VOPC__V_CMP_NGT_F16
10063 
10065  {
10066  } // ~Inst_VOPC__V_CMP_NGT_F16
10067 
10068  // D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
10069  void
10071  {
10073  }
10074 
10076  : Inst_VOPC(iFmt, "v_cmp_nle_f16")
10077  {
10078  setFlag(ALU);
10079  setFlag(F16);
10080  } // Inst_VOPC__V_CMP_NLE_F16
10081 
10083  {
10084  } // ~Inst_VOPC__V_CMP_NLE_F16
10085 
10086  // D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
10087  void
10089  {
10091  }
10092 
10094  : Inst_VOPC(iFmt, "v_cmp_neq_f16")
10095  {
10096  setFlag(ALU);
10097  setFlag(F16);
10098  } // Inst_VOPC__V_CMP_NEQ_F16
10099 
10101  {
10102  } // ~Inst_VOPC__V_CMP_NEQ_F16
10103 
10104  // D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
10105  void
10107  {
10109  }
10110 
10112  : Inst_VOPC(iFmt, "v_cmp_nlt_f16")
10113  {
10114  setFlag(ALU);
10115  setFlag(F16);
10116  } // Inst_VOPC__V_CMP_NLT_F16
10117 
10119  {
10120  } // ~Inst_VOPC__V_CMP_NLT_F16
10121 
10122  // D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
10123  void
10125  {
10127  }
10128 
10130  : Inst_VOPC(iFmt, "v_cmp_tru_f16")
10131  {
10132  setFlag(ALU);
10133  setFlag(F16);
10134  } // Inst_VOPC__V_CMP_TRU_F16
10135 
10137  {
10138  } // ~Inst_VOPC__V_CMP_TRU_F16
10139 
10140  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
10141  void
10143  {
10145  }
10146 
10148  : Inst_VOPC(iFmt, "v_cmpx_f_f16")
10149  {
10150  setFlag(ALU);
10151  setFlag(F16);
10152  } // Inst_VOPC__V_CMPX_F_F16
10153 
10155  {
10156  } // ~Inst_VOPC__V_CMPX_F_F16
10157 
10158  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
10159  void
10161  {
10163  }
10164 
10166  : Inst_VOPC(iFmt, "v_cmpx_lt_f16")
10167  {
10168  setFlag(ALU);
10169  setFlag(F16);
10170  } // Inst_VOPC__V_CMPX_LT_F16
10171 
10173  {
10174  } // ~Inst_VOPC__V_CMPX_LT_F16
10175 
10176  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
10177  void
10179  {
10181  }
10182 
10184  : Inst_VOPC(iFmt, "v_cmpx_eq_f16")
10185  {
10186  setFlag(ALU);
10187  setFlag(F16);
10188  } // Inst_VOPC__V_CMPX_EQ_F16
10189 
10191  {
10192  } // ~Inst_VOPC__V_CMPX_EQ_F16
10193 
10194  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
10195  void
10197  {
10199  }
10200 
10202  : Inst_VOPC(iFmt, "v_cmpx_le_f16")
10203  {
10204  setFlag(ALU);
10205  setFlag(F16);
10206  } // Inst_VOPC__V_CMPX_LE_F16
10207 
10209  {
10210  } // ~Inst_VOPC__V_CMPX_LE_F16
10211 
10212  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
10213  void
10215  {
10217  }
10218 
10220  : Inst_VOPC(iFmt, "v_cmpx_gt_f16")
10221  {
10222  setFlag(ALU);
10223  setFlag(F16);
10224  } // Inst_VOPC__V_CMPX_GT_F16
10225 
10227  {
10228  } // ~Inst_VOPC__V_CMPX_GT_F16
10229 
10230  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
10231  void
10233  {
10235  }
10236 
10238  : Inst_VOPC(iFmt, "v_cmpx_lg_f16")
10239  {
10240  setFlag(ALU);
10241  setFlag(F16);
10242  } // Inst_VOPC__V_CMPX_LG_F16
10243 
10245  {
10246  } // ~Inst_VOPC__V_CMPX_LG_F16
10247 
10248  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
10249  void
10251  {
10253  }
10254 
10256  : Inst_VOPC(iFmt, "v_cmpx_ge_f16")
10257  {
10258  setFlag(ALU);
10259  setFlag(F16);
10260  } // Inst_VOPC__V_CMPX_GE_F16
10261 
10263  {
10264  } // ~Inst_VOPC__V_CMPX_GE_F16
10265 
10266  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
10267  void
10269  {
10271  }
10272 
10274  : Inst_VOPC(iFmt, "v_cmpx_o_f16")
10275  {
10276  setFlag(ALU);
10277  setFlag(F16);
10278  } // Inst_VOPC__V_CMPX_O_F16
10279 
10281  {
10282  } // ~Inst_VOPC__V_CMPX_O_F16
10283 
10284  // EXEC,D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC
10285  // encoding.
10286  void
10288  {
10290  }
10291 
10293  : Inst_VOPC(iFmt, "v_cmpx_u_f16")
10294  {
10295  setFlag(ALU);
10296  setFlag(F16);
10297  } // Inst_VOPC__V_CMPX_U_F16
10298 
10300  {
10301  } // ~Inst_VOPC__V_CMPX_U_F16
10302 
10303  // EXEC,D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC
10304  // encoding.
10305  void
10307  {
10309  }
10310 
10312  : Inst_VOPC(iFmt, "v_cmpx_nge_f16")
10313  {
10314  setFlag(ALU);
10315  setFlag(F16);
10316  } // Inst_VOPC__V_CMPX_NGE_F16
10317 
10319  {
10320  } // ~Inst_VOPC__V_CMPX_NGE_F16
10321 
10322  // EXEC,D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
10323  void
10325  {
10327  }
10328 
10330  : Inst_VOPC(iFmt, "v_cmpx_nlg_f16")
10331  {
10332  setFlag(ALU);
10333  setFlag(F16);
10334  } // Inst_VOPC__V_CMPX_NLG_F16
10335 
10337  {
10338  } // ~Inst_VOPC__V_CMPX_NLG_F16
10339 
10340  // EXEC,D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
10341  void
10343  {
10345  }
10346 
10348  : Inst_VOPC(iFmt, "v_cmpx_ngt_f16")
10349  {
10350  setFlag(ALU);
10351  setFlag(F16);
10352  } // Inst_VOPC__V_CMPX_NGT_F16
10353 
10355  {
10356  } // ~Inst_VOPC__V_CMPX_NGT_F16
10357 
10358  // EXEC,D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
10359  void
10361  {
10363  }
10364 
10366  : Inst_VOPC(iFmt, "v_cmpx_nle_f16")
10367  {
10368  setFlag(ALU);
10369  setFlag(F16);
10370  } // Inst_VOPC__V_CMPX_NLE_F16
10371 
10373  {
10374  } // ~Inst_VOPC__V_CMPX_NLE_F16
10375 
10376  // EXEC,D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
10377  void
10379  {
10381  }
10382 
10384  : Inst_VOPC(iFmt, "v_cmpx_neq_f16")
10385  {
10386  setFlag(ALU);
10387  setFlag(F16);
10388  } // Inst_VOPC__V_CMPX_NEQ_F16
10389 
10391  {
10392  } // ~Inst_VOPC__V_CMPX_NEQ_F16
10393 
10394  // EXEC,D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
10395  void
10397  {
10399  }
10400 
10402  : Inst_VOPC(iFmt, "v_cmpx_nlt_f16")
10403  {
10404  setFlag(ALU);
10405  setFlag(F16);
10406  } // Inst_VOPC__V_CMPX_NLT_F16
10407 
10409  {
10410  } // ~Inst_VOPC__V_CMPX_NLT_F16
10411 
10412  // EXEC,D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
10413  void
10415  {
10417  }
10418 
10420  : Inst_VOPC(iFmt, "v_cmpx_tru_f16")
10421  {
10422  setFlag(ALU);
10423  setFlag(F16);
10424  } // Inst_VOPC__V_CMPX_TRU_F16
10425 
10427  {
10428  } // ~Inst_VOPC__V_CMPX_TRU_F16
10429 
10430  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
10431  void
10433  {
10435  }
10436 
10438  : Inst_VOPC(iFmt, "v_cmp_f_f32")
10439  {
10440  setFlag(ALU);
10441  setFlag(F32);
10442  } // Inst_VOPC__V_CMP_F_F32
10443 
10445  {
10446  } // ~Inst_VOPC__V_CMP_F_F32
10447 
10448  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
10449  void
10451  {
10452  Wavefront *wf = gpuDynInst->wavefront();
10453  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10454 
10455  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10456  if (wf->execMask(lane)) {
10457  vcc.setBit(lane, 0);
10458  }
10459  }
10460 
10461  vcc.write();
10462  }
10463 
10465  : Inst_VOPC(iFmt, "v_cmp_lt_f32")
10466  {
10467  setFlag(ALU);
10468  setFlag(F32);
10469  } // Inst_VOPC__V_CMP_LT_F32
10470 
10472  {
10473  } // ~Inst_VOPC__V_CMP_LT_F32
10474 
10475  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
10476  void
10478  {
10479  Wavefront *wf = gpuDynInst->wavefront();
10480  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10481  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10482  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10483 
10484  src0.readSrc();
10485  src1.read();
10486 
10487  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10488  if (wf->execMask(lane)) {
10489  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
10490  }
10491  }
10492 
10493  vcc.write();
10494  }
10495 
10497  : Inst_VOPC(iFmt, "v_cmp_eq_f32")
10498  {
10499  setFlag(ALU);
10500  setFlag(F32);
10501  } // Inst_VOPC__V_CMP_EQ_F32
10502 
10504  {
10505  } // ~Inst_VOPC__V_CMP_EQ_F32
10506 
10507  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
10508  void
10510  {
10511  Wavefront *wf = gpuDynInst->wavefront();
10512  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10513  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10514  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10515 
10516  src0.readSrc();
10517  src1.read();
10518 
10519  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10520  if (wf->execMask(lane)) {
10521  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
10522  }
10523  }
10524 
10525  vcc.write();
10526  }
10527 
10529  : Inst_VOPC(iFmt, "v_cmp_le_f32")
10530  {
10531  setFlag(ALU);
10532  setFlag(F32);
10533  } // Inst_VOPC__V_CMP_LE_F32
10534 
10536  {
10537  } // ~Inst_VOPC__V_CMP_LE_F32
10538 
10539  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
10540  void
10542  {
10543  Wavefront *wf = gpuDynInst->wavefront();
10544  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10545  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10546  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10547 
10548  src0.readSrc();
10549  src1.read();
10550 
10551  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10552  if (wf->execMask(lane)) {
10553  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
10554  }
10555  }
10556 
10557  vcc.write();
10558  }
10559 
10561  : Inst_VOPC(iFmt, "v_cmp_gt_f32")
10562  {
10563  setFlag(ALU);
10564  setFlag(F32);
10565  } // Inst_VOPC__V_CMP_GT_F32
10566 
10568  {
10569  } // ~Inst_VOPC__V_CMP_GT_F32
10570 
10571  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
10572  void
10574  {
10575  Wavefront *wf = gpuDynInst->wavefront();
10576  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10577  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10578  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10579 
10580  src0.readSrc();
10581  src1.read();
10582 
10583  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10584  if (wf->execMask(lane)) {
10585  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
10586  }
10587  }
10588 
10589  vcc.write();
10590  }
10591 
10593  : Inst_VOPC(iFmt, "v_cmp_lg_f32")
10594  {
10595  setFlag(ALU);
10596  setFlag(F32);
10597  } // Inst_VOPC__V_CMP_LG_F32
10598 
10600  {
10601  } // ~Inst_VOPC__V_CMP_LG_F32
10602 
10603  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
10604  void
10606  {
10607  Wavefront *wf = gpuDynInst->wavefront();
10608  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10609  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10610  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10611 
10612  src0.readSrc();
10613  src1.read();
10614 
10615  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10616  if (wf->execMask(lane)) {
10617  vcc.setBit(lane, (src0[lane] < src1[lane]
10618  || src0[lane] > src1[lane]) ? 1 : 0);
10619  }
10620  }
10621 
10622  vcc.write();
10623  }
10624 
10626  : Inst_VOPC(iFmt, "v_cmp_ge_f32")
10627  {
10628  setFlag(ALU);
10629  setFlag(F32);
10630  } // Inst_VOPC__V_CMP_GE_F32
10631 
10633  {
10634  } // ~Inst_VOPC__V_CMP_GE_F32
10635 
10636  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
10637  void
10639  {
10640  Wavefront *wf = gpuDynInst->wavefront();
10641  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10642  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10643  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10644 
10645  src0.readSrc();
10646  src1.read();
10647 
10648  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10649  if (wf->execMask(lane)) {
10650  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
10651  }
10652  }
10653 
10654  vcc.write();
10655  }
10656 
10658  : Inst_VOPC(iFmt, "v_cmp_o_f32")
10659  {
10660  setFlag(ALU);
10661  setFlag(F32);
10662  } // Inst_VOPC__V_CMP_O_F32
10663 
10665  {
10666  } // ~Inst_VOPC__V_CMP_O_F32
10667 
10668  // D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC encoding.
10669  void
10671  {
10672  Wavefront *wf = gpuDynInst->wavefront();
10673  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10674  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10675  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10676 
10677  src0.readSrc();
10678  src1.read();
10679 
10680  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10681  if (wf->execMask(lane)) {
10682  vcc.setBit(lane, (!std::isnan(src0[lane])
10683  && !std::isnan(src1[lane])) ? 1 : 0);
10684  }
10685  }
10686 
10687  vcc.write();
10688  }
10689 
10691  : Inst_VOPC(iFmt, "v_cmp_u_f32")
10692  {
10693  setFlag(ALU);
10694  setFlag(F32);
10695  } // Inst_VOPC__V_CMP_U_F32
10696 
10698  {
10699  } // ~Inst_VOPC__V_CMP_U_F32
10700 
10701  // D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC encoding.
10702  void
10704  {
10705  Wavefront *wf = gpuDynInst->wavefront();
10706  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10707  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10708  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10709 
10710  src0.readSrc();
10711  src1.read();
10712 
10713  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10714  if (wf->execMask(lane)) {
10715  vcc.setBit(lane, (std::isnan(src0[lane])
10716  || std::isnan(src1[lane])) ? 1 : 0);
10717  }
10718  }
10719 
10720  vcc.write();
10721  }
10722 
10724  : Inst_VOPC(iFmt, "v_cmp_nge_f32")
10725  {
10726  setFlag(ALU);
10727  setFlag(F32);
10728  } // Inst_VOPC__V_CMP_NGE_F32
10729 
10731  {
10732  } // ~Inst_VOPC__V_CMP_NGE_F32
10733 
10734  // D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
10735  void
10737  {
10738  Wavefront *wf = gpuDynInst->wavefront();
10739  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10740  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10741  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10742 
10743  src0.readSrc();
10744  src1.read();
10745 
10746  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10747  if (wf->execMask(lane)) {
10748  vcc.setBit(lane, !(src0[lane] >= src1[lane]) ? 1 : 0);
10749  }
10750  }
10751 
10752  vcc.write();
10753  }
10754 
10756  : Inst_VOPC(iFmt, "v_cmp_nlg_f32")
10757  {
10758  setFlag(ALU);
10759  setFlag(F32);
10760  } // Inst_VOPC__V_CMP_NLG_F32
10761 
10763  {
10764  } // ~Inst_VOPC__V_CMP_NLG_F32
10765 
10766  // D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
10767  void
10769  {
10770  Wavefront *wf = gpuDynInst->wavefront();
10771  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10772  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10773  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10774 
10775  src0.readSrc();
10776  src1.read();
10777 
10778  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10779  if (wf->execMask(lane)) {
10780  vcc.setBit(lane, !(src0[lane] < src1[lane]
10781  || src0[lane] > src1[lane]) ? 1 : 0);
10782  }
10783  }
10784 
10785  vcc.write();
10786  }
10787 
10789  : Inst_VOPC(iFmt, "v_cmp_ngt_f32")
10790  {
10791  setFlag(ALU);
10792  setFlag(F32);
10793  } // Inst_VOPC__V_CMP_NGT_F32
10794 
10796  {
10797  } // ~Inst_VOPC__V_CMP_NGT_F32
10798 
10799  // D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
10800  void
10802  {
10803  Wavefront *wf = gpuDynInst->wavefront();
10804  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10805  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10806  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10807 
10808  src0.readSrc();
10809  src1.read();
10810 
10811  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10812  if (wf->execMask(lane)) {
10813  vcc.setBit(lane, !(src0[lane] > src1[lane]) ? 1 : 0);
10814  }
10815  }
10816 
10817  vcc.write();
10818  }
10819 
10821  : Inst_VOPC(iFmt, "v_cmp_nle_f32")
10822  {
10823  setFlag(ALU);
10824  setFlag(F32);
10825  } // Inst_VOPC__V_CMP_NLE_F32
10826 
10828  {
10829  } // ~Inst_VOPC__V_CMP_NLE_F32
10830 
10831  // D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
10832  void
10834  {
10835  Wavefront *wf = gpuDynInst->wavefront();
10836  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10837  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10838  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10839 
10840  src0.readSrc();
10841  src1.read();
10842 
10843  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10844  if (wf->execMask(lane)) {
10845  vcc.setBit(lane, !(src0[lane] <= src1[lane]) ? 1 : 0);
10846  }
10847  }
10848 
10849  vcc.write();
10850  }
10851 
10853  : Inst_VOPC(iFmt, "v_cmp_neq_f32")
10854  {
10855  setFlag(ALU);
10856  setFlag(F32);
10857  } // Inst_VOPC__V_CMP_NEQ_F32
10858 
10860  {
10861  } // ~Inst_VOPC__V_CMP_NEQ_F32
10862 
10863  // D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
10864  void
10866  {
10867  Wavefront *wf = gpuDynInst->wavefront();
10868  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10869  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10870  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10871 
10872  src0.readSrc();
10873  src1.read();
10874 
10875  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10876  if (wf->execMask(lane)) {
10877  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
10878  }
10879  }
10880 
10881  vcc.write();
10882  }
10883 
10885  : Inst_VOPC(iFmt, "v_cmp_nlt_f32")
10886  {
10887  setFlag(ALU);
10888  setFlag(F32);
10889  } // Inst_VOPC__V_CMP_NLT_F32
10890 
10892  {
10893  } // ~Inst_VOPC__V_CMP_NLT_F32
10894 
10895  // D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
10896  void
10898  {
10899  Wavefront *wf = gpuDynInst->wavefront();
10900  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10901  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10902  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10903 
10904  src0.readSrc();
10905  src1.read();
10906 
10907  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10908  if (wf->execMask(lane)) {
10909  vcc.setBit(lane, !(src0[lane] < src1[lane]) ? 1 : 0);
10910  }
10911  }
10912 
10913  vcc.write();
10914  }
10915 
10917  : Inst_VOPC(iFmt, "v_cmp_tru_f32")
10918  {
10919  setFlag(ALU);
10920  setFlag(F32);
10921  } // Inst_VOPC__V_CMP_TRU_F32
10922 
10924  {
10925  } // ~Inst_VOPC__V_CMP_TRU_F32
10926 
10927  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
10928  void
10930  {
10931  Wavefront *wf = gpuDynInst->wavefront();
10932  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10933 
10934  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10935  if (wf->execMask(lane)) {
10936  vcc.setBit(lane, 1);
10937  }
10938  }
10939 
10940  vcc.write();
10941  }
10942 
10944  : Inst_VOPC(iFmt, "v_cmpx_f_f32")
10945  {
10946  setFlag(ALU);
10947  setFlag(F32);
10948  } // Inst_VOPC__V_CMPX_F_F32
10949 
10951  {
10952  } // ~Inst_VOPC__V_CMPX_F_F32
10953 
10954  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
10955  void
10957  {
10958  Wavefront *wf = gpuDynInst->wavefront();
10959  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10960 
10961  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10962  if (wf->execMask(lane)) {
10963  vcc.setBit(lane, 0);
10964  }
10965  }
10966 
10967  vcc.write();
10968  wf->execMask() = vcc.rawData();
10969  }
10970 
10972  : Inst_VOPC(iFmt, "v_cmpx_lt_f32")
10973  {
10974  setFlag(ALU);
10975  setFlag(F32);
10976  } // Inst_VOPC__V_CMPX_LT_F32
10977 
10979  {
10980  } // ~Inst_VOPC__V_CMPX_LT_F32
10981 
10982  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
10983  void
10985  {
10986  Wavefront *wf = gpuDynInst->wavefront();
10987  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
10988  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
10989  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
10990 
10991  src0.readSrc();
10992  src1.read();
10993 
10994  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
10995  if (wf->execMask(lane)) {
10996  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
10997  }
10998  }
10999 
11000  vcc.write();
11001  wf->execMask() = vcc.rawData();
11002  }
11003 
11005  : Inst_VOPC(iFmt, "v_cmpx_eq_f32")
11006  {
11007  setFlag(ALU);
11008  setFlag(F32);
11009  } // Inst_VOPC__V_CMPX_EQ_F32
11010 
11012  {
11013  } // ~Inst_VOPC__V_CMPX_EQ_F32
11014 
11015  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
11016  void
11018  {
11019  Wavefront *wf = gpuDynInst->wavefront();
11020  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11021  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11022  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11023 
11024  src0.readSrc();
11025  src1.read();
11026 
11027  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11028  if (wf->execMask(lane)) {
11029  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
11030  }
11031  }
11032 
11033  vcc.write();
11034  wf->execMask() = vcc.rawData();
11035  }
11036 
11038  : Inst_VOPC(iFmt, "v_cmpx_le_f32")
11039  {
11040  setFlag(ALU);
11041  setFlag(F32);
11042  } // Inst_VOPC__V_CMPX_LE_F32
11043 
11045  {
11046  } // ~Inst_VOPC__V_CMPX_LE_F32
11047 
11048  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
11049  void
11051  {
11052  Wavefront *wf = gpuDynInst->wavefront();
11053  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11054  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11055  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11056 
11057  src0.readSrc();
11058  src1.read();
11059 
11060  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11061  if (wf->execMask(lane)) {
11062  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
11063  }
11064  }
11065 
11066  vcc.write();
11067  wf->execMask() = vcc.rawData();
11068  }
11069 
11071  : Inst_VOPC(iFmt, "v_cmpx_gt_f32")
11072  {
11073  setFlag(ALU);
11074  setFlag(F32);
11075  } // Inst_VOPC__V_CMPX_GT_F32
11076 
11078  {
11079  } // ~Inst_VOPC__V_CMPX_GT_F32
11080 
11081  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
11082  void
11084  {
11085  Wavefront *wf = gpuDynInst->wavefront();
11086  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11087  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11088  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11089 
11090  src0.readSrc();
11091  src1.read();
11092 
11093  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11094  if (wf->execMask(lane)) {
11095  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
11096  }
11097  }
11098 
11099  vcc.write();
11100  wf->execMask() = vcc.rawData();
11101  }
11102 
11104  : Inst_VOPC(iFmt, "v_cmpx_lg_f32")
11105  {
11106  setFlag(ALU);
11107  setFlag(F32);
11108  } // Inst_VOPC__V_CMPX_LG_F32
11109 
11111  {
11112  } // ~Inst_VOPC__V_CMPX_LG_F32
11113 
11114  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
11115  void
11117  {
11118  Wavefront *wf = gpuDynInst->wavefront();
11119  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11120  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11121  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11122 
11123  src0.readSrc();
11124  src1.read();
11125 
11126  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11127  if (wf->execMask(lane)) {
11128  vcc.setBit(lane, (src0[lane] < src1[lane]
11129  || src0[lane] > src1[lane]) ? 1 : 0);
11130  }
11131  }
11132 
11133  vcc.write();
11134  wf->execMask() = vcc.rawData();
11135  }
11136 
11138  : Inst_VOPC(iFmt, "v_cmpx_ge_f32")
11139  {
11140  setFlag(ALU);
11141  setFlag(F32);
11142  } // Inst_VOPC__V_CMPX_GE_F32
11143 
11145  {
11146  } // ~Inst_VOPC__V_CMPX_GE_F32
11147 
11148  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
11149  void
11151  {
11152  Wavefront *wf = gpuDynInst->wavefront();
11153  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11154  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11155  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11156 
11157  src0.readSrc();
11158  src1.read();
11159 
11160  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11161  if (wf->execMask(lane)) {
11162  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
11163  }
11164  }
11165 
11166  vcc.write();
11167  wf->execMask() = vcc.rawData();
11168  }
11169 
11171  : Inst_VOPC(iFmt, "v_cmpx_o_f32")
11172  {
11173  setFlag(ALU);
11174  setFlag(F32);
11175  } // Inst_VOPC__V_CMPX_O_F32
11176 
11178  {
11179  } // ~Inst_VOPC__V_CMPX_O_F32
11180 
11181  // EXEC,D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC
11182  // encoding.
11183  void
11185  {
11186  Wavefront *wf = gpuDynInst->wavefront();
11187  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11188  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11189  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11190 
11191  src0.readSrc();
11192  src1.read();
11193 
11194  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11195  if (wf->execMask(lane)) {
11196  vcc.setBit(lane, (!std::isnan(src0[lane])
11197  && !std::isnan(src1[lane])) ? 1 : 0);
11198  }
11199  }
11200 
11201  vcc.write();
11202  wf->execMask() = vcc.rawData();
11203  }
11204 
11206  : Inst_VOPC(iFmt, "v_cmpx_u_f32")
11207  {
11208  setFlag(ALU);
11209  setFlag(F32);
11210  } // Inst_VOPC__V_CMPX_U_F32
11211 
11213  {
11214  } // ~Inst_VOPC__V_CMPX_U_F32
11215 
11216  // EXEC,D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC
11217  // encoding.
11218  void
11220  {
11221  Wavefront *wf = gpuDynInst->wavefront();
11222  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11223  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11224  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11225 
11226  src0.readSrc();
11227  src1.read();
11228 
11229  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11230  if (wf->execMask(lane)) {
11231  vcc.setBit(lane, (std::isnan(src0[lane])
11232  || std::isnan(src1[lane])) ? 1 : 0);
11233  }
11234  }
11235 
11236  vcc.write();
11237  wf->execMask() = vcc.rawData();
11238  }
11239 
11241  : Inst_VOPC(iFmt, "v_cmpx_nge_f32")
11242  {
11243  setFlag(ALU);
11244  setFlag(F32);
11245  } // Inst_VOPC__V_CMPX_NGE_F32
11246 
11248  {
11249  } // ~Inst_VOPC__V_CMPX_NGE_F32
11250 
11251  // EXEC,D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
11252  void
11254  {
11255  Wavefront *wf = gpuDynInst->wavefront();
11256  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11257  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11258  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11259 
11260  src0.readSrc();
11261  src1.read();
11262 
11263  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11264  if (wf->execMask(lane)) {
11265  vcc.setBit(lane, !(src0[lane] >= src1[lane]) ? 1 : 0);
11266  }
11267  }
11268 
11269  vcc.write();
11270  wf->execMask() = vcc.rawData();
11271  }
11272 
11274  : Inst_VOPC(iFmt, "v_cmpx_nlg_f32")
11275  {
11276  setFlag(ALU);
11277  setFlag(F32);
11278  } // Inst_VOPC__V_CMPX_NLG_F32
11279 
11281  {
11282  } // ~Inst_VOPC__V_CMPX_NLG_F32
11283 
11284  // EXEC,D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
11285  void
11287  {
11288  Wavefront *wf = gpuDynInst->wavefront();
11289  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11290  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11291  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11292 
11293  src0.readSrc();
11294  src1.read();
11295 
11296  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11297  if (wf->execMask(lane)) {
11298  vcc.setBit(lane, !(src0[lane] < src1[lane]
11299  || src0[lane] > src1[lane]) ? 1 : 0);
11300  }
11301  }
11302 
11303  vcc.write();
11304  wf->execMask() = vcc.rawData();
11305  }
11306 
11308  : Inst_VOPC(iFmt, "v_cmpx_ngt_f32")
11309  {
11310  setFlag(ALU);
11311  setFlag(F32);
11312  } // Inst_VOPC__V_CMPX_NGT_F32
11313 
11315  {
11316  } // ~Inst_VOPC__V_CMPX_NGT_F32
11317 
11318  // EXEC,D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
11319  void
11321  {
11322  Wavefront *wf = gpuDynInst->wavefront();
11323  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11324  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11325  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11326 
11327  src0.readSrc();
11328  src1.read();
11329 
11330  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11331  if (wf->execMask(lane)) {
11332  vcc.setBit(lane, !(src0[lane] > src1[lane]) ? 1 : 0);
11333  }
11334  }
11335 
11336  vcc.write();
11337  wf->execMask() = vcc.rawData();
11338  }
11339 
11341  : Inst_VOPC(iFmt, "v_cmpx_nle_f32")
11342  {
11343  setFlag(ALU);
11344  setFlag(F32);
11345  } // Inst_VOPC__V_CMPX_NLE_F32
11346 
11348  {
11349  } // ~Inst_VOPC__V_CMPX_NLE_F32
11350 
11351  // EXEC,D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
11352  void
11354  {
11355  Wavefront *wf = gpuDynInst->wavefront();
11356  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11357  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11358  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11359 
11360  src0.readSrc();
11361  src1.read();
11362 
11363  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11364  if (wf->execMask(lane)) {
11365  vcc.setBit(lane, !(src0[lane] <= src1[lane]) ? 1 : 0);
11366  }
11367  }
11368 
11369  vcc.write();
11370  wf->execMask() = vcc.rawData();
11371  }
11372 
11374  : Inst_VOPC(iFmt, "v_cmpx_neq_f32")
11375  {
11376  setFlag(ALU);
11377  setFlag(F32);
11378  } // Inst_VOPC__V_CMPX_NEQ_F32
11379 
11381  {
11382  } // ~Inst_VOPC__V_CMPX_NEQ_F32
11383 
11384  // EXEC,D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
11385  void
11387  {
11388  Wavefront *wf = gpuDynInst->wavefront();
11389  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11390  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11391  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11392 
11393  src0.readSrc();
11394  src1.read();
11395 
11396  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11397  if (wf->execMask(lane)) {
11398  vcc.setBit(lane, !(src0[lane] == src1[lane]) ? 1 : 0);
11399  }
11400  }
11401 
11402  vcc.write();
11403  }
11404 
11406  : Inst_VOPC(iFmt, "v_cmpx_nlt_f32")
11407  {
11408  setFlag(ALU);
11409  setFlag(F32);
11410  } // Inst_VOPC__V_CMPX_NLT_F32
11411 
11413  {
11414  } // ~Inst_VOPC__V_CMPX_NLT_F32
11415 
11416  // EXEC,D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
11417  void
11419  {
11420  Wavefront *wf = gpuDynInst->wavefront();
11421  ConstVecOperandF32 src0(gpuDynInst, instData.SRC0);
11422  ConstVecOperandF32 src1(gpuDynInst, instData.VSRC1);
11423  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11424 
11425  src0.readSrc();
11426  src1.read();
11427 
11428  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11429  if (wf->execMask(lane)) {
11430  vcc.setBit(lane, !(src0[lane] < src1[lane]) ? 1 : 0);
11431  }
11432  }
11433 
11434  vcc.write();
11435  wf->execMask() = vcc.rawData();
11436  }
11437 
11439  : Inst_VOPC(iFmt, "v_cmpx_tru_f32")
11440  {
11441  setFlag(ALU);
11442  setFlag(F32);
11443  } // Inst_VOPC__V_CMPX_TRU_F32
11444 
11446  {
11447  } // ~Inst_VOPC__V_CMPX_TRU_F32
11448 
11449  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
11450  void
11452  {
11453  Wavefront *wf = gpuDynInst->wavefront();
11454  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11455 
11456  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11457  if (wf->execMask(lane)) {
11458  vcc.setBit(lane, 1);
11459  }
11460  }
11461 
11462  vcc.write();
11463  wf->execMask() = vcc.rawData();
11464  }
11465 
11467  : Inst_VOPC(iFmt, "v_cmp_f_f64")
11468  {
11469  setFlag(ALU);
11470  setFlag(F64);
11471  } // Inst_VOPC__V_CMP_F_F64
11472 
11474  {
11475  } // ~Inst_VOPC__V_CMP_F_F64
11476 
11477  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
11478  void
11480  {
11481  Wavefront *wf = gpuDynInst->wavefront();
11482  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11483 
11484  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11485  if (wf->execMask(lane)) {
11486  vcc.setBit(lane, 0);
11487  }
11488  }
11489 
11490  vcc.write();
11491  }
11492 
11494  : Inst_VOPC(iFmt, "v_cmp_lt_f64")
11495  {
11496  setFlag(ALU);
11497  setFlag(F64);
11498  } // Inst_VOPC__V_CMP_LT_F64
11499 
11501  {
11502  } // ~Inst_VOPC__V_CMP_LT_F64
11503 
11504  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
11505  void
11507  {
11508  Wavefront *wf = gpuDynInst->wavefront();
11509  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11510  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11511  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11512 
11513  src0.readSrc();
11514  src1.read();
11515 
11516  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11517  if (wf->execMask(lane)) {
11518  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
11519  }
11520  }
11521 
11522  vcc.write();
11523  }
11524 
11526  : Inst_VOPC(iFmt, "v_cmp_eq_f64")
11527  {
11528  setFlag(ALU);
11529  setFlag(F64);
11530  } // Inst_VOPC__V_CMP_EQ_F64
11531 
11533  {
11534  } // ~Inst_VOPC__V_CMP_EQ_F64
11535 
11536  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
11537  void
11539  {
11540  Wavefront *wf = gpuDynInst->wavefront();
11541  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11542  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11543  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11544 
11545  src0.readSrc();
11546  src1.read();
11547 
11548  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11549  if (wf->execMask(lane)) {
11550  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
11551  }
11552  }
11553 
11554  vcc.write();
11555  }
11556 
11558  : Inst_VOPC(iFmt, "v_cmp_le_f64")
11559  {
11560  setFlag(ALU);
11561  setFlag(F64);
11562  } // Inst_VOPC__V_CMP_LE_F64
11563 
11565  {
11566  } // ~Inst_VOPC__V_CMP_LE_F64
11567 
11568  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
11569  void
11571  {
11572  Wavefront *wf = gpuDynInst->wavefront();
11573  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11574  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11575  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11576 
11577  src0.readSrc();
11578  src1.read();
11579 
11580  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11581  if (wf->execMask(lane)) {
11582  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
11583  }
11584  }
11585 
11586  vcc.write();
11587  }
11588 
11590  : Inst_VOPC(iFmt, "v_cmp_gt_f64")
11591  {
11592  setFlag(ALU);
11593  setFlag(F64);
11594  } // Inst_VOPC__V_CMP_GT_F64
11595 
11597  {
11598  } // ~Inst_VOPC__V_CMP_GT_F64
11599 
11600  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
11601  void
11603  {
11604  Wavefront *wf = gpuDynInst->wavefront();
11605  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11606  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11607  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11608 
11609  src0.readSrc();
11610  src1.read();
11611 
11612  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11613  if (wf->execMask(lane)) {
11614  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
11615  }
11616  }
11617 
11618  vcc.write();
11619  }
11620 
11622  : Inst_VOPC(iFmt, "v_cmp_lg_f64")
11623  {
11624  setFlag(ALU);
11625  setFlag(F64);
11626  } // Inst_VOPC__V_CMP_LG_F64
11627 
11629  {
11630  } // ~Inst_VOPC__V_CMP_LG_F64
11631 
11632  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
11633  void
11635  {
11636  Wavefront *wf = gpuDynInst->wavefront();
11637  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11638  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11639  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11640 
11641  src0.readSrc();
11642  src1.read();
11643 
11644  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11645  if (wf->execMask(lane)) {
11646  vcc.setBit(lane, (src0[lane] < src1[lane]
11647  || src0[lane] > src1[lane]) ? 1 : 0);
11648  }
11649  }
11650 
11651  vcc.write();
11652  }
11653 
11655  : Inst_VOPC(iFmt, "v_cmp_ge_f64")
11656  {
11657  setFlag(ALU);
11658  setFlag(F64);
11659  } // Inst_VOPC__V_CMP_GE_F64
11660 
11662  {
11663  } // ~Inst_VOPC__V_CMP_GE_F64
11664 
11665  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
11666  void
11668  {
11669  Wavefront *wf = gpuDynInst->wavefront();
11670  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11671  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11672  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11673 
11674  src0.readSrc();
11675  src1.read();
11676 
11677  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11678  if (wf->execMask(lane)) {
11679  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
11680  }
11681  }
11682 
11683  vcc.write();
11684  }
11685 
11687  : Inst_VOPC(iFmt, "v_cmp_o_f64")
11688  {
11689  setFlag(ALU);
11690  setFlag(F64);
11691  } // Inst_VOPC__V_CMP_O_F64
11692 
11694  {
11695  } // ~Inst_VOPC__V_CMP_O_F64
11696 
11697  // D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC encoding.
11698  void
11700  {
11701  Wavefront *wf = gpuDynInst->wavefront();
11702  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11703  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11704  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11705 
11706  src0.readSrc();
11707  src1.read();
11708 
11709  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11710  if (wf->execMask(lane)) {
11711  vcc.setBit(lane, (!std::isnan(src0[lane])
11712  && !std::isnan(src1[lane])) ? 1 : 0);
11713  }
11714  }
11715 
11716  vcc.write();
11717  }
11718 
11720  : Inst_VOPC(iFmt, "v_cmp_u_f64")
11721  {
11722  setFlag(ALU);
11723  setFlag(F64);
11724  } // Inst_VOPC__V_CMP_U_F64
11725 
11727  {
11728  } // ~Inst_VOPC__V_CMP_U_F64
11729 
11730  // D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC encoding.
11731  void
11733  {
11734  Wavefront *wf = gpuDynInst->wavefront();
11735  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11736  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11737  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11738 
11739  src0.readSrc();
11740  src1.read();
11741 
11742  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11743  if (wf->execMask(lane)) {
11744  vcc.setBit(lane, (std::isnan(src0[lane])
11745  || std::isnan(src1[lane])) ? 1 : 0);
11746  }
11747  }
11748 
11749  vcc.write();
11750  }
11751 
11753  : Inst_VOPC(iFmt, "v_cmp_nge_f64")
11754  {
11755  setFlag(ALU);
11756  setFlag(F64);
11757  } // Inst_VOPC__V_CMP_NGE_F64
11758 
11760  {
11761  } // ~Inst_VOPC__V_CMP_NGE_F64
11762 
11763  // D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
11764  void
11766  {
11767  Wavefront *wf = gpuDynInst->wavefront();
11768  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11769  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11770  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11771 
11772  src0.readSrc();
11773  src1.read();
11774 
11775  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11776  if (wf->execMask(lane)) {
11777  vcc.setBit(lane, !(src0[lane] >= src1[lane]) ? 1 : 0);
11778  }
11779  }
11780 
11781  vcc.write();
11782  }
11783 
11785  : Inst_VOPC(iFmt, "v_cmp_nlg_f64")
11786  {
11787  setFlag(ALU);
11788  setFlag(F64);
11789  } // Inst_VOPC__V_CMP_NLG_F64
11790 
11792  {
11793  } // ~Inst_VOPC__V_CMP_NLG_F64
11794 
11795  // D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
11796  void
11798  {
11799  Wavefront *wf = gpuDynInst->wavefront();
11800  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11801  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11802  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11803 
11804  src0.readSrc();
11805  src1.read();
11806 
11807  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11808  if (wf->execMask(lane)) {
11809  vcc.setBit(lane, !(src0[lane] < src1[lane]
11810  || src0[lane] > src1[lane]) ? 1 : 0);
11811  }
11812  }
11813 
11814  vcc.write();
11815  }
11816 
11818  : Inst_VOPC(iFmt, "v_cmp_ngt_f64")
11819  {
11820  setFlag(ALU);
11821  setFlag(F64);
11822  } // Inst_VOPC__V_CMP_NGT_F64
11823 
11825  {
11826  } // ~Inst_VOPC__V_CMP_NGT_F64
11827 
11828  // D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
11829  void
11831  {
11832  Wavefront *wf = gpuDynInst->wavefront();
11833  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11834  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11835  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11836 
11837  src0.readSrc();
11838  src1.read();
11839 
11840  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11841  if (wf->execMask(lane)) {
11842  vcc.setBit(lane, !(src0[lane] > src1[lane]) ? 1 : 0);
11843  }
11844  }
11845 
11846  vcc.write();
11847  }
11848 
11850  : Inst_VOPC(iFmt, "v_cmp_nle_f64")
11851  {
11852  setFlag(ALU);
11853  setFlag(F64);
11854  } // Inst_VOPC__V_CMP_NLE_F64
11855 
11857  {
11858  } // ~Inst_VOPC__V_CMP_NLE_F64
11859 
11860  // D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
11861  void
11863  {
11864  Wavefront *wf = gpuDynInst->wavefront();
11865  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11866  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11867  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11868 
11869  src0.readSrc();
11870  src1.read();
11871 
11872  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11873  if (wf->execMask(lane)) {
11874  vcc.setBit(lane, !(src0[lane] <= src1[lane]) ? 1 : 0);
11875  }
11876  }
11877 
11878  vcc.write();
11879  }
11880 
11882  : Inst_VOPC(iFmt, "v_cmp_neq_f64")
11883  {
11884  setFlag(ALU);
11885  setFlag(F64);
11886  } // Inst_VOPC__V_CMP_NEQ_F64
11887 
11889  {
11890  } // ~Inst_VOPC__V_CMP_NEQ_F64
11891 
11892  // D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
11893  void
11895  {
11896  Wavefront *wf = gpuDynInst->wavefront();
11897  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11898  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11899  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11900 
11901  src0.readSrc();
11902  src1.read();
11903 
11904  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11905  if (wf->execMask(lane)) {
11906  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
11907  }
11908  }
11909 
11910  vcc.write();
11911  }
11912 
11914  : Inst_VOPC(iFmt, "v_cmp_nlt_f64")
11915  {
11916  setFlag(ALU);
11917  setFlag(F64);
11918  } // Inst_VOPC__V_CMP_NLT_F64
11919 
11921  {
11922  } // ~Inst_VOPC__V_CMP_NLT_F64
11923 
11924  // D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
11925  void
11927  {
11928  Wavefront *wf = gpuDynInst->wavefront();
11929  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
11930  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
11931  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11932 
11933  src0.readSrc();
11934  src1.read();
11935 
11936  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11937  if (wf->execMask(lane)) {
11938  vcc.setBit(lane, !(src0[lane] < src1[lane]) ? 1 : 0);
11939  }
11940  }
11941 
11942  vcc.write();
11943  }
11944 
11946  : Inst_VOPC(iFmt, "v_cmp_tru_f64")
11947  {
11948  setFlag(ALU);
11949  setFlag(F64);
11950  } // Inst_VOPC__V_CMP_TRU_F64
11951 
11953  {
11954  } // ~Inst_VOPC__V_CMP_TRU_F64
11955 
11956  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
11957  void
11959  {
11960  Wavefront *wf = gpuDynInst->wavefront();
11961  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11962 
11963  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11964  if (wf->execMask(lane)) {
11965  vcc.setBit(lane, 1);
11966  }
11967  }
11968 
11969  vcc.write();
11970  }
11971 
11973  : Inst_VOPC(iFmt, "v_cmpx_f_f64")
11974  {
11975  setFlag(ALU);
11976  setFlag(F64);
11977  } // Inst_VOPC__V_CMPX_F_F64
11978 
11980  {
11981  } // ~Inst_VOPC__V_CMPX_F_F64
11982 
11983  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
11984  void
11986  {
11987  Wavefront *wf = gpuDynInst->wavefront();
11988  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
11989 
11990  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
11991  if (wf->execMask(lane)) {
11992  vcc.setBit(lane, 0);
11993  }
11994  }
11995 
11996  vcc.write();
11997  wf->execMask() = vcc.rawData();
11998  }
11999 
12001  : Inst_VOPC(iFmt, "v_cmpx_lt_f64")
12002  {
12003  setFlag(ALU);
12004  setFlag(F64);
12005  } // Inst_VOPC__V_CMPX_LT_F64
12006 
12008  {
12009  } // ~Inst_VOPC__V_CMPX_LT_F64
12010 
12011  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
12012  void
12014  {
12015  Wavefront *wf = gpuDynInst->wavefront();
12016  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12017  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12018  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12019 
12020  src0.readSrc();
12021  src1.read();
12022 
12023  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12024  if (wf->execMask(lane)) {
12025  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
12026  }
12027  }
12028 
12029  vcc.write();
12030  wf->execMask() = vcc.rawData();
12031  }
12032 
12034  : Inst_VOPC(iFmt, "v_cmpx_eq_f64")
12035  {
12036  setFlag(ALU);
12037  setFlag(F64);
12038  } // Inst_VOPC__V_CMPX_EQ_F64
12039 
12041  {
12042  } // ~Inst_VOPC__V_CMPX_EQ_F64
12043 
12044  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
12045  void
12047  {
12048  Wavefront *wf = gpuDynInst->wavefront();
12049  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12050  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12051  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12052 
12053  src0.readSrc();
12054  src1.read();
12055 
12056  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12057  if (wf->execMask(lane)) {
12058  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
12059  }
12060  }
12061 
12062  vcc.write();
12063  wf->execMask() = vcc.rawData();
12064  }
12065 
12067  : Inst_VOPC(iFmt, "v_cmpx_le_f64")
12068  {
12069  setFlag(ALU);
12070  setFlag(F64);
12071  } // Inst_VOPC__V_CMPX_LE_F64
12072 
12074  {
12075  } // ~Inst_VOPC__V_CMPX_LE_F64
12076 
12077  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
12078  void
12080  {
12081  Wavefront *wf = gpuDynInst->wavefront();
12082  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12083  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12084  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12085 
12086  src0.readSrc();
12087  src1.read();
12088 
12089  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12090  if (wf->execMask(lane)) {
12091  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
12092  }
12093  }
12094 
12095  wf->execMask() = vcc.rawData();
12096  vcc.write();
12097  }
12098 
12100  : Inst_VOPC(iFmt, "v_cmpx_gt_f64")
12101  {
12102  setFlag(ALU);
12103  setFlag(F64);
12104  } // Inst_VOPC__V_CMPX_GT_F64
12105 
12107  {
12108  } // ~Inst_VOPC__V_CMPX_GT_F64
12109 
12110  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
12111  void
12113  {
12114  Wavefront *wf = gpuDynInst->wavefront();
12115  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12116  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12117  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12118 
12119  src0.readSrc();
12120  src1.read();
12121 
12122  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12123  if (wf->execMask(lane)) {
12124  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
12125  }
12126  }
12127 
12128  wf->execMask() = vcc.rawData();
12129  vcc.write();
12130  }
12131 
12133  : Inst_VOPC(iFmt, "v_cmpx_lg_f64")
12134  {
12135  setFlag(ALU);
12136  setFlag(F64);
12137  } // Inst_VOPC__V_CMPX_LG_F64
12138 
12140  {
12141  } // ~Inst_VOPC__V_CMPX_LG_F64
12142 
12143  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
12144  void
12146  {
12147  Wavefront *wf = gpuDynInst->wavefront();
12148  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12149  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12150  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12151 
12152  src0.readSrc();
12153  src1.read();
12154 
12155  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12156  if (wf->execMask(lane)) {
12157  vcc.setBit(lane, (src0[lane] < src1[lane]
12158  || src0[lane] > src1[lane]) ? 1 : 0);
12159  }
12160  }
12161 
12162  wf->execMask() = vcc.rawData();
12163  vcc.write();
12164  }
12165 
12167  : Inst_VOPC(iFmt, "v_cmpx_ge_f64")
12168  {
12169  setFlag(ALU);
12170  setFlag(F64);
12171  } // Inst_VOPC__V_CMPX_GE_F64
12172 
12174  {
12175  } // ~Inst_VOPC__V_CMPX_GE_F64
12176 
12177  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
12178  void
12180  {
12181  Wavefront *wf = gpuDynInst->wavefront();
12182  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12183  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12184  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12185 
12186  src0.readSrc();
12187  src1.read();
12188 
12189  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12190  if (wf->execMask(lane)) {
12191  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
12192  }
12193  }
12194 
12195  wf->execMask() = vcc.rawData();
12196  vcc.write();
12197  }
12198 
12200  : Inst_VOPC(iFmt, "v_cmpx_o_f64")
12201  {
12202  setFlag(ALU);
12203  setFlag(F64);
12204  } // Inst_VOPC__V_CMPX_O_F64
12205 
12207  {
12208  } // ~Inst_VOPC__V_CMPX_O_F64
12209 
12210  // EXEC,D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC
12211  // encoding.
12212  void
12214  {
12215  Wavefront *wf = gpuDynInst->wavefront();
12216  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12217  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12218  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12219 
12220  src0.readSrc();
12221  src1.read();
12222 
12223  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12224  if (wf->execMask(lane)) {
12225  vcc.setBit(lane, (!std::isnan(src0[lane])
12226  && !std::isnan(src1[lane])) ? 1 : 0);
12227  }
12228  }
12229 
12230  wf->execMask() = vcc.rawData();
12231  vcc.write();
12232  }
12233 
12235  : Inst_VOPC(iFmt, "v_cmpx_u_f64")
12236  {
12237  setFlag(ALU);
12238  setFlag(F64);
12239  } // Inst_VOPC__V_CMPX_U_F64
12240 
12242  {
12243  } // ~Inst_VOPC__V_CMPX_U_F64
12244 
12245  // EXEC,D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC
12246  // encoding.
12247  void
12249  {
12250  Wavefront *wf = gpuDynInst->wavefront();
12251  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12252  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12253  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12254 
12255  src0.readSrc();
12256  src1.read();
12257 
12258  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12259  if (wf->execMask(lane)) {
12260  vcc.setBit(lane, (std::isnan(src0[lane])
12261  || std::isnan(src1[lane])) ? 1 : 0);
12262  }
12263  }
12264 
12265  wf->execMask() = vcc.rawData();
12266  vcc.write();
12267  }
12268 
12270  : Inst_VOPC(iFmt, "v_cmpx_nge_f64")
12271  {
12272  setFlag(ALU);
12273  setFlag(F64);
12274  } // Inst_VOPC__V_CMPX_NGE_F64
12275 
12277  {
12278  } // ~Inst_VOPC__V_CMPX_NGE_F64
12279 
12280  // EXEC,D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
12281  void
12283  {
12284  Wavefront *wf = gpuDynInst->wavefront();
12285  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12286  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12287  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12288 
12289  src0.readSrc();
12290  src1.read();
12291 
12292  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12293  if (wf->execMask(lane)) {
12294  vcc.setBit(lane, !(src0[lane] >= src1[lane]) ? 1 : 0);
12295  }
12296  }
12297 
12298  wf->execMask() = vcc.rawData();
12299  vcc.write();
12300  }
12301 
12303  : Inst_VOPC(iFmt, "v_cmpx_nlg_f64")
12304  {
12305  setFlag(ALU);
12306  setFlag(F64);
12307  } // Inst_VOPC__V_CMPX_NLG_F64
12308 
12310  {
12311  } // ~Inst_VOPC__V_CMPX_NLG_F64
12312 
12313  // EXEC,D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
12314  void
12316  {
12317  Wavefront *wf = gpuDynInst->wavefront();
12318  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12319  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12320  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12321 
12322  src0.readSrc();
12323  src1.read();
12324 
12325  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12326  if (wf->execMask(lane)) {
12327  vcc.setBit(lane, !(src0[lane] < src1[lane]
12328  || src0[lane] > src1[lane]) ? 1 : 0);
12329  }
12330  }
12331 
12332  wf->execMask() = vcc.rawData();
12333  vcc.write();
12334  }
12335 
12337  : Inst_VOPC(iFmt, "v_cmpx_ngt_f64")
12338  {
12339  setFlag(ALU);
12340  setFlag(F64);
12341  } // Inst_VOPC__V_CMPX_NGT_F64
12342 
12344  {
12345  } // ~Inst_VOPC__V_CMPX_NGT_F64
12346 
12347  // EXEC,D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
12348  void
12350  {
12351  Wavefront *wf = gpuDynInst->wavefront();
12352  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12353  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12354  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12355 
12356  src0.readSrc();
12357  src1.read();
12358 
12359  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12360  if (wf->execMask(lane)) {
12361  vcc.setBit(lane, !(src0[lane] > src1[lane]) ? 1 : 0);
12362  }
12363  }
12364 
12365  wf->execMask() = vcc.rawData();
12366  vcc.write();
12367  }
12368 
12370  : Inst_VOPC(iFmt, "v_cmpx_nle_f64")
12371  {
12372  setFlag(ALU);
12373  setFlag(F64);
12374  } // Inst_VOPC__V_CMPX_NLE_F64
12375 
12377  {
12378  } // ~Inst_VOPC__V_CMPX_NLE_F64
12379 
12380  // EXEC,D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
12381  void
12383  {
12384  Wavefront *wf = gpuDynInst->wavefront();
12385  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12386  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12387  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12388 
12389  src0.readSrc();
12390  src1.read();
12391 
12392  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12393  if (wf->execMask(lane)) {
12394  vcc.setBit(lane, !(src0[lane] <= src1[lane]) ? 1 : 0);
12395  }
12396  }
12397 
12398  wf->execMask() = vcc.rawData();
12399  vcc.write();
12400  }
12401 
12403  : Inst_VOPC(iFmt, "v_cmpx_neq_f64")
12404  {
12405  setFlag(ALU);
12406  setFlag(F64);
12407  } // Inst_VOPC__V_CMPX_NEQ_F64
12408 
12410  {
12411  } // ~Inst_VOPC__V_CMPX_NEQ_F64
12412 
12413  // EXEC,D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
12414  void
12416  {
12417  Wavefront *wf = gpuDynInst->wavefront();
12418  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12419  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12420  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12421 
12422  src0.readSrc();
12423  src1.read();
12424 
12425  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12426  if (wf->execMask(lane)) {
12427  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
12428  }
12429  }
12430 
12431  wf->execMask() = vcc.rawData();
12432  vcc.write();
12433  }
12434 
12436  : Inst_VOPC(iFmt, "v_cmpx_nlt_f64")
12437  {
12438  setFlag(ALU);
12439  setFlag(F64);
12440  } // Inst_VOPC__V_CMPX_NLT_F64
12441 
12443  {
12444  } // ~Inst_VOPC__V_CMPX_NLT_F64
12445 
12446  // EXEC,D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
12447  void
12449  {
12450  Wavefront *wf = gpuDynInst->wavefront();
12451  ConstVecOperandF64 src0(gpuDynInst, instData.SRC0);
12452  ConstVecOperandF64 src1(gpuDynInst, instData.VSRC1);
12453  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12454 
12455  src0.readSrc();
12456  src1.read();
12457 
12458  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12459  if (wf->execMask(lane)) {
12460  vcc.setBit(lane, !(src0[lane] < src1[lane]) ? 1 : 0);
12461  }
12462  }
12463 
12464  wf->execMask() = vcc.rawData();
12465  vcc.write();
12466  }
12467 
12469  : Inst_VOPC(iFmt, "v_cmpx_tru_f64")
12470  {
12471  setFlag(ALU);
12472  setFlag(F64);
12473  } // Inst_VOPC__V_CMPX_TRU_F64
12474 
12476  {
12477  } // ~Inst_VOPC__V_CMPX_TRU_F64
12478 
12479  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
12480  void
12482  {
12483  Wavefront *wf = gpuDynInst->wavefront();
12484  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12485 
12486  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12487  if (wf->execMask(lane)) {
12488  vcc.setBit(lane, 1);
12489  }
12490  }
12491 
12492  wf->execMask() = vcc.rawData();
12493  vcc.write();
12494  }
12495 
12497  : Inst_VOPC(iFmt, "v_cmp_f_i16")
12498  {
12499  setFlag(ALU);
12500  } // Inst_VOPC__V_CMP_F_I16
12501 
12503  {
12504  } // ~Inst_VOPC__V_CMP_F_I16
12505 
12506  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
12507  void
12509  {
12510  Wavefront *wf = gpuDynInst->wavefront();
12511  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12512 
12513  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12514  if (wf->execMask(lane)) {
12515  vcc.setBit(lane, 0);
12516  }
12517  }
12518 
12519  vcc.write();
12520  }
12521 
12523  : Inst_VOPC(iFmt, "v_cmp_lt_i16")
12524  {
12525  setFlag(ALU);
12526  } // Inst_VOPC__V_CMP_LT_I16
12527 
12529  {
12530  } // ~Inst_VOPC__V_CMP_LT_I16
12531 
12532  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
12533  void
12535  {
12536  Wavefront *wf = gpuDynInst->wavefront();
12537  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
12538  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
12539  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12540 
12541  src0.readSrc();
12542  src1.read();
12543 
12544  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12545  if (wf->execMask(lane)) {
12546  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
12547  }
12548  }
12549 
12550  vcc.write();
12551  }
12552 
12554  : Inst_VOPC(iFmt, "v_cmp_eq_i16")
12555  {
12556  setFlag(ALU);
12557  } // Inst_VOPC__V_CMP_EQ_I16
12558 
12560  {
12561  } // ~Inst_VOPC__V_CMP_EQ_I16
12562 
12563  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
12564  void
12566  {
12567  Wavefront *wf = gpuDynInst->wavefront();
12568  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
12569  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
12570  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12571 
12572  src0.readSrc();
12573  src1.read();
12574 
12575  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12576  if (wf->execMask(lane)) {
12577  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
12578  }
12579  }
12580 
12581  vcc.write();
12582  }
12583 
12585  : Inst_VOPC(iFmt, "v_cmp_le_i16")
12586  {
12587  setFlag(ALU);
12588  } // Inst_VOPC__V_CMP_LE_I16
12589 
12591  {
12592  } // ~Inst_VOPC__V_CMP_LE_I16
12593 
12594  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
12595  void
12597  {
12598  Wavefront *wf = gpuDynInst->wavefront();
12599  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
12600  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
12601  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12602 
12603  src0.readSrc();
12604  src1.read();
12605 
12606  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12607  if (wf->execMask(lane)) {
12608  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
12609  }
12610  }
12611 
12612  vcc.write();
12613  }
12614 
12616  : Inst_VOPC(iFmt, "v_cmp_gt_i16")
12617  {
12618  setFlag(ALU);
12619  } // Inst_VOPC__V_CMP_GT_I16
12620 
12622  {
12623  } // ~Inst_VOPC__V_CMP_GT_I16
12624 
12625  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
12626  void
12628  {
12629  Wavefront *wf = gpuDynInst->wavefront();
12630  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
12631  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
12632  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12633 
12634  src0.readSrc();
12635  src1.read();
12636 
12637  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12638  if (wf->execMask(lane)) {
12639  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
12640  }
12641  }
12642 
12643  vcc.write();
12644  }
12645 
12647  : Inst_VOPC(iFmt, "v_cmp_ne_i16")
12648  {
12649  setFlag(ALU);
12650  } // Inst_VOPC__V_CMP_NE_I16
12651 
12653  {
12654  } // ~Inst_VOPC__V_CMP_NE_I16
12655 
12656  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
12657  void
12659  {
12660  Wavefront *wf = gpuDynInst->wavefront();
12661  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
12662  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
12663  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12664 
12665  src0.readSrc();
12666  src1.read();
12667 
12668  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12669  if (wf->execMask(lane)) {
12670  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
12671  }
12672  }
12673 
12674  vcc.write();
12675  }
12676 
12678  : Inst_VOPC(iFmt, "v_cmp_ge_i16")
12679  {
12680  setFlag(ALU);
12681  } // Inst_VOPC__V_CMP_GE_I16
12682 
12684  {
12685  } // ~Inst_VOPC__V_CMP_GE_I16
12686 
12687  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
12688  void
12690  {
12691  Wavefront *wf = gpuDynInst->wavefront();
12692  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
12693  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
12694  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12695 
12696  src0.readSrc();
12697  src1.read();
12698 
12699  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12700  if (wf->execMask(lane)) {
12701  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
12702  }
12703  }
12704 
12705  vcc.write();
12706  }
12707 
12709  : Inst_VOPC(iFmt, "v_cmp_t_i16")
12710  {
12711  setFlag(ALU);
12712  } // Inst_VOPC__V_CMP_T_I16
12713 
12715  {
12716  } // ~Inst_VOPC__V_CMP_T_I16
12717 
12718  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
12719  void
12721  {
12722  Wavefront *wf = gpuDynInst->wavefront();
12723  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12724 
12725  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12726  if (wf->execMask(lane)) {
12727  vcc.setBit(lane, 1);
12728  }
12729  }
12730 
12731  vcc.write();
12732  }
12733 
12735  : Inst_VOPC(iFmt, "v_cmp_f_u16")
12736  {
12737  setFlag(ALU);
12738  } // Inst_VOPC__V_CMP_F_U16
12739 
12741  {
12742  } // ~Inst_VOPC__V_CMP_F_U16
12743 
12744  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
12745  void
12747  {
12748  Wavefront *wf = gpuDynInst->wavefront();
12749  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12750 
12751  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12752  if (wf->execMask(lane)) {
12753  vcc.setBit(lane, 0);
12754  }
12755  }
12756 
12757  vcc.write();
12758  }
12759 
12761  : Inst_VOPC(iFmt, "v_cmp_lt_u16")
12762  {
12763  setFlag(ALU);
12764  } // Inst_VOPC__V_CMP_LT_U16
12765 
12767  {
12768  } // ~Inst_VOPC__V_CMP_LT_U16
12769 
12770  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
12771  void
12773  {
12774  Wavefront *wf = gpuDynInst->wavefront();
12775  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
12776  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
12777  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12778 
12779  src0.readSrc();
12780  src1.read();
12781 
12782  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12783  if (wf->execMask(lane)) {
12784  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
12785  }
12786  }
12787 
12788  vcc.write();
12789  }
12790 
12792  : Inst_VOPC(iFmt, "v_cmp_eq_u16")
12793  {
12794  setFlag(ALU);
12795  } // Inst_VOPC__V_CMP_EQ_U16
12796 
12798  {
12799  } // ~Inst_VOPC__V_CMP_EQ_U16
12800 
12801  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
12802  void
12804  {
12805  Wavefront *wf = gpuDynInst->wavefront();
12806  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
12807  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
12808  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12809 
12810  src0.readSrc();
12811  src1.read();
12812 
12813  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12814  if (wf->execMask(lane)) {
12815  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
12816  }
12817  }
12818 
12819  vcc.write();
12820  }
12821 
12823  : Inst_VOPC(iFmt, "v_cmp_le_u16")
12824  {
12825  setFlag(ALU);
12826  } // Inst_VOPC__V_CMP_LE_U16
12827 
12829  {
12830  } // ~Inst_VOPC__V_CMP_LE_U16
12831 
12832  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
12833  void
12835  {
12836  Wavefront *wf = gpuDynInst->wavefront();
12837  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
12838  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
12839  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12840 
12841  src0.readSrc();
12842  src1.read();
12843 
12844  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12845  if (wf->execMask(lane)) {
12846  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
12847  }
12848  }
12849 
12850  vcc.write();
12851  }
12852 
12854  : Inst_VOPC(iFmt, "v_cmp_gt_u16")
12855  {
12856  setFlag(ALU);
12857  } // Inst_VOPC__V_CMP_GT_U16
12858 
12860  {
12861  } // ~Inst_VOPC__V_CMP_GT_U16
12862 
12863  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
12864  void
12866  {
12867  Wavefront *wf = gpuDynInst->wavefront();
12868  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
12869  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
12870  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12871 
12872  src0.readSrc();
12873  src1.read();
12874 
12875  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12876  if (wf->execMask(lane)) {
12877  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
12878  }
12879  }
12880 
12881  vcc.write();
12882  }
12883 
12885  : Inst_VOPC(iFmt, "v_cmp_ne_u16")
12886  {
12887  setFlag(ALU);
12888  } // Inst_VOPC__V_CMP_NE_U16
12889 
12891  {
12892  } // ~Inst_VOPC__V_CMP_NE_U16
12893 
12894  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
12895  void
12897  {
12898  Wavefront *wf = gpuDynInst->wavefront();
12899  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
12900  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
12901  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12902 
12903  src0.readSrc();
12904  src1.read();
12905 
12906  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12907  if (wf->execMask(lane)) {
12908  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
12909  }
12910  }
12911 
12912  vcc.write();
12913  }
12914 
12916  : Inst_VOPC(iFmt, "v_cmp_ge_u16")
12917  {
12918  setFlag(ALU);
12919  } // Inst_VOPC__V_CMP_GE_U16
12920 
12922  {
12923  } // ~Inst_VOPC__V_CMP_GE_U16
12924 
12925  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
12926  void
12928  {
12929  Wavefront *wf = gpuDynInst->wavefront();
12930  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
12931  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
12932  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12933 
12934  src0.readSrc();
12935  src1.read();
12936 
12937  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12938  if (wf->execMask(lane)) {
12939  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
12940  }
12941  }
12942 
12943  vcc.write();
12944  }
12945 
12947  : Inst_VOPC(iFmt, "v_cmp_t_u16")
12948  {
12949  setFlag(ALU);
12950  } // Inst_VOPC__V_CMP_T_U16
12951 
12953  {
12954  } // ~Inst_VOPC__V_CMP_T_U16
12955 
12956  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
12957  void
12959  {
12960  Wavefront *wf = gpuDynInst->wavefront();
12961  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12962 
12963  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12964  if (wf->execMask(lane)) {
12965  vcc.setBit(lane, 1);
12966  }
12967  }
12968 
12969  vcc.write();
12970  }
12971 
12973  : Inst_VOPC(iFmt, "v_cmpx_f_i16")
12974  {
12975  setFlag(ALU);
12976  } // Inst_VOPC__V_CMPX_F_I16
12977 
12979  {
12980  } // ~Inst_VOPC__V_CMPX_F_I16
12981 
12982  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
12983  void
12985  {
12986  Wavefront *wf = gpuDynInst->wavefront();
12987  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
12988 
12989  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
12990  if (wf->execMask(lane)) {
12991  vcc.setBit(lane, 0);
12992  }
12993  }
12994 
12995  wf->execMask() = vcc.rawData();
12996  vcc.write();
12997  }
12998 
13000  : Inst_VOPC(iFmt, "v_cmpx_lt_i16")
13001  {
13002  setFlag(ALU);
13003  } // Inst_VOPC__V_CMPX_LT_I16
13004 
13006  {
13007  } // ~Inst_VOPC__V_CMPX_LT_I16
13008 
13009  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
13010  void
13012  {
13013  Wavefront *wf = gpuDynInst->wavefront();
13014  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
13015  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
13016  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13017 
13018  src0.readSrc();
13019  src1.read();
13020 
13021  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13022  if (wf->execMask(lane)) {
13023  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
13024  }
13025  }
13026 
13027  wf->execMask() = vcc.rawData();
13028  vcc.write();
13029  }
13030 
13032  : Inst_VOPC(iFmt, "v_cmpx_eq_i16")
13033  {
13034  setFlag(ALU);
13035  } // Inst_VOPC__V_CMPX_EQ_I16
13036 
13038  {
13039  } // ~Inst_VOPC__V_CMPX_EQ_I16
13040 
13041  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
13042  void
13044  {
13045  Wavefront *wf = gpuDynInst->wavefront();
13046  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
13047  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
13048  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13049 
13050  src0.readSrc();
13051  src1.read();
13052 
13053  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13054  if (wf->execMask(lane)) {
13055  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
13056  }
13057  }
13058 
13059  wf->execMask() = vcc.rawData();
13060  vcc.write();
13061  }
13062 
13064  : Inst_VOPC(iFmt, "v_cmpx_le_i16")
13065  {
13066  setFlag(ALU);
13067  } // Inst_VOPC__V_CMPX_LE_I16
13068 
13070  {
13071  } // ~Inst_VOPC__V_CMPX_LE_I16
13072 
13073  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
13074  void
13076  {
13077  Wavefront *wf = gpuDynInst->wavefront();
13078  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
13079  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
13080  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13081 
13082  src0.readSrc();
13083  src1.read();
13084 
13085  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13086  if (wf->execMask(lane)) {
13087  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
13088  }
13089  }
13090 
13091  wf->execMask() = vcc.rawData();
13092  vcc.write();
13093  }
13094 
13096  : Inst_VOPC(iFmt, "v_cmpx_gt_i16")
13097  {
13098  setFlag(ALU);
13099  } // Inst_VOPC__V_CMPX_GT_I16
13100 
13102  {
13103  } // ~Inst_VOPC__V_CMPX_GT_I16
13104 
13105  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
13106  void
13108  {
13109  Wavefront *wf = gpuDynInst->wavefront();
13110  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
13111  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
13112  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13113 
13114  src0.readSrc();
13115  src1.read();
13116 
13117  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13118  if (wf->execMask(lane)) {
13119  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
13120  }
13121  }
13122 
13123  wf->execMask() = vcc.rawData();
13124  vcc.write();
13125  }
13126 
13128  : Inst_VOPC(iFmt, "v_cmpx_ne_i16")
13129  {
13130  setFlag(ALU);
13131  } // Inst_VOPC__V_CMPX_NE_I16
13132 
13134  {
13135  } // ~Inst_VOPC__V_CMPX_NE_I16
13136 
13137  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
13138  void
13140  {
13141  Wavefront *wf = gpuDynInst->wavefront();
13142  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
13143  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
13144  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13145 
13146  src0.readSrc();
13147  src1.read();
13148 
13149  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13150  if (wf->execMask(lane)) {
13151  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
13152  }
13153  }
13154 
13155  wf->execMask() = vcc.rawData();
13156  vcc.write();
13157  }
13158 
13160  : Inst_VOPC(iFmt, "v_cmpx_ge_i16")
13161  {
13162  setFlag(ALU);
13163  } // Inst_VOPC__V_CMPX_GE_I16
13164 
13166  {
13167  } // ~Inst_VOPC__V_CMPX_GE_I16
13168 
13169  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
13170  void
13172  {
13173  Wavefront *wf = gpuDynInst->wavefront();
13174  ConstVecOperandI16 src0(gpuDynInst, instData.SRC0);
13175  ConstVecOperandI16 src1(gpuDynInst, instData.VSRC1);
13176  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13177 
13178  src0.readSrc();
13179  src1.read();
13180 
13181  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13182  if (wf->execMask(lane)) {
13183  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
13184  }
13185  }
13186 
13187  wf->execMask() = vcc.rawData();
13188  vcc.write();
13189  }
13190 
13192  : Inst_VOPC(iFmt, "v_cmpx_t_i16")
13193  {
13194  setFlag(ALU);
13195  } // Inst_VOPC__V_CMPX_T_I16
13196 
13198  {
13199  } // ~Inst_VOPC__V_CMPX_T_I16
13200 
13201  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
13202  void
13204  {
13205  Wavefront *wf = gpuDynInst->wavefront();
13206  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13207 
13208  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13209  if (wf->execMask(lane)) {
13210  vcc.setBit(lane, 1);
13211  }
13212  }
13213 
13214  wf->execMask() = vcc.rawData();
13215  vcc.write();
13216  }
13217 
13219  : Inst_VOPC(iFmt, "v_cmpx_f_u16")
13220  {
13221  setFlag(ALU);
13222  } // Inst_VOPC__V_CMPX_F_U16
13223 
13225  {
13226  } // ~Inst_VOPC__V_CMPX_F_U16
13227 
13228  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
13229  void
13231  {
13232  Wavefront *wf = gpuDynInst->wavefront();
13233  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13234 
13235  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13236  if (wf->execMask(lane)) {
13237  vcc.setBit(lane, 0);
13238  }
13239  }
13240 
13241  wf->execMask() = vcc.rawData();
13242  vcc.write();
13243  }
13244 
13246  : Inst_VOPC(iFmt, "v_cmpx_lt_u16")
13247  {
13248  setFlag(ALU);
13249  } // Inst_VOPC__V_CMPX_LT_U16
13250 
13252  {
13253  } // ~Inst_VOPC__V_CMPX_LT_U16
13254 
13255  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
13256  void
13258  {
13259  Wavefront *wf = gpuDynInst->wavefront();
13260  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
13261  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
13262  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13263 
13264  src0.readSrc();
13265  src1.read();
13266 
13267  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13268  if (wf->execMask(lane)) {
13269  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
13270  }
13271  }
13272 
13273  wf->execMask() = vcc.rawData();
13274  vcc.write();
13275  }
13276 
13278  : Inst_VOPC(iFmt, "v_cmpx_eq_u16")
13279  {
13280  setFlag(ALU);
13281  } // Inst_VOPC__V_CMPX_EQ_U16
13282 
13284  {
13285  } // ~Inst_VOPC__V_CMPX_EQ_U16
13286 
13287  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
13288  void
13290  {
13291  Wavefront *wf = gpuDynInst->wavefront();
13292  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
13293  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
13294  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13295 
13296  src0.readSrc();
13297  src1.read();
13298 
13299  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13300  if (wf->execMask(lane)) {
13301  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
13302  }
13303  }
13304 
13305  wf->execMask() = vcc.rawData();
13306  vcc.write();
13307  }
13308 
13310  : Inst_VOPC(iFmt, "v_cmpx_le_u16")
13311  {
13312  setFlag(ALU);
13313  } // Inst_VOPC__V_CMPX_LE_U16
13314 
13316  {
13317  } // ~Inst_VOPC__V_CMPX_LE_U16
13318 
13319  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
13320  void
13322  {
13323  Wavefront *wf = gpuDynInst->wavefront();
13324  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
13325  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
13326  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13327 
13328  src0.readSrc();
13329  src1.read();
13330 
13331  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13332  if (wf->execMask(lane)) {
13333  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
13334  }
13335  }
13336 
13337  wf->execMask() = vcc.rawData();
13338  vcc.write();
13339  }
13340 
13342  : Inst_VOPC(iFmt, "v_cmpx_gt_u16")
13343  {
13344  setFlag(ALU);
13345  } // Inst_VOPC__V_CMPX_GT_U16
13346 
13348  {
13349  } // ~Inst_VOPC__V_CMPX_GT_U16
13350 
13351  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
13352  void
13354  {
13355  Wavefront *wf = gpuDynInst->wavefront();
13356  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
13357  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
13358  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13359 
13360  src0.readSrc();
13361  src1.read();
13362 
13363  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13364  if (wf->execMask(lane)) {
13365  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
13366  }
13367  }
13368 
13369  wf->execMask() = vcc.rawData();
13370  vcc.write();
13371  }
13372 
13374  : Inst_VOPC(iFmt, "v_cmpx_ne_u16")
13375  {
13376  setFlag(ALU);
13377  } // Inst_VOPC__V_CMPX_NE_U16
13378 
13380  {
13381  } // ~Inst_VOPC__V_CMPX_NE_U16
13382 
13383  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
13384  void
13386  {
13387  Wavefront *wf = gpuDynInst->wavefront();
13388  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
13389  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
13390  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13391 
13392  src0.readSrc();
13393  src1.read();
13394 
13395  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13396  if (wf->execMask(lane)) {
13397  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
13398  }
13399  }
13400 
13401  wf->execMask() = vcc.rawData();
13402  vcc.write();
13403  }
13404 
13406  : Inst_VOPC(iFmt, "v_cmpx_ge_u16")
13407  {
13408  setFlag(ALU);
13409  } // Inst_VOPC__V_CMPX_GE_U16
13410 
13412  {
13413  } // ~Inst_VOPC__V_CMPX_GE_U16
13414 
13415  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
13416  void
13418  {
13419  Wavefront *wf = gpuDynInst->wavefront();
13420  ConstVecOperandU16 src0(gpuDynInst, instData.SRC0);
13421  ConstVecOperandU16 src1(gpuDynInst, instData.VSRC1);
13422  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13423 
13424  src0.readSrc();
13425  src1.read();
13426 
13427  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13428  if (wf->execMask(lane)) {
13429  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
13430  }
13431  }
13432 
13433  wf->execMask() = vcc.rawData();
13434  vcc.write();
13435  }
13436 
13438  : Inst_VOPC(iFmt, "v_cmpx_t_u16")
13439  {
13440  setFlag(ALU);
13441  } // Inst_VOPC__V_CMPX_T_U16
13442 
13444  {
13445  } // ~Inst_VOPC__V_CMPX_T_U16
13446 
13447  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
13448  void
13450  {
13451  Wavefront *wf = gpuDynInst->wavefront();
13452  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13453 
13454  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13455  if (wf->execMask(lane)) {
13456  vcc.setBit(lane, 1);
13457  }
13458  }
13459 
13460  wf->execMask() = vcc.rawData();
13461  vcc.write();
13462  }
13463 
13465  : Inst_VOPC(iFmt, "v_cmp_f_i32")
13466  {
13467  setFlag(ALU);
13468  } // Inst_VOPC__V_CMP_F_I32
13469 
13471  {
13472  } // ~Inst_VOPC__V_CMP_F_I32
13473 
13474  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
13475  void
13477  {
13478  Wavefront *wf = gpuDynInst->wavefront();
13479  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13480 
13481  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13482  if (wf->execMask(lane)) {
13483  vcc.setBit(lane, 0);
13484  }
13485  }
13486 
13487  vcc.write();
13488  }
13489 
13491  : Inst_VOPC(iFmt, "v_cmp_lt_i32")
13492  {
13493  setFlag(ALU);
13494  } // Inst_VOPC__V_CMP_LT_I32
13495 
13497  {
13498  } // ~Inst_VOPC__V_CMP_LT_I32
13499 
13500  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
13501  void
13503  {
13504  Wavefront *wf = gpuDynInst->wavefront();
13505  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
13506  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
13507  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13508 
13509  src0.readSrc();
13510  src1.read();
13511 
13512  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13513  if (wf->execMask(lane)) {
13514  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
13515  }
13516  }
13517 
13518  vcc.write();
13519  }
13520 
13522  : Inst_VOPC(iFmt, "v_cmp_eq_i32")
13523  {
13524  setFlag(ALU);
13525  } // Inst_VOPC__V_CMP_EQ_I32
13526 
13528  {
13529  } // ~Inst_VOPC__V_CMP_EQ_I32
13530 
13531  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
13532  void
13534  {
13535  Wavefront *wf = gpuDynInst->wavefront();
13536  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
13537  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
13538  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13539 
13540  src0.readSrc();
13541  src1.read();
13542 
13543  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13544  if (wf->execMask(lane)) {
13545  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
13546  }
13547  }
13548 
13549  vcc.write();
13550  }
13551 
13553  : Inst_VOPC(iFmt, "v_cmp_le_i32")
13554  {
13555  setFlag(ALU);
13556  } // Inst_VOPC__V_CMP_LE_I32
13557 
13559  {
13560  } // ~Inst_VOPC__V_CMP_LE_I32
13561 
13562  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
13563  void
13565  {
13566  Wavefront *wf = gpuDynInst->wavefront();
13567  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
13568  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
13569  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13570 
13571  src0.readSrc();
13572  src1.read();
13573 
13574  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13575  if (wf->execMask(lane)) {
13576  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
13577  }
13578  }
13579 
13580  vcc.write();
13581  }
13582 
13584  : Inst_VOPC(iFmt, "v_cmp_gt_i32")
13585  {
13586  setFlag(ALU);
13587  } // Inst_VOPC__V_CMP_GT_I32
13588 
13590  {
13591  } // ~Inst_VOPC__V_CMP_GT_I32
13592 
13593  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
13594  void
13596  {
13597  Wavefront *wf = gpuDynInst->wavefront();
13598  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
13599  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
13600  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13601 
13602  src0.readSrc();
13603  src1.read();
13604 
13605  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13606  if (wf->execMask(lane)) {
13607  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
13608  }
13609  }
13610 
13611  vcc.write();
13612  }
13613 
13615  : Inst_VOPC(iFmt, "v_cmp_ne_i32")
13616  {
13617  setFlag(ALU);
13618  } // Inst_VOPC__V_CMP_NE_I32
13619 
13621  {
13622  } // ~Inst_VOPC__V_CMP_NE_I32
13623 
13624  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
13625  void
13627  {
13628  Wavefront *wf = gpuDynInst->wavefront();
13629  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
13630  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
13631  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13632 
13633  src0.readSrc();
13634  src1.read();
13635 
13636  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13637  if (wf->execMask(lane)) {
13638  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
13639  }
13640  }
13641 
13642  vcc.write();
13643  }
13644 
13646  : Inst_VOPC(iFmt, "v_cmp_ge_i32")
13647  {
13648  setFlag(ALU);
13649  } // Inst_VOPC__V_CMP_GE_I32
13650 
13652  {
13653  } // ~Inst_VOPC__V_CMP_GE_I32
13654 
13655  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
13656  void
13658  {
13659  Wavefront *wf = gpuDynInst->wavefront();
13660  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
13661  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
13662  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13663 
13664  src0.readSrc();
13665  src1.read();
13666 
13667  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13668  if (wf->execMask(lane)) {
13669  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
13670  }
13671  }
13672 
13673  vcc.write();
13674  }
13675 
13677  : Inst_VOPC(iFmt, "v_cmp_t_i32")
13678  {
13679  setFlag(ALU);
13680  } // Inst_VOPC__V_CMP_T_I32
13681 
13683  {
13684  } // ~Inst_VOPC__V_CMP_T_I32
13685 
13686  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
13687  void
13689  {
13690  Wavefront *wf = gpuDynInst->wavefront();
13691  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13692 
13693  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13694  if (wf->execMask(lane)) {
13695  vcc.setBit(lane, 1);
13696  }
13697  }
13698 
13699  vcc.write();
13700  }
13701 
13703  : Inst_VOPC(iFmt, "v_cmp_f_u32")
13704  {
13705  setFlag(ALU);
13706  } // Inst_VOPC__V_CMP_F_U32
13707 
13709  {
13710  } // ~Inst_VOPC__V_CMP_F_U32
13711 
13712  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
13713  void
13715  {
13716  Wavefront *wf = gpuDynInst->wavefront();
13717  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13718 
13719  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13720  if (wf->execMask(lane)) {
13721  vcc.setBit(lane, 0);
13722  }
13723  }
13724 
13725  vcc.write();
13726  }
13727 
13729  : Inst_VOPC(iFmt, "v_cmp_lt_u32")
13730  {
13731  setFlag(ALU);
13732  } // Inst_VOPC__V_CMP_LT_U32
13733 
13735  {
13736  } // ~Inst_VOPC__V_CMP_LT_U32
13737 
13738  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
13739  void
13741  {
13742  Wavefront *wf = gpuDynInst->wavefront();
13743  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
13744  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
13745  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13746 
13747  src0.readSrc();
13748  src1.read();
13749 
13750  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13751  if (wf->execMask(lane)) {
13752  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
13753  }
13754  }
13755 
13756  vcc.write();
13757  }
13758 
13760  : Inst_VOPC(iFmt, "v_cmp_eq_u32")
13761  {
13762  setFlag(ALU);
13763  } // Inst_VOPC__V_CMP_EQ_U32
13764 
13766  {
13767  } // ~Inst_VOPC__V_CMP_EQ_U32
13768 
13769  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
13770  void
13772  {
13773  Wavefront *wf = gpuDynInst->wavefront();
13774  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
13775  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
13776  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13777 
13778  src0.readSrc();
13779  src1.read();
13780 
13781  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13782  if (wf->execMask(lane)) {
13783  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
13784  }
13785  }
13786 
13787  vcc.write();
13788  }
13789 
13791  : Inst_VOPC(iFmt, "v_cmp_le_u32")
13792  {
13793  setFlag(ALU);
13794  } // Inst_VOPC__V_CMP_LE_U32
13795 
13797  {
13798  } // ~Inst_VOPC__V_CMP_LE_U32
13799 
13800  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
13801  void
13803  {
13804  Wavefront *wf = gpuDynInst->wavefront();
13805  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
13806  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
13807  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13808 
13809  src0.readSrc();
13810  src1.read();
13811 
13812  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13813  if (wf->execMask(lane)) {
13814  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
13815  }
13816  }
13817 
13818  vcc.write();
13819  }
13820 
13822  : Inst_VOPC(iFmt, "v_cmp_gt_u32")
13823  {
13824  setFlag(ALU);
13825  } // Inst_VOPC__V_CMP_GT_U32
13826 
13828  {
13829  } // ~Inst_VOPC__V_CMP_GT_U32
13830 
13831  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
13832  void
13834  {
13835  Wavefront *wf = gpuDynInst->wavefront();
13836  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
13837  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
13838  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13839 
13840  src0.readSrc();
13841  src1.read();
13842 
13843  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13844  if (wf->execMask(lane)) {
13845  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
13846  }
13847  }
13848 
13849  vcc.write();
13850  }
13851 
13853  : Inst_VOPC(iFmt, "v_cmp_ne_u32")
13854  {
13855  setFlag(ALU);
13856  } // Inst_VOPC__V_CMP_NE_U32
13857 
13859  {
13860  } // ~Inst_VOPC__V_CMP_NE_U32
13861 
13862  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
13863  void
13865  {
13866  Wavefront *wf = gpuDynInst->wavefront();
13867  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
13868  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
13869  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13870 
13871  src0.readSrc();
13872  src1.read();
13873 
13874  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13875  if (wf->execMask(lane)) {
13876  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
13877  }
13878  }
13879 
13880  vcc.write();
13881  }
13882 
13884  : Inst_VOPC(iFmt, "v_cmp_ge_u32")
13885  {
13886  setFlag(ALU);
13887  } // Inst_VOPC__V_CMP_GE_U32
13888 
13890  {
13891  } // ~Inst_VOPC__V_CMP_GE_U32
13892 
13893  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
13894  void
13896  {
13897  Wavefront *wf = gpuDynInst->wavefront();
13898  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
13899  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
13900  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13901 
13902  src0.readSrc();
13903  src1.read();
13904 
13905  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13906  if (wf->execMask(lane)) {
13907  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
13908  }
13909  }
13910 
13911  vcc.write();
13912  }
13913 
13915  : Inst_VOPC(iFmt, "v_cmp_t_u32")
13916  {
13917  setFlag(ALU);
13918  } // Inst_VOPC__V_CMP_T_U32
13919 
13921  {
13922  } // ~Inst_VOPC__V_CMP_T_U32
13923 
13924  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
13925  void
13927  {
13928  Wavefront *wf = gpuDynInst->wavefront();
13929  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13930 
13931  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13932  if (wf->execMask(lane)) {
13933  vcc.setBit(lane, 1);
13934  }
13935  }
13936 
13937  vcc.write();
13938  }
13939 
13941  : Inst_VOPC(iFmt, "v_cmpx_f_i32")
13942  {
13943  setFlag(ALU);
13944  } // Inst_VOPC__V_CMPX_F_I32
13945 
13947  {
13948  } // ~Inst_VOPC__V_CMPX_F_I32
13949 
13950  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
13951  void
13953  {
13954  Wavefront *wf = gpuDynInst->wavefront();
13955  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13956 
13957  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13958  if (wf->execMask(lane)) {
13959  vcc.setBit(lane, 0);
13960  }
13961  }
13962 
13963  wf->execMask() = vcc.rawData();
13964  vcc.write();
13965  }
13966 
13968  : Inst_VOPC(iFmt, "v_cmpx_lt_i32")
13969  {
13970  setFlag(ALU);
13971  } // Inst_VOPC__V_CMPX_LT_I32
13972 
13974  {
13975  } // ~Inst_VOPC__V_CMPX_LT_I32
13976 
13977  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
13978  void
13980  {
13981  Wavefront *wf = gpuDynInst->wavefront();
13982  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
13983  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
13984  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
13985 
13986  src0.readSrc();
13987  src1.read();
13988 
13989  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
13990  if (wf->execMask(lane)) {
13991  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
13992  }
13993  }
13994 
13995  wf->execMask() = vcc.rawData();
13996  vcc.write();
13997  }
13998 
14000  : Inst_VOPC(iFmt, "v_cmpx_eq_i32")
14001  {
14002  setFlag(ALU);
14003  } // Inst_VOPC__V_CMPX_EQ_I32
14004 
14006  {
14007  } // ~Inst_VOPC__V_CMPX_EQ_I32
14008 
14009  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
14010  void
14012  {
14013  Wavefront *wf = gpuDynInst->wavefront();
14014  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
14015  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
14016  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14017 
14018  src0.readSrc();
14019  src1.read();
14020 
14021  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14022  if (wf->execMask(lane)) {
14023  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
14024  }
14025  }
14026 
14027  wf->execMask() = vcc.rawData();
14028  vcc.write();
14029  }
14030 
14032  : Inst_VOPC(iFmt, "v_cmpx_le_i32")
14033  {
14034  setFlag(ALU);
14035  } // Inst_VOPC__V_CMPX_LE_I32
14036 
14038  {
14039  } // ~Inst_VOPC__V_CMPX_LE_I32
14040 
14041  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
14042  void
14044  {
14045  Wavefront *wf = gpuDynInst->wavefront();
14046  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
14047  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
14048  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14049 
14050  src0.readSrc();
14051  src1.read();
14052 
14053  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14054  if (wf->execMask(lane)) {
14055  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
14056  }
14057  }
14058 
14059  wf->execMask() = vcc.rawData();
14060  vcc.write();
14061  }
14062 
14064  : Inst_VOPC(iFmt, "v_cmpx_gt_i32")
14065  {
14066  setFlag(ALU);
14067  } // Inst_VOPC__V_CMPX_GT_I32
14068 
14070  {
14071  } // ~Inst_VOPC__V_CMPX_GT_I32
14072 
14073  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
14074  void
14076  {
14077  Wavefront *wf = gpuDynInst->wavefront();
14078  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
14079  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
14080  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14081 
14082  src0.readSrc();
14083  src1.read();
14084 
14085  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14086  if (wf->execMask(lane)) {
14087  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
14088  }
14089  }
14090 
14091  wf->execMask() = vcc.rawData();
14092  vcc.write();
14093  }
14094 
14096  : Inst_VOPC(iFmt, "v_cmpx_ne_i32")
14097  {
14098  setFlag(ALU);
14099  } // Inst_VOPC__V_CMPX_NE_I32
14100 
14102  {
14103  } // ~Inst_VOPC__V_CMPX_NE_I32
14104 
14105  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
14106  void
14108  {
14109  Wavefront *wf = gpuDynInst->wavefront();
14110  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
14111  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
14112  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14113 
14114  src0.readSrc();
14115  src1.read();
14116 
14117  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14118  if (wf->execMask(lane)) {
14119  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
14120  }
14121  }
14122 
14123  wf->execMask() = vcc.rawData();
14124  vcc.write();
14125  }
14126 
14128  : Inst_VOPC(iFmt, "v_cmpx_ge_i32")
14129  {
14130  setFlag(ALU);
14131  } // Inst_VOPC__V_CMPX_GE_I32
14132 
14134  {
14135  } // ~Inst_VOPC__V_CMPX_GE_I32
14136 
14137  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
14138  void
14140  {
14141  Wavefront *wf = gpuDynInst->wavefront();
14142  ConstVecOperandI32 src0(gpuDynInst, instData.SRC0);
14143  ConstVecOperandI32 src1(gpuDynInst, instData.VSRC1);
14144  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14145 
14146  src0.readSrc();
14147  src1.read();
14148 
14149  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14150  if (wf->execMask(lane)) {
14151  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
14152  }
14153  }
14154 
14155  wf->execMask() = vcc.rawData();
14156  vcc.write();
14157  }
14158 
14160  : Inst_VOPC(iFmt, "v_cmpx_t_i32")
14161  {
14162  setFlag(ALU);
14163  } // Inst_VOPC__V_CMPX_T_I32
14164 
14166  {
14167  } // ~Inst_VOPC__V_CMPX_T_I32
14168 
14169  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
14170  void
14172  {
14173  Wavefront *wf = gpuDynInst->wavefront();
14174  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14175 
14176  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14177  if (wf->execMask(lane)) {
14178  vcc.setBit(lane, 1);
14179  }
14180  }
14181 
14182  wf->execMask() = vcc.rawData();
14183  vcc.write();
14184  }
14185 
14187  : Inst_VOPC(iFmt, "v_cmpx_f_u32")
14188  {
14189  setFlag(ALU);
14190  } // Inst_VOPC__V_CMPX_F_U32
14191 
14193  {
14194  } // ~Inst_VOPC__V_CMPX_F_U32
14195 
14196  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
14197  void
14199  {
14200  Wavefront *wf = gpuDynInst->wavefront();
14201  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14202 
14203  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14204  if (wf->execMask(lane)) {
14205  vcc.setBit(lane, 0);
14206  }
14207  }
14208 
14209  wf->execMask() = vcc.rawData();
14210  vcc.write();
14211  }
14212 
14214  : Inst_VOPC(iFmt, "v_cmpx_lt_u32")
14215  {
14216  setFlag(ALU);
14217  } // Inst_VOPC__V_CMPX_LT_U32
14218 
14220  {
14221  } // ~Inst_VOPC__V_CMPX_LT_U32
14222 
14223  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
14224  void
14226  {
14227  Wavefront *wf = gpuDynInst->wavefront();
14228  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
14229  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
14230  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14231 
14232  src0.readSrc();
14233  src1.read();
14234 
14235  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14236  if (wf->execMask(lane)) {
14237  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
14238  }
14239  }
14240 
14241  wf->execMask() = vcc.rawData();
14242  vcc.write();
14243  }
14244 
14246  : Inst_VOPC(iFmt, "v_cmpx_eq_u32")
14247  {
14248  setFlag(ALU);
14249  } // Inst_VOPC__V_CMPX_EQ_U32
14250 
14252  {
14253  } // ~Inst_VOPC__V_CMPX_EQ_U32
14254 
14255  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
14256  void
14258  {
14259  Wavefront *wf = gpuDynInst->wavefront();
14260  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
14261  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
14262  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14263 
14264  src0.readSrc();
14265  src1.read();
14266 
14267  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14268  if (wf->execMask(lane)) {
14269  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
14270  }
14271  }
14272 
14273  wf->execMask() = vcc.rawData();
14274  vcc.write();
14275  }
14276 
14278  : Inst_VOPC(iFmt, "v_cmpx_le_u32")
14279  {
14280  setFlag(ALU);
14281  } // Inst_VOPC__V_CMPX_LE_U32
14282 
14284  {
14285  } // ~Inst_VOPC__V_CMPX_LE_U32
14286 
14287  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
14288  void
14290  {
14291  Wavefront *wf = gpuDynInst->wavefront();
14292  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
14293  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
14294  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14295 
14296  src0.readSrc();
14297  src1.read();
14298 
14299  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14300  if (wf->execMask(lane)) {
14301  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
14302  }
14303  }
14304 
14305  wf->execMask() = vcc.rawData();
14306  vcc.write();
14307  }
14308 
14310  : Inst_VOPC(iFmt, "v_cmpx_gt_u32")
14311  {
14312  setFlag(ALU);
14313  } // Inst_VOPC__V_CMPX_GT_U32
14314 
14316  {
14317  } // ~Inst_VOPC__V_CMPX_GT_U32
14318 
14319  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
14320  void
14322  {
14323  Wavefront *wf = gpuDynInst->wavefront();
14324  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
14325  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
14326  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14327 
14328  src0.readSrc();
14329  src1.read();
14330 
14331  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14332  if (wf->execMask(lane)) {
14333  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
14334  }
14335  }
14336 
14337  wf->execMask() = vcc.rawData();
14338  vcc.write();
14339  }
14340 
14342  : Inst_VOPC(iFmt, "v_cmpx_ne_u32")
14343  {
14344  setFlag(ALU);
14345  } // Inst_VOPC__V_CMPX_NE_U32
14346 
14348  {
14349  } // ~Inst_VOPC__V_CMPX_NE_U32
14350 
14351  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
14352  void
14354  {
14355  Wavefront *wf = gpuDynInst->wavefront();
14356  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
14357  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
14358  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14359 
14360  src0.readSrc();
14361  src1.read();
14362 
14363  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14364  if (wf->execMask(lane)) {
14365  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
14366  }
14367  }
14368 
14369  wf->execMask() = vcc.rawData();
14370  vcc.write();
14371  }
14372 
14374  : Inst_VOPC(iFmt, "v_cmpx_ge_u32")
14375  {
14376  setFlag(ALU);
14377  } // Inst_VOPC__V_CMPX_GE_U32
14378 
14380  {
14381  } // ~Inst_VOPC__V_CMPX_GE_U32
14382 
14383  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
14384  void
14386  {
14387  Wavefront *wf = gpuDynInst->wavefront();
14388  ConstVecOperandU32 src0(gpuDynInst, instData.SRC0);
14389  ConstVecOperandU32 src1(gpuDynInst, instData.VSRC1);
14390  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14391 
14392  src0.readSrc();
14393  src1.read();
14394 
14395  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14396  if (wf->execMask(lane)) {
14397  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
14398  }
14399  }
14400 
14401  wf->execMask() = vcc.rawData();
14402  vcc.write();
14403  }
14404 
14406  : Inst_VOPC(iFmt, "v_cmpx_t_u32")
14407  {
14408  setFlag(ALU);
14409  } // Inst_VOPC__V_CMPX_T_U32
14410 
14412  {
14413  } // ~Inst_VOPC__V_CMPX_T_U32
14414 
14415  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
14416  void
14418  {
14419  Wavefront *wf = gpuDynInst->wavefront();
14420  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14421 
14422  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14423  if (wf->execMask(lane)) {
14424  vcc.setBit(lane, 1);
14425  }
14426  }
14427 
14428  wf->execMask() = vcc.rawData();
14429  vcc.write();
14430  }
14431 
14433  : Inst_VOPC(iFmt, "v_cmp_f_i64")
14434  {
14435  setFlag(ALU);
14436  } // Inst_VOPC__V_CMP_F_I64
14437 
14439  {
14440  } // ~Inst_VOPC__V_CMP_F_I64
14441 
14442  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
14443  void
14445  {
14446  Wavefront *wf = gpuDynInst->wavefront();
14447  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14448 
14449  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14450  if (wf->execMask(lane)) {
14451  vcc.setBit(lane, 0);
14452  }
14453  }
14454 
14455  vcc.write();
14456  }
14457 
14459  : Inst_VOPC(iFmt, "v_cmp_lt_i64")
14460  {
14461  setFlag(ALU);
14462  } // Inst_VOPC__V_CMP_LT_I64
14463 
14465  {
14466  } // ~Inst_VOPC__V_CMP_LT_I64
14467 
14468  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
14469  void
14471  {
14472  Wavefront *wf = gpuDynInst->wavefront();
14473  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
14474  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
14475  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14476 
14477  src0.readSrc();
14478  src1.read();
14479 
14480  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14481  if (wf->execMask(lane)) {
14482  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
14483  }
14484  }
14485 
14486  vcc.write();
14487  }
14488 
14490  : Inst_VOPC(iFmt, "v_cmp_eq_i64")
14491  {
14492  setFlag(ALU);
14493  } // Inst_VOPC__V_CMP_EQ_I64
14494 
14496  {
14497  } // ~Inst_VOPC__V_CMP_EQ_I64
14498 
14499  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
14500  void
14502  {
14503  Wavefront *wf = gpuDynInst->wavefront();
14504  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
14505  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
14506  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14507 
14508  src0.readSrc();
14509  src1.read();
14510 
14511  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14512  if (wf->execMask(lane)) {
14513  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
14514  }
14515  }
14516 
14517  vcc.write();
14518  }
14519 
14521  : Inst_VOPC(iFmt, "v_cmp_le_i64")
14522  {
14523  setFlag(ALU);
14524  } // Inst_VOPC__V_CMP_LE_I64
14525 
14527  {
14528  } // ~Inst_VOPC__V_CMP_LE_I64
14529 
14530  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
14531  void
14533  {
14534  Wavefront *wf = gpuDynInst->wavefront();
14535  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
14536  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
14537  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14538 
14539  src0.readSrc();
14540  src1.read();
14541 
14542  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14543  if (wf->execMask(lane)) {
14544  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
14545  }
14546  }
14547 
14548  vcc.write();
14549  }
14550 
14552  : Inst_VOPC(iFmt, "v_cmp_gt_i64")
14553  {
14554  setFlag(ALU);
14555  } // Inst_VOPC__V_CMP_GT_I64
14556 
14558  {
14559  } // ~Inst_VOPC__V_CMP_GT_I64
14560 
14561  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
14562  void
14564  {
14565  Wavefront *wf = gpuDynInst->wavefront();
14566  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
14567  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
14568  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14569 
14570  src0.readSrc();
14571  src1.read();
14572 
14573  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14574  if (wf->execMask(lane)) {
14575  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
14576  }
14577  }
14578 
14579  vcc.write();
14580  }
14581 
14583  : Inst_VOPC(iFmt, "v_cmp_ne_i64")
14584  {
14585  setFlag(ALU);
14586  } // Inst_VOPC__V_CMP_NE_I64
14587 
14589  {
14590  } // ~Inst_VOPC__V_CMP_NE_I64
14591 
14592  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
14593  void
14595  {
14596  Wavefront *wf = gpuDynInst->wavefront();
14597  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
14598  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
14599  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14600 
14601  src0.readSrc();
14602  src1.read();
14603 
14604  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14605  if (wf->execMask(lane)) {
14606  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
14607  }
14608  }
14609 
14610  vcc.write();
14611  }
14612 
14614  : Inst_VOPC(iFmt, "v_cmp_ge_i64")
14615  {
14616  setFlag(ALU);
14617  } // Inst_VOPC__V_CMP_GE_I64
14618 
14620  {
14621  } // ~Inst_VOPC__V_CMP_GE_I64
14622 
14623  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
14624  void
14626  {
14627  Wavefront *wf = gpuDynInst->wavefront();
14628  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
14629  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
14630  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14631 
14632  src0.readSrc();
14633  src1.read();
14634 
14635  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14636  if (wf->execMask(lane)) {
14637  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
14638  }
14639  }
14640 
14641  vcc.write();
14642  }
14643 
14645  : Inst_VOPC(iFmt, "v_cmp_t_i64")
14646  {
14647  setFlag(ALU);
14648  } // Inst_VOPC__V_CMP_T_I64
14649 
14651  {
14652  } // ~Inst_VOPC__V_CMP_T_I64
14653 
14654  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
14655  void
14657  {
14658  Wavefront *wf = gpuDynInst->wavefront();
14659  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14660 
14661  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14662  if (wf->execMask(lane)) {
14663  vcc.setBit(lane, 1);
14664  }
14665  }
14666 
14667  vcc.write();
14668  }
14669 
14671  : Inst_VOPC(iFmt, "v_cmp_f_u64")
14672  {
14673  setFlag(ALU);
14674  } // Inst_VOPC__V_CMP_F_U64
14675 
14677  {
14678  } // ~Inst_VOPC__V_CMP_F_U64
14679 
14680  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
14681  void
14683  {
14684  Wavefront *wf = gpuDynInst->wavefront();
14685  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14686 
14687  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14688  if (wf->execMask(lane)) {
14689  vcc.setBit(lane, 0);
14690  }
14691  }
14692 
14693  vcc.write();
14694  }
14695 
14697  : Inst_VOPC(iFmt, "v_cmp_lt_u64")
14698  {
14699  setFlag(ALU);
14700  } // Inst_VOPC__V_CMP_LT_U64
14701 
14703  {
14704  } // ~Inst_VOPC__V_CMP_LT_U64
14705 
14706  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
14707  void
14709  {
14710  Wavefront *wf = gpuDynInst->wavefront();
14711  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
14712  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
14713  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14714 
14715  src0.readSrc();
14716  src1.read();
14717 
14718  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14719  if (wf->execMask(lane)) {
14720  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
14721  }
14722  }
14723 
14724  vcc.write();
14725  }
14726 
14728  : Inst_VOPC(iFmt, "v_cmp_eq_u64")
14729  {
14730  setFlag(ALU);
14731  } // Inst_VOPC__V_CMP_EQ_U64
14732 
14734  {
14735  } // ~Inst_VOPC__V_CMP_EQ_U64
14736 
14737  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
14738  void
14740  {
14741  Wavefront *wf = gpuDynInst->wavefront();
14742  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
14743  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
14744  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14745 
14746  src0.readSrc();
14747  src1.read();
14748 
14749  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14750  if (wf->execMask(lane)) {
14751  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
14752  }
14753  }
14754 
14755  vcc.write();
14756  }
14757 
14759  : Inst_VOPC(iFmt, "v_cmp_le_u64")
14760  {
14761  setFlag(ALU);
14762  } // Inst_VOPC__V_CMP_LE_U64
14763 
14765  {
14766  } // ~Inst_VOPC__V_CMP_LE_U64
14767 
14768  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
14769  void
14771  {
14772  Wavefront *wf = gpuDynInst->wavefront();
14773  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
14774  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
14775  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14776 
14777  src0.readSrc();
14778  src1.read();
14779 
14780  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14781  if (wf->execMask(lane)) {
14782  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
14783  }
14784  }
14785 
14786  vcc.write();
14787  }
14788 
14790  : Inst_VOPC(iFmt, "v_cmp_gt_u64")
14791  {
14792  setFlag(ALU);
14793  } // Inst_VOPC__V_CMP_GT_U64
14794 
14796  {
14797  } // ~Inst_VOPC__V_CMP_GT_U64
14798 
14799  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
14800  void
14802  {
14803  Wavefront *wf = gpuDynInst->wavefront();
14804  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
14805  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
14806  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14807 
14808  src0.readSrc();
14809  src1.read();
14810 
14811  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14812  if (wf->execMask(lane)) {
14813  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
14814  }
14815  }
14816 
14817  vcc.write();
14818  }
14819 
14821  : Inst_VOPC(iFmt, "v_cmp_ne_u64")
14822  {
14823  setFlag(ALU);
14824  } // Inst_VOPC__V_CMP_NE_U64
14825 
14827  {
14828  } // ~Inst_VOPC__V_CMP_NE_U64
14829 
14830  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
14831  void
14833  {
14834  Wavefront *wf = gpuDynInst->wavefront();
14835  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
14836  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
14837  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14838 
14839  src0.readSrc();
14840  src1.read();
14841 
14842  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14843  if (wf->execMask(lane)) {
14844  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
14845  }
14846  }
14847 
14848  vcc.write();
14849  }
14850 
14852  : Inst_VOPC(iFmt, "v_cmp_ge_u64")
14853  {
14854  setFlag(ALU);
14855  } // Inst_VOPC__V_CMP_GE_U64
14856 
14858  {
14859  } // ~Inst_VOPC__V_CMP_GE_U64
14860 
14861  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
14862  void
14864  {
14865  Wavefront *wf = gpuDynInst->wavefront();
14866  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
14867  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
14868  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14869 
14870  src0.readSrc();
14871  src1.read();
14872 
14873  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14874  if (wf->execMask(lane)) {
14875  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
14876  }
14877  }
14878 
14879  vcc.write();
14880  }
14881 
14883  : Inst_VOPC(iFmt, "v_cmp_t_u64")
14884  {
14885  setFlag(ALU);
14886  } // Inst_VOPC__V_CMP_T_U64
14887 
14889  {
14890  } // ~Inst_VOPC__V_CMP_T_U64
14891 
14892  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
14893  void
14895  {
14896  Wavefront *wf = gpuDynInst->wavefront();
14897  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14898 
14899  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14900  if (wf->execMask(lane)) {
14901  vcc.setBit(lane, 1);
14902  }
14903  }
14904 
14905  vcc.write();
14906  }
14907 
14909  : Inst_VOPC(iFmt, "v_cmpx_f_i64")
14910  {
14911  setFlag(ALU);
14912  } // Inst_VOPC__V_CMPX_F_I64
14913 
14915  {
14916  } // ~Inst_VOPC__V_CMPX_F_I64
14917 
14918  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
14919  void
14921  {
14922  Wavefront *wf = gpuDynInst->wavefront();
14923  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14924 
14925  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14926  if (wf->execMask(lane)) {
14927  vcc.setBit(lane, 0);
14928  }
14929  }
14930 
14931  wf->execMask() = vcc.rawData();
14932  vcc.write();
14933  }
14934 
14936  : Inst_VOPC(iFmt, "v_cmpx_lt_i64")
14937  {
14938  setFlag(ALU);
14939  } // Inst_VOPC__V_CMPX_LT_I64
14940 
14942  {
14943  } // ~Inst_VOPC__V_CMPX_LT_I64
14944 
14945  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
14946  void
14948  {
14949  Wavefront *wf = gpuDynInst->wavefront();
14950  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
14951  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
14952  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14953 
14954  src0.readSrc();
14955  src1.read();
14956 
14957  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14958  if (wf->execMask(lane)) {
14959  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
14960  }
14961  }
14962 
14963  wf->execMask() = vcc.rawData();
14964  vcc.write();
14965  }
14966 
14968  : Inst_VOPC(iFmt, "v_cmpx_eq_i64")
14969  {
14970  setFlag(ALU);
14971  } // Inst_VOPC__V_CMPX_EQ_I64
14972 
14974  {
14975  } // ~Inst_VOPC__V_CMPX_EQ_I64
14976 
14977  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
14978  void
14980  {
14981  Wavefront *wf = gpuDynInst->wavefront();
14982  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
14983  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
14984  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
14985 
14986  src0.readSrc();
14987  src1.read();
14988 
14989  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
14990  if (wf->execMask(lane)) {
14991  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
14992  }
14993  }
14994 
14995  wf->execMask() = vcc.rawData();
14996  vcc.write();
14997  }
14998 
15000  : Inst_VOPC(iFmt, "v_cmpx_le_i64")
15001  {
15002  setFlag(ALU);
15003  } // Inst_VOPC__V_CMPX_LE_I64
15004 
15006  {
15007  } // ~Inst_VOPC__V_CMPX_LE_I64
15008 
15009  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
15010  void
15012  {
15013  Wavefront *wf = gpuDynInst->wavefront();
15014  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
15015  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
15016  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15017 
15018  src0.readSrc();
15019  src1.read();
15020 
15021  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15022  if (wf->execMask(lane)) {
15023  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
15024  }
15025  }
15026 
15027  wf->execMask() = vcc.rawData();
15028  vcc.write();
15029  }
15030 
15032  : Inst_VOPC(iFmt, "v_cmpx_gt_i64")
15033  {
15034  setFlag(ALU);
15035  } // Inst_VOPC__V_CMPX_GT_I64
15036 
15038  {
15039  } // ~Inst_VOPC__V_CMPX_GT_I64
15040 
15041  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
15042  void
15044  {
15045  Wavefront *wf = gpuDynInst->wavefront();
15046  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
15047  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
15048  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15049 
15050  src0.readSrc();
15051  src1.read();
15052 
15053  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15054  if (wf->execMask(lane)) {
15055  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
15056  }
15057  }
15058 
15059  wf->execMask() = vcc.rawData();
15060  vcc.write();
15061  }
15062 
15064  : Inst_VOPC(iFmt, "v_cmpx_ne_i64")
15065  {
15066  setFlag(ALU);
15067  } // Inst_VOPC__V_CMPX_NE_I64
15068 
15070  {
15071  } // ~Inst_VOPC__V_CMPX_NE_I64
15072 
15073  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
15074  void
15076  {
15077  Wavefront *wf = gpuDynInst->wavefront();
15078  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
15079  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
15080  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15081 
15082  src0.readSrc();
15083  src1.read();
15084 
15085  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15086  if (wf->execMask(lane)) {
15087  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
15088  }
15089  }
15090 
15091  wf->execMask() = vcc.rawData();
15092  vcc.write();
15093  }
15094 
15096  : Inst_VOPC(iFmt, "v_cmpx_ge_i64")
15097  {
15098  setFlag(ALU);
15099  } // Inst_VOPC__V_CMPX_GE_I64
15100 
15102  {
15103  } // ~Inst_VOPC__V_CMPX_GE_I64
15104 
15105  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
15106  void
15108  {
15109  Wavefront *wf = gpuDynInst->wavefront();
15110  ConstVecOperandI64 src0(gpuDynInst, instData.SRC0);
15111  ConstVecOperandI64 src1(gpuDynInst, instData.VSRC1);
15112  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15113 
15114  src0.readSrc();
15115  src1.read();
15116 
15117  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15118  if (wf->execMask(lane)) {
15119  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
15120  }
15121  }
15122 
15123  wf->execMask() = vcc.rawData();
15124  vcc.write();
15125  }
15126 
15128  : Inst_VOPC(iFmt, "v_cmpx_t_i64")
15129  {
15130  setFlag(ALU);
15131  } // Inst_VOPC__V_CMPX_T_I64
15132 
15134  {
15135  } // ~Inst_VOPC__V_CMPX_T_I64
15136 
15137  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
15138  void
15140  {
15141  Wavefront *wf = gpuDynInst->wavefront();
15142  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15143 
15144  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15145  if (wf->execMask(lane)) {
15146  vcc.setBit(lane, 1);
15147  }
15148  }
15149 
15150  wf->execMask() = vcc.rawData();
15151  vcc.write();
15152  }
15153 
15155  : Inst_VOPC(iFmt, "v_cmpx_f_u64")
15156  {
15157  setFlag(ALU);
15158  } // Inst_VOPC__V_CMPX_F_U64
15159 
15161  {
15162  } // ~Inst_VOPC__V_CMPX_F_U64
15163 
15164  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
15165  void
15167  {
15168  Wavefront *wf = gpuDynInst->wavefront();
15169  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15170 
15171  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15172  if (wf->execMask(lane)) {
15173  vcc.setBit(lane, 0);
15174  }
15175  }
15176 
15177  wf->execMask() = vcc.rawData();
15178  vcc.write();
15179  }
15180 
15182  : Inst_VOPC(iFmt, "v_cmpx_lt_u64")
15183  {
15184  setFlag(ALU);
15185  } // Inst_VOPC__V_CMPX_LT_U64
15186 
15188  {
15189  } // ~Inst_VOPC__V_CMPX_LT_U64
15190 
15191  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
15192  void
15194  {
15195  Wavefront *wf = gpuDynInst->wavefront();
15196  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
15197  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
15198  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15199 
15200  src0.readSrc();
15201  src1.read();
15202 
15203  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15204  if (wf->execMask(lane)) {
15205  vcc.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
15206  }
15207  }
15208 
15209  wf->execMask() = vcc.rawData();
15210  vcc.write();
15211  }
15212 
15214  : Inst_VOPC(iFmt, "v_cmpx_eq_u64")
15215  {
15216  setFlag(ALU);
15217  } // Inst_VOPC__V_CMPX_EQ_U64
15218 
15220  {
15221  } // ~Inst_VOPC__V_CMPX_EQ_U64
15222 
15223  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
15224  void
15226  {
15227  Wavefront *wf = gpuDynInst->wavefront();
15228  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
15229  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
15230  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15231 
15232  src0.readSrc();
15233  src1.read();
15234 
15235  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15236  if (wf->execMask(lane)) {
15237  vcc.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
15238  }
15239  }
15240 
15241  wf->execMask() = vcc.rawData();
15242  vcc.write();
15243  }
15244 
15246  : Inst_VOPC(iFmt, "v_cmpx_le_u64")
15247  {
15248  setFlag(ALU);
15249  } // Inst_VOPC__V_CMPX_LE_U64
15250 
15252  {
15253  } // ~Inst_VOPC__V_CMPX_LE_U64
15254 
15255  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
15256  void
15258  {
15259  Wavefront *wf = gpuDynInst->wavefront();
15260  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
15261  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
15262  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15263 
15264  src0.readSrc();
15265  src1.read();
15266 
15267  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15268  if (wf->execMask(lane)) {
15269  vcc.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
15270  }
15271  }
15272 
15273  wf->execMask() = vcc.rawData();
15274  vcc.write();
15275  }
15276 
15278  : Inst_VOPC(iFmt, "v_cmpx_gt_u64")
15279  {
15280  setFlag(ALU);
15281  } // Inst_VOPC__V_CMPX_GT_U64
15282 
15284  {
15285  } // ~Inst_VOPC__V_CMPX_GT_U64
15286 
15287  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
15288  void
15290  {
15291  Wavefront *wf = gpuDynInst->wavefront();
15292  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
15293  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
15294  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15295 
15296  src0.readSrc();
15297  src1.read();
15298 
15299  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15300  if (wf->execMask(lane)) {
15301  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
15302  }
15303  }
15304 
15305  wf->execMask() = vcc.rawData();
15306  vcc.write();
15307  }
15308 
15310  : Inst_VOPC(iFmt, "v_cmpx_ne_u64")
15311  {
15312  setFlag(ALU);
15313  } // Inst_VOPC__V_CMPX_NE_U64
15314 
15316  {
15317  } // ~Inst_VOPC__V_CMPX_NE_U64
15318 
15319  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
15320  void
15322  {
15323  Wavefront *wf = gpuDynInst->wavefront();
15324  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
15325  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
15326  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15327 
15328  src0.readSrc();
15329  src1.read();
15330 
15331  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15332  if (wf->execMask(lane)) {
15333  vcc.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
15334  }
15335  }
15336 
15337  wf->execMask() = vcc.rawData();
15338  vcc.write();
15339  }
15340 
15342  : Inst_VOPC(iFmt, "v_cmpx_ge_u64")
15343  {
15344  setFlag(ALU);
15345  } // Inst_VOPC__V_CMPX_GE_U64
15346 
15348  {
15349  } // ~Inst_VOPC__V_CMPX_GE_U64
15350 
15351  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
15352  void
15354  {
15355  Wavefront *wf = gpuDynInst->wavefront();
15356  ConstVecOperandU64 src0(gpuDynInst, instData.SRC0);
15357  ConstVecOperandU64 src1(gpuDynInst, instData.VSRC1);
15358  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15359 
15360  src0.readSrc();
15361  src1.read();
15362 
15363  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15364  if (wf->execMask(lane)) {
15365  vcc.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
15366  }
15367  }
15368 
15369  wf->execMask() = vcc.rawData();
15370  vcc.write();
15371  }
15372 
15374  : Inst_VOPC(iFmt, "v_cmpx_t_u64")
15375  {
15376  setFlag(ALU);
15377  } // Inst_VOPC__V_CMPX_T_U64
15378 
15380  {
15381  } // ~Inst_VOPC__V_CMPX_T_U64
15382 
15383  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
15384  void
15386  {
15387  Wavefront *wf = gpuDynInst->wavefront();
15388  ScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
15389 
15390  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15391  if (wf->execMask(lane)) {
15392  vcc.setBit(lane, 1);
15393  }
15394  }
15395 
15396  wf->execMask() = vcc.rawData();
15397  vcc.write();
15398  }
15399 
15401  InFmt_VINTRP *iFmt)
15402  : Inst_VINTRP(iFmt, "v_interp_p1_f32")
15403  {
15404  setFlag(ALU);
15405  setFlag(F32);
15406  } // Inst_VINTRP__V_INTERP_P1_F32
15407 
15409  {
15410  } // ~Inst_VINTRP__V_INTERP_P1_F32
15411 
15412  // D.f = P10 * S.f + P0; parameter interpolation
15413  void
15415  {
15417  }
15418 
15420  InFmt_VINTRP *iFmt)
15421  : Inst_VINTRP(iFmt, "v_interp_p2_f32")
15422  {
15423  setFlag(ALU);
15424  setFlag(F32);
15425  } // Inst_VINTRP__V_INTERP_P2_F32
15426 
15428  {
15429  } // ~Inst_VINTRP__V_INTERP_P2_F32
15430 
15431  // D.f = P20 * S.f + D.f; parameter interpolation
15432  void
15434  {
15436  }
15437 
15439  InFmt_VINTRP *iFmt)
15440  : Inst_VINTRP(iFmt, "v_interp_mov_f32")
15441  {
15442  setFlag(ALU);
15443  setFlag(F32);
15444  } // Inst_VINTRP__V_INTERP_MOV_F32
15445 
15447  {
15448  } // ~Inst_VINTRP__V_INTERP_MOV_F32
15449 
15450  void
15452  {
15454  }
15455 
15457  InFmt_VOP3 *iFmt)
15458  : Inst_VOP3(iFmt, "v_cmp_class_f32", true)
15459  {
15460  setFlag(ALU);
15461  setFlag(F32);
15462  } // Inst_VOP3__V_CMP_CLASS_F32
15463 
15465  {
15466  } // ~Inst_VOP3__V_CMP_CLASS_F32
15467 
15468  // VCC = IEEE numeric class function specified in S1.u, performed on S0.f
15469  // The function reports true if the floating point value is any of the
15470  // numeric types selected in S1.u according to the following list:
15471  // S1.u[0] -- value is a signaling NaN.
15472  // S1.u[1] -- value is a quiet NaN.
15473  // S1.u[2] -- value is negative infinity.
15474  // S1.u[3] -- value is a negative normal value.
15475  // S1.u[4] -- value is a negative denormal value.
15476  // S1.u[5] -- value is negative zero.
15477  // S1.u[6] -- value is positive zero.
15478  // S1.u[7] -- value is a positive denormal value.
15479  // S1.u[8] -- value is a positive normal value.
15480  // S1.u[9] -- value is positive infinity.
15481  void
15483  {
15484  Wavefront *wf = gpuDynInst->wavefront();
15485  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
15486  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
15487  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
15488 
15489  src0.readSrc();
15490  src1.readSrc();
15491 
15492  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15493  if (wf->execMask(lane)) {
15494  if (bits(src1[lane], 0) || bits(src1[lane], 1)) {
15495  // is NaN
15496  if (std::isnan(src0[lane])) {
15497  sdst.setBit(lane, 1);
15498  continue;
15499  }
15500  }
15501  if (bits(src1[lane], 2)) {
15502  // is -infinity
15503  if (std::isinf(src0[lane]) && std::signbit(src0[lane])) {
15504  sdst.setBit(lane, 1);
15505  continue;
15506  }
15507  }
15508  if (bits(src1[lane], 3)) {
15509  // is -normal
15510  if (std::isnormal(src0[lane])
15511  && std::signbit(src0[lane])) {
15512  sdst.setBit(lane, 1);
15513  continue;
15514  }
15515  }
15516  if (bits(src1[lane], 4)) {
15517  // is -denormal
15518  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
15519  && std::signbit(src0[lane])) {
15520  sdst.setBit(lane, 1);
15521  continue;
15522  }
15523  }
15524  if (bits(src1[lane], 5)) {
15525  // is -zero
15526  if (std::fpclassify(src0[lane]) == FP_ZERO
15527  && std::signbit(src0[lane])) {
15528  sdst.setBit(lane, 1);
15529  continue;
15530  }
15531  }
15532  if (bits(src1[lane], 6)) {
15533  // is +zero
15534  if (std::fpclassify(src0[lane]) == FP_ZERO
15535  && !std::signbit(src0[lane])) {
15536  sdst.setBit(lane, 1);
15537  continue;
15538  }
15539  }
15540  if (bits(src1[lane], 7)) {
15541  // is +denormal
15542  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
15543  && !std::signbit(src0[lane])) {
15544  sdst.setBit(lane, 1);
15545  continue;
15546  }
15547  }
15548  if (bits(src1[lane], 8)) {
15549  // is +normal
15550  if (std::isnormal(src0[lane])
15551  && !std::signbit(src0[lane])) {
15552  sdst.setBit(lane, 1);
15553  continue;
15554  }
15555  }
15556  if (bits(src1[lane], 9)) {
15557  // is +infinity
15558  if (std::isinf(src0[lane])
15559  && !std::signbit(src0[lane])) {
15560  sdst.setBit(lane, 1);
15561  continue;
15562  }
15563  }
15564  }
15565  }
15566 
15567  sdst.write();
15568  }
15569 
15571  InFmt_VOP3 *iFmt)
15572  : Inst_VOP3(iFmt, "v_cmpx_class_f32", true)
15573  {
15574  setFlag(ALU);
15575  setFlag(F32);
15576  } // Inst_VOP3__V_CMPX_CLASS_F32
15577 
15579  {
15580  } // ~Inst_VOP3__V_CMPX_CLASS_F32
15581 
15582  // EXEC, VCC = IEEE numeric class function specified in S1.u, performed on
15583  // S0.f
15584  // The function reports true if the floating point value is any of the
15585  // numeric types selected in S1.u according to the following list:
15586  // S1.u[0] -- value is a signaling NaN.
15587  // S1.u[1] -- value is a quiet NaN.
15588  // S1.u[2] -- value is negative infinity.
15589  // S1.u[3] -- value is a negative normal value.
15590  // S1.u[4] -- value is a negative denormal value.
15591  // S1.u[5] -- value is negative zero.
15592  // S1.u[6] -- value is positive zero.
15593  // S1.u[7] -- value is a positive denormal value.
15594  // S1.u[8] -- value is a positive normal value.
15595  // S1.u[9] -- value is positive infinity.
15596  void
15598  {
15599  Wavefront *wf = gpuDynInst->wavefront();
15600  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
15601  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
15602  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
15603 
15604  src0.readSrc();
15605  src1.readSrc();
15606 
15607  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15608  if (wf->execMask(lane)) {
15609  if (bits(src1[lane], 0) || bits(src1[lane], 1)) {
15610  // is NaN
15611  if (std::isnan(src0[lane])) {
15612  sdst.setBit(lane, 1);
15613  continue;
15614  }
15615  }
15616  if (bits(src1[lane], 2)) {
15617  // is -infinity
15618  if (std::isinf(src0[lane]) && std::signbit(src0[lane])) {
15619  sdst.setBit(lane, 1);
15620  continue;
15621  }
15622  }
15623  if (bits(src1[lane], 3)) {
15624  // is -normal
15625  if (std::isnormal(src0[lane])
15626  && std::signbit(src0[lane])) {
15627  sdst.setBit(lane, 1);
15628  continue;
15629  }
15630  }
15631  if (bits(src1[lane], 4)) {
15632  // is -denormal
15633  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
15634  && std::signbit(src0[lane])) {
15635  sdst.setBit(lane, 1);
15636  continue;
15637  }
15638  }
15639  if (bits(src1[lane], 5)) {
15640  // is -zero
15641  if (std::fpclassify(src0[lane]) == FP_ZERO
15642  && std::signbit(src0[lane])) {
15643  sdst.setBit(lane, 1);
15644  continue;
15645  }
15646  }
15647  if (bits(src1[lane], 6)) {
15648  // is +zero
15649  if (std::fpclassify(src0[lane]) == FP_ZERO
15650  && !std::signbit(src0[lane])) {
15651  sdst.setBit(lane, 1);
15652  continue;
15653  }
15654  }
15655  if (bits(src1[lane], 7)) {
15656  // is +denormal
15657  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
15658  && !std::signbit(src0[lane])) {
15659  sdst.setBit(lane, 1);
15660  continue;
15661  }
15662  }
15663  if (bits(src1[lane], 8)) {
15664  // is +normal
15665  if (std::isnormal(src0[lane])
15666  && !std::signbit(src0[lane])) {
15667  sdst.setBit(lane, 1);
15668  continue;
15669  }
15670  }
15671  if (bits(src1[lane], 9)) {
15672  // is +infinity
15673  if (std::isinf(src0[lane])
15674  && !std::signbit(src0[lane])) {
15675  sdst.setBit(lane, 1);
15676  continue;
15677  }
15678  }
15679  }
15680  }
15681 
15682  wf->execMask() = sdst.rawData();
15683  sdst.write();
15684  }
15685 
15687  InFmt_VOP3 *iFmt)
15688  : Inst_VOP3(iFmt, "v_cmp_class_f64", true)
15689  {
15690  setFlag(ALU);
15691  setFlag(F64);
15692  } // Inst_VOP3__V_CMP_CLASS_F64
15693 
15695  {
15696  } // ~Inst_VOP3__V_CMP_CLASS_F64
15697 
15698  // VCC = IEEE numeric class function specified in S1.u, performed on S0.d
15699  // The function reports true if the floating point value is any of the
15700  // numeric types selected in S1.u according to the following list:
15701  // S1.u[0] -- value is a signaling NaN.
15702  // S1.u[1] -- value is a quiet NaN.
15703  // S1.u[2] -- value is negative infinity.
15704  // S1.u[3] -- value is a negative normal value.
15705  // S1.u[4] -- value is a negative denormal value.
15706  // S1.u[5] -- value is negative zero.
15707  // S1.u[6] -- value is positive zero.
15708  // S1.u[7] -- value is a positive denormal value.
15709  // S1.u[8] -- value is a positive normal value.
15710  // S1.u[9] -- value is positive infinity.
15711  void
15713  {
15714  Wavefront *wf = gpuDynInst->wavefront();
15715  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
15716  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
15717  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
15718 
15719  src0.readSrc();
15720  src1.readSrc();
15721 
15722  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15723  if (wf->execMask(lane)) {
15724  if (bits(src1[lane], 0) || bits(src1[lane], 1)) {
15725  // is NaN
15726  if (std::isnan(src0[lane])) {
15727  sdst.setBit(lane, 1);
15728  continue;
15729  }
15730  }
15731  if (bits(src1[lane], 2)) {
15732  // is -infinity
15733  if (std::isinf(src0[lane]) && std::signbit(src0[lane])) {
15734  sdst.setBit(lane, 1);
15735  continue;
15736  }
15737  }
15738  if (bits(src1[lane], 3)) {
15739  // is -normal
15740  if (std::isnormal(src0[lane])
15741  && std::signbit(src0[lane])) {
15742  sdst.setBit(lane, 1);
15743  continue;
15744  }
15745  }
15746  if (bits(src1[lane], 4)) {
15747  // is -denormal
15748  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
15749  && std::signbit(src0[lane])) {
15750  sdst.setBit(lane, 1);
15751  continue;
15752  }
15753  }
15754  if (bits(src1[lane], 5)) {
15755  // is -zero
15756  if (std::fpclassify(src0[lane]) == FP_ZERO
15757  && std::signbit(src0[lane])) {
15758  sdst.setBit(lane, 1);
15759  continue;
15760  }
15761  }
15762  if (bits(src1[lane], 6)) {
15763  // is +zero
15764  if (std::fpclassify(src0[lane]) == FP_ZERO
15765  && !std::signbit(src0[lane])) {
15766  sdst.setBit(lane, 1);
15767  continue;
15768  }
15769  }
15770  if (bits(src1[lane], 7)) {
15771  // is +denormal
15772  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
15773  && !std::signbit(src0[lane])) {
15774  sdst.setBit(lane, 1);
15775  continue;
15776  }
15777  }
15778  if (bits(src1[lane], 8)) {
15779  // is +normal
15780  if (std::isnormal(src0[lane])
15781  && !std::signbit(src0[lane])) {
15782  sdst.setBit(lane, 1);
15783  continue;
15784  }
15785  }
15786  if (bits(src1[lane], 9)) {
15787  // is +infinity
15788  if (std::isinf(src0[lane])
15789  && !std::signbit(src0[lane])) {
15790  sdst.setBit(lane, 1);
15791  continue;
15792  }
15793  }
15794  }
15795  }
15796 
15797  sdst.write();
15798  }
15799 
15801  InFmt_VOP3 *iFmt)
15802  : Inst_VOP3(iFmt, "v_cmpx_class_f64", true)
15803  {
15804  setFlag(ALU);
15805  setFlag(F64);
15806  } // Inst_VOP3__V_CMPX_CLASS_F64
15807 
15809  {
15810  } // ~Inst_VOP3__V_CMPX_CLASS_F64
15811 
15812  // EXEC, VCC = IEEE numeric class function specified in S1.u, performed on
15813  // S0.d
15814  // The function reports true if the floating point value is any of the
15815  // numeric types selected in S1.u according to the following list:
15816  // S1.u[0] -- value is a signaling NaN.
15817  // S1.u[1] -- value is a quiet NaN.
15818  // S1.u[2] -- value is negative infinity.
15819  // S1.u[3] -- value is a negative normal value.
15820  // S1.u[4] -- value is a negative denormal value.
15821  // S1.u[5] -- value is negative zero.
15822  // S1.u[6] -- value is positive zero.
15823  // S1.u[7] -- value is a positive denormal value.
15824  // S1.u[8] -- value is a positive normal value.
15825  // S1.u[9] -- value is positive infinity.
15826  void
15828  {
15829  Wavefront *wf = gpuDynInst->wavefront();
15830  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
15831  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
15832  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
15833 
15834  src0.readSrc();
15835  src1.readSrc();
15836 
15837  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
15838  if (wf->execMask(lane)) {
15839  if (bits(src1[lane], 0) || bits(src1[lane], 1)) {
15840  // is NaN
15841  if (std::isnan(src0[lane])) {
15842  sdst.setBit(lane, 1);
15843  continue;
15844  }
15845  }
15846  if (bits(src1[lane], 2)) {
15847  // is -infinity
15848  if (std::isinf(src0[lane]) && std::signbit(src0[lane])) {
15849  sdst.setBit(lane, 1);
15850  continue;
15851  }
15852  }
15853  if (bits(src1[lane], 3)) {
15854  // is -normal
15855  if (std::isnormal(src0[lane])
15856  && std::signbit(src0[lane])) {
15857  sdst.setBit(lane, 1);
15858  continue;
15859  }
15860  }
15861  if (bits(src1[lane], 4)) {
15862  // is -denormal
15863  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
15864  && std::signbit(src0[lane])) {
15865  sdst.setBit(lane, 1);
15866  continue;
15867  }
15868  }
15869  if (bits(src1[lane], 5)) {
15870  // is -zero
15871  if (std::fpclassify(src0[lane]) == FP_ZERO
15872  && std::signbit(src0[lane])) {
15873  sdst.setBit(lane, 1);
15874  continue;
15875  }
15876  }
15877  if (bits(src1[lane], 6)) {
15878  // is +zero
15879  if (std::fpclassify(src0[lane]) == FP_ZERO
15880  && !std::signbit(src0[lane])) {
15881  sdst.setBit(lane, 1);
15882  continue;
15883  }
15884  }
15885  if (bits(src1[lane], 7)) {
15886  // is +denormal
15887  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
15888  && !std::signbit(src0[lane])) {
15889  sdst.setBit(lane, 1);
15890  continue;
15891  }
15892  }
15893  if (bits(src1[lane], 8)) {
15894  // is +normal
15895  if (std::isnormal(src0[lane])
15896  && !std::signbit(src0[lane])) {
15897  sdst.setBit(lane, 1);
15898  continue;
15899  }
15900  }
15901  if (bits(src1[lane], 9)) {
15902  // is +infinity
15903  if (std::isinf(src0[lane])
15904  && !std::signbit(src0[lane])) {
15905  sdst.setBit(lane, 1);
15906  continue;
15907  }
15908  }
15909  }
15910  }
15911 
15912  wf->execMask() = sdst.rawData();
15913  sdst.write();
15914  }
15915 
15917  InFmt_VOP3 *iFmt)
15918  : Inst_VOP3(iFmt, "v_cmp_class_f16", true)
15919  {
15920  setFlag(ALU);
15921  setFlag(F16);
15922  } // Inst_VOP3__V_CMP_CLASS_F16
15923 
15925  {
15926  } // ~Inst_VOP3__V_CMP_CLASS_F16
15927 
15928  // VCC = IEEE numeric class function specified in S1.u, performed on S0.f16
15929  // The function reports true if the floating point value is any of the
15930  // numeric types selected in S1.u according to the following list:
15931  // S1.u[0] -- value is a signaling NaN.
15932  // S1.u[1] -- value is a quiet NaN.
15933  // S1.u[2] -- value is negative infinity.
15934  // S1.u[3] -- value is a negative normal value.
15935  // S1.u[4] -- value is a negative denormal value.
15936  // S1.u[5] -- value is negative zero.
15937  // S1.u[6] -- value is positive zero.
15938  // S1.u[7] -- value is a positive denormal value.
15939  // S1.u[8] -- value is a positive normal value.
15940  // S1.u[9] -- value is positive infinity.
15941  void
15943  {
15945  }
15946 
15948  InFmt_VOP3 *iFmt)
15949  : Inst_VOP3(iFmt, "v_cmpx_class_f16", true)
15950  {
15951  setFlag(ALU);
15952  setFlag(F16);
15953  } // Inst_VOP3__V_CMPX_CLASS_F16
15954 
15956  {
15957  } // ~Inst_VOP3__V_CMPX_CLASS_F16
15958 
15959  // EXEC, VCC = IEEE numeric class function specified in S1.u, performed on
15960  // S0.f16
15961  // The function reports true if the floating point value is any of the
15962  // numeric types selected in S1.u according to the following list:
15963  // S1.u[0] -- value is a signaling NaN.
15964  // S1.u[1] -- value is a quiet NaN.
15965  // S1.u[2] -- value is negative infinity.
15966  // S1.u[3] -- value is a negative normal value.
15967  // S1.u[4] -- value is a negative denormal value.
15968  // S1.u[5] -- value is negative zero.
15969  // S1.u[6] -- value is positive zero.
15970  // S1.u[7] -- value is a positive denormal value.
15971  // S1.u[8] -- value is a positive normal value.
15972  // S1.u[9] -- value is positive infinity.
15973  void
15975  {
15977  }
15978 
15980  : Inst_VOP3(iFmt, "v_cmp_f_f16", true)
15981  {
15982  setFlag(ALU);
15983  setFlag(F16);
15984  } // Inst_VOP3__V_CMP_F_F16
15985 
15987  {
15988  } // ~Inst_VOP3__V_CMP_F_F16
15989 
15990  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
15991  void
15993  {
15995  }
15996 
15998  InFmt_VOP3 *iFmt)
15999  : Inst_VOP3(iFmt, "v_cmp_lt_f16", true)
16000  {
16001  setFlag(ALU);
16002  setFlag(F16);
16003  } // Inst_VOP3__V_CMP_LT_F16
16004 
16006  {
16007  } // ~Inst_VOP3__V_CMP_LT_F16
16008 
16009  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
16010  void
16012  {
16014  }
16015 
16017  InFmt_VOP3 *iFmt)
16018  : Inst_VOP3(iFmt, "v_cmp_eq_f16", true)
16019  {
16020  setFlag(ALU);
16021  setFlag(F16);
16022  } // Inst_VOP3__V_CMP_EQ_F16
16023 
16025  {
16026  } // ~Inst_VOP3__V_CMP_EQ_F16
16027 
16028  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
16029  void
16031  {
16033  }
16034 
16036  InFmt_VOP3 *iFmt)
16037  : Inst_VOP3(iFmt, "v_cmp_le_f16", true)
16038  {
16039  setFlag(ALU);
16040  setFlag(F16);
16041  } // Inst_VOP3__V_CMP_LE_F16
16042 
16044  {
16045  } // ~Inst_VOP3__V_CMP_LE_F16
16046 
16047  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
16048  void
16050  {
16052  }
16053 
16055  InFmt_VOP3 *iFmt)
16056  : Inst_VOP3(iFmt, "v_cmp_gt_f16", true)
16057  {
16058  setFlag(ALU);
16059  setFlag(F16);
16060  } // Inst_VOP3__V_CMP_GT_F16
16061 
16063  {
16064  } // ~Inst_VOP3__V_CMP_GT_F16
16065 
16066  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
16067  void
16069  {
16071  }
16072 
16074  InFmt_VOP3 *iFmt)
16075  : Inst_VOP3(iFmt, "v_cmp_lg_f16", true)
16076  {
16077  setFlag(ALU);
16078  setFlag(F16);
16079  } // Inst_VOP3__V_CMP_LG_F16
16080 
16082  {
16083  } // ~Inst_VOP3__V_CMP_LG_F16
16084 
16085  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
16086  void
16088  {
16090  }
16091 
16093  InFmt_VOP3 *iFmt)
16094  : Inst_VOP3(iFmt, "v_cmp_ge_f16", true)
16095  {
16096  setFlag(ALU);
16097  setFlag(F16);
16098  } // Inst_VOP3__V_CMP_GE_F16
16099 
16101  {
16102  } // ~Inst_VOP3__V_CMP_GE_F16
16103 
16104  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
16105  void
16107  {
16109  }
16110 
16112  : Inst_VOP3(iFmt, "v_cmp_o_f16", true)
16113  {
16114  setFlag(ALU);
16115  setFlag(F16);
16116  } // Inst_VOP3__V_CMP_O_F16
16117 
16119  {
16120  } // ~Inst_VOP3__V_CMP_O_F16
16121 
16122  // D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC encoding.
16123  void
16125  {
16127  }
16128 
16130  : Inst_VOP3(iFmt, "v_cmp_u_f16", true)
16131  {
16132  setFlag(ALU);
16133  setFlag(F16);
16134  } // Inst_VOP3__V_CMP_U_F16
16135 
16137  {
16138  } // ~Inst_VOP3__V_CMP_U_F16
16139 
16140  // D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC encoding.
16141  void
16143  {
16145  }
16146 
16148  InFmt_VOP3 *iFmt)
16149  : Inst_VOP3(iFmt, "v_cmp_nge_f16", true)
16150  {
16151  setFlag(ALU);
16152  setFlag(F16);
16153  } // Inst_VOP3__V_CMP_NGE_F16
16154 
16156  {
16157  } // ~Inst_VOP3__V_CMP_NGE_F16
16158 
16159  // D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
16160  void
16162  {
16164  }
16165 
16167  InFmt_VOP3 *iFmt)
16168  : Inst_VOP3(iFmt, "v_cmp_nlg_f16", true)
16169  {
16170  setFlag(ALU);
16171  setFlag(F16);
16172  } // Inst_VOP3__V_CMP_NLG_F16
16173 
16175  {
16176  } // ~Inst_VOP3__V_CMP_NLG_F16
16177 
16178  // D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
16179  void
16181  {
16183  }
16184 
16186  InFmt_VOP3 *iFmt)
16187  : Inst_VOP3(iFmt, "v_cmp_ngt_f16", true)
16188  {
16189  setFlag(ALU);
16190  setFlag(F16);
16191  } // Inst_VOP3__V_CMP_NGT_F16
16192 
16194  {
16195  } // ~Inst_VOP3__V_CMP_NGT_F16
16196 
16197  // D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
16198  void
16200  {
16202  }
16203 
16205  InFmt_VOP3 *iFmt)
16206  : Inst_VOP3(iFmt, "v_cmp_nle_f16", true)
16207  {
16208  setFlag(ALU);
16209  setFlag(F16);
16210  } // Inst_VOP3__V_CMP_NLE_F16
16211 
16213  {
16214  } // ~Inst_VOP3__V_CMP_NLE_F16
16215 
16216  // D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
16217  void
16219  {
16221  }
16222 
16224  InFmt_VOP3 *iFmt)
16225  : Inst_VOP3(iFmt, "v_cmp_neq_f16", true)
16226  {
16227  setFlag(ALU);
16228  setFlag(F16);
16229  } // Inst_VOP3__V_CMP_NEQ_F16
16230 
16232  {
16233  } // ~Inst_VOP3__V_CMP_NEQ_F16
16234 
16235  // D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
16236  void
16238  {
16240  }
16241 
16243  InFmt_VOP3 *iFmt)
16244  : Inst_VOP3(iFmt, "v_cmp_nlt_f16", true)
16245  {
16246  setFlag(ALU);
16247  setFlag(F16);
16248  } // Inst_VOP3__V_CMP_NLT_F16
16249 
16251  {
16252  } // ~Inst_VOP3__V_CMP_NLT_F16
16253 
16254  // D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
16255  void
16257  {
16259  }
16260 
16262  InFmt_VOP3 *iFmt)
16263  : Inst_VOP3(iFmt, "v_cmp_tru_f16", true)
16264  {
16265  setFlag(ALU);
16266  setFlag(F16);
16267  } // Inst_VOP3__V_CMP_TRU_F16
16268 
16270  {
16271  } // ~Inst_VOP3__V_CMP_TRU_F16
16272 
16273  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
16274  void
16276  {
16277  Wavefront *wf = gpuDynInst->wavefront();
16278  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16279 
16280  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16281  if (wf->execMask(lane)) {
16282  sdst.setBit(lane, 1);
16283  }
16284  }
16285 
16286  sdst.write();
16287  }
16288 
16290  InFmt_VOP3 *iFmt)
16291  : Inst_VOP3(iFmt, "v_cmpx_f_f16", true)
16292  {
16293  setFlag(ALU);
16294  } // Inst_VOP3__V_CMPX_F_F16
16295 
16297  {
16298  } // ~Inst_VOP3__V_CMPX_F_F16
16299 
16300  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
16301  void
16303  {
16304  Wavefront *wf = gpuDynInst->wavefront();
16305  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16306 
16307  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16308  if (wf->execMask(lane)) {
16309  sdst.setBit(lane, 0);
16310  }
16311  }
16312 
16313  wf->execMask() = sdst.rawData();
16314  sdst.write();
16315  }
16316 
16318  InFmt_VOP3 *iFmt)
16319  : Inst_VOP3(iFmt, "v_cmpx_lt_f16", true)
16320  {
16321  setFlag(ALU);
16322  setFlag(F16);
16323  } // Inst_VOP3__V_CMPX_LT_F16
16324 
16326  {
16327  } // ~Inst_VOP3__V_CMPX_LT_F16
16328 
16329  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
16330  void
16332  {
16334  }
16335 
16337  InFmt_VOP3 *iFmt)
16338  : Inst_VOP3(iFmt, "v_cmpx_eq_f16", true)
16339  {
16340  setFlag(ALU);
16341  setFlag(F16);
16342  } // Inst_VOP3__V_CMPX_EQ_F16
16343 
16345  {
16346  } // ~Inst_VOP3__V_CMPX_EQ_F16
16347 
16348  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
16349  void
16351  {
16353  }
16354 
16356  InFmt_VOP3 *iFmt)
16357  : Inst_VOP3(iFmt, "v_cmpx_le_f16", true)
16358  {
16359  setFlag(ALU);
16360  setFlag(F16);
16361  } // Inst_VOP3__V_CMPX_LE_F16
16362 
16364  {
16365  } // ~Inst_VOP3__V_CMPX_LE_F16
16366 
16367  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
16368  void
16370  {
16372  }
16373 
16375  InFmt_VOP3 *iFmt)
16376  : Inst_VOP3(iFmt, "v_cmpx_gt_f16", true)
16377  {
16378  setFlag(ALU);
16379  setFlag(F16);
16380  } // Inst_VOP3__V_CMPX_GT_F16
16381 
16383  {
16384  } // ~Inst_VOP3__V_CMPX_GT_F16
16385 
16386  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
16387  void
16389  {
16391  }
16392 
16394  InFmt_VOP3 *iFmt)
16395  : Inst_VOP3(iFmt, "v_cmpx_lg_f16", true)
16396  {
16397  setFlag(ALU);
16398  setFlag(F16);
16399  } // Inst_VOP3__V_CMPX_LG_F16
16400 
16402  {
16403  } // ~Inst_VOP3__V_CMPX_LG_F16
16404 
16405  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
16406  void
16408  {
16410  }
16411 
16413  InFmt_VOP3 *iFmt)
16414  : Inst_VOP3(iFmt, "v_cmpx_ge_f16", true)
16415  {
16416  setFlag(ALU);
16417  setFlag(F16);
16418  } // Inst_VOP3__V_CMPX_GE_F16
16419 
16421  {
16422  } // ~Inst_VOP3__V_CMPX_GE_F16
16423 
16424  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
16425  void
16427  {
16429  }
16430 
16432  InFmt_VOP3 *iFmt)
16433  : Inst_VOP3(iFmt, "v_cmpx_o_f16", true)
16434  {
16435  setFlag(ALU);
16436  setFlag(F16);
16437  } // Inst_VOP3__V_CMPX_O_F16
16438 
16440  {
16441  } // ~Inst_VOP3__V_CMPX_O_F16
16442 
16443  // EXEC,D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC
16444  // encoding.
16445  void
16447  {
16449  }
16450 
16452  InFmt_VOP3 *iFmt)
16453  : Inst_VOP3(iFmt, "v_cmpx_u_f16", true)
16454  {
16455  setFlag(ALU);
16456  setFlag(F16);
16457  } // Inst_VOP3__V_CMPX_U_F16
16458 
16460  {
16461  } // ~Inst_VOP3__V_CMPX_U_F16
16462 
16463  // EXEC,D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC
16464  // encoding.
16465  void
16467  {
16469  }
16470 
16472  InFmt_VOP3 *iFmt)
16473  : Inst_VOP3(iFmt, "v_cmpx_nge_f16", true)
16474  {
16475  setFlag(ALU);
16476  setFlag(F16);
16477  } // Inst_VOP3__V_CMPX_NGE_F16
16478 
16480  {
16481  } // ~Inst_VOP3__V_CMPX_NGE_F16
16482 
16483  // EXEC,D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
16484  void
16486  {
16488  }
16489 
16491  InFmt_VOP3 *iFmt)
16492  : Inst_VOP3(iFmt, "v_cmpx_nlg_f16", true)
16493  {
16494  setFlag(ALU);
16495  setFlag(F16);
16496  } // Inst_VOP3__V_CMPX_NLG_F16
16497 
16499  {
16500  } // ~Inst_VOP3__V_CMPX_NLG_F16
16501 
16502  // EXEC,D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
16503  void
16505  {
16507  }
16508 
16510  InFmt_VOP3 *iFmt)
16511  : Inst_VOP3(iFmt, "v_cmpx_ngt_f16", true)
16512  {
16513  setFlag(ALU);
16514  setFlag(F16);
16515  } // Inst_VOP3__V_CMPX_NGT_F16
16516 
16518  {
16519  } // ~Inst_VOP3__V_CMPX_NGT_F16
16520 
16521  // EXEC,D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
16522  void
16524  {
16526  }
16527 
16529  InFmt_VOP3 *iFmt)
16530  : Inst_VOP3(iFmt, "v_cmpx_nle_f16", true)
16531  {
16532  setFlag(ALU);
16533  setFlag(F16);
16534  } // Inst_VOP3__V_CMPX_NLE_F16
16535 
16537  {
16538  } // ~Inst_VOP3__V_CMPX_NLE_F16
16539 
16540  // EXEC,D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
16541  void
16543  {
16545  }
16546 
16548  InFmt_VOP3 *iFmt)
16549  : Inst_VOP3(iFmt, "v_cmpx_neq_f16", true)
16550  {
16551  setFlag(ALU);
16552  setFlag(F16);
16553  } // Inst_VOP3__V_CMPX_NEQ_F16
16554 
16556  {
16557  } // ~Inst_VOP3__V_CMPX_NEQ_F16
16558 
16559  // EXEC,D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
16560  void
16562  {
16564  }
16565 
16567  InFmt_VOP3 *iFmt)
16568  : Inst_VOP3(iFmt, "v_cmpx_nlt_f16", true)
16569  {
16570  setFlag(ALU);
16571  setFlag(F16);
16572  } // Inst_VOP3__V_CMPX_NLT_F16
16573 
16575  {
16576  } // ~Inst_VOP3__V_CMPX_NLT_F16
16577 
16578  // EXEC,D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
16579  void
16581  {
16583  }
16584 
16586  InFmt_VOP3 *iFmt)
16587  : Inst_VOP3(iFmt, "v_cmpx_tru_f16", true)
16588  {
16589  setFlag(ALU);
16590  setFlag(F16);
16591  } // Inst_VOP3__V_CMPX_TRU_F16
16592 
16594  {
16595  } // ~Inst_VOP3__V_CMPX_TRU_F16
16596 
16597  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
16598  void
16600  {
16601  Wavefront *wf = gpuDynInst->wavefront();
16602  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16603 
16604  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16605  if (wf->execMask(lane)) {
16606  sdst.setBit(lane, 1);
16607  }
16608  }
16609 
16610  wf->execMask() = sdst.rawData();
16611  sdst.write();
16612  }
16613 
16615  : Inst_VOP3(iFmt, "v_cmp_f_f32", true)
16616  {
16617  setFlag(ALU);
16618  setFlag(F32);
16619  } // Inst_VOP3__V_CMP_F_F32
16620 
16622  {
16623  } // ~Inst_VOP3__V_CMP_F_F32
16624 
16625  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
16626  void
16628  {
16629  Wavefront *wf = gpuDynInst->wavefront();
16630  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16631 
16632  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16633  if (wf->execMask(lane)) {
16634  sdst.setBit(lane, 0);
16635  }
16636  }
16637 
16638  sdst.write();
16639  }
16640 
16642  InFmt_VOP3 *iFmt)
16643  : Inst_VOP3(iFmt, "v_cmp_lt_f32", true)
16644  {
16645  setFlag(ALU);
16646  setFlag(F32);
16647  } // Inst_VOP3__V_CMP_LT_F32
16648 
16650  {
16651  } // ~Inst_VOP3__V_CMP_LT_F32
16652 
16653  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
16654  void
16656  {
16657  Wavefront *wf = gpuDynInst->wavefront();
16658  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
16659  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
16660  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16661 
16662  src0.readSrc();
16663  src1.readSrc();
16664 
16665  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16666  if (wf->execMask(lane)) {
16667  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
16668  }
16669  }
16670 
16671  sdst.write();
16672  }
16673 
16675  InFmt_VOP3 *iFmt)
16676  : Inst_VOP3(iFmt, "v_cmp_eq_f32", true)
16677  {
16678  setFlag(ALU);
16679  setFlag(F32);
16680  } // Inst_VOP3__V_CMP_EQ_F32
16681 
16683  {
16684  } // ~Inst_VOP3__V_CMP_EQ_F32
16685 
16686  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
16687  void
16689  {
16690  Wavefront *wf = gpuDynInst->wavefront();
16691  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
16692  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
16693  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16694 
16695  src0.readSrc();
16696  src1.readSrc();
16697 
16698  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16699  if (wf->execMask(lane)) {
16700  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
16701  }
16702  }
16703 
16704  sdst.write();
16705  }
16706 
16708  InFmt_VOP3 *iFmt)
16709  : Inst_VOP3(iFmt, "v_cmp_le_f32", true)
16710  {
16711  setFlag(ALU);
16712  setFlag(F32);
16713  } // Inst_VOP3__V_CMP_LE_F32
16714 
16716  {
16717  } // ~Inst_VOP3__V_CMP_LE_F32
16718 
16719  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
16720  void
16722  {
16723  Wavefront *wf = gpuDynInst->wavefront();
16724  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
16725  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
16726  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16727 
16728  src0.readSrc();
16729  src1.readSrc();
16730 
16731  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16732  if (wf->execMask(lane)) {
16733  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
16734  }
16735  }
16736 
16737  sdst.write();
16738  }
16739 
16741  InFmt_VOP3 *iFmt)
16742  : Inst_VOP3(iFmt, "v_cmp_gt_f32", true)
16743  {
16744  setFlag(ALU);
16745  setFlag(F32);
16746  } // Inst_VOP3__V_CMP_GT_F32
16747 
16749  {
16750  } // ~Inst_VOP3__V_CMP_GT_F32
16751 
16752  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
16753  void
16755  {
16756  Wavefront *wf = gpuDynInst->wavefront();
16757  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
16758  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
16759  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16760 
16761  src0.readSrc();
16762  src1.readSrc();
16763 
16764  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16765  if (wf->execMask(lane)) {
16766  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
16767  }
16768  }
16769 
16770  sdst.write();
16771  }
16772 
16774  InFmt_VOP3 *iFmt)
16775  : Inst_VOP3(iFmt, "v_cmp_lg_f32", true)
16776  {
16777  setFlag(ALU);
16778  setFlag(F32);
16779  } // Inst_VOP3__V_CMP_LG_F32
16780 
16782  {
16783  } // ~Inst_VOP3__V_CMP_LG_F32
16784 
16785  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
16786  void
16788  {
16789  Wavefront *wf = gpuDynInst->wavefront();
16790  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
16791  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
16792  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16793 
16794  src0.readSrc();
16795  src1.readSrc();
16796 
16797  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16798  if (wf->execMask(lane)) {
16799  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
16800  }
16801  }
16802 
16803  sdst.write();
16804  }
16805 
16807  InFmt_VOP3 *iFmt)
16808  : Inst_VOP3(iFmt, "v_cmp_ge_f32", true)
16809  {
16810  setFlag(ALU);
16811  setFlag(F32);
16812  } // Inst_VOP3__V_CMP_GE_F32
16813 
16815  {
16816  } // ~Inst_VOP3__V_CMP_GE_F32
16817 
16818  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
16819  void
16821  {
16822  Wavefront *wf = gpuDynInst->wavefront();
16823  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
16824  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
16825  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16826 
16827  src0.readSrc();
16828  src1.readSrc();
16829 
16830  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16831  if (wf->execMask(lane)) {
16832  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
16833  }
16834  }
16835 
16836  sdst.write();
16837  }
16838 
16840  : Inst_VOP3(iFmt, "v_cmp_o_f32", true)
16841  {
16842  setFlag(ALU);
16843  setFlag(F32);
16844  } // Inst_VOP3__V_CMP_O_F32
16845 
16847  {
16848  } // ~Inst_VOP3__V_CMP_O_F32
16849 
16850  // D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC encoding.
16851  void
16853  {
16854  Wavefront *wf = gpuDynInst->wavefront();
16855  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
16856  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
16857  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16858 
16859  src0.readSrc();
16860  src1.readSrc();
16861 
16862  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16863  if (wf->execMask(lane)) {
16864  sdst.setBit(lane, (!std::isnan(src0[lane])
16865  && !std::isnan(src1[lane])) ? 1 : 0);
16866  }
16867  }
16868 
16869  sdst.write();
16870  }
16871 
16873  : Inst_VOP3(iFmt, "v_cmp_u_f32", true)
16874  {
16875  setFlag(ALU);
16876  setFlag(F32);
16877  } // Inst_VOP3__V_CMP_U_F32
16878 
16880  {
16881  } // ~Inst_VOP3__V_CMP_U_F32
16882 
16883  // D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC encoding.
16884  void
16886  {
16887  Wavefront *wf = gpuDynInst->wavefront();
16888  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
16889  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
16890  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16891 
16892  src0.readSrc();
16893  src1.readSrc();
16894 
16895  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16896  if (wf->execMask(lane)) {
16897  sdst.setBit(lane, (std::isnan(src0[lane])
16898  || std::isnan(src1[lane])) ? 1 : 0);
16899  }
16900  }
16901 
16902  sdst.write();
16903  }
16904 
16906  InFmt_VOP3 *iFmt)
16907  : Inst_VOP3(iFmt, "v_cmp_nge_f32", true)
16908  {
16909  setFlag(ALU);
16910  setFlag(F32);
16911  } // Inst_VOP3__V_CMP_NGE_F32
16912 
16914  {
16915  } // ~Inst_VOP3__V_CMP_NGE_F32
16916 
16917  // D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
16918  void
16920  {
16921  Wavefront *wf = gpuDynInst->wavefront();
16922  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
16923  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
16924  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16925 
16926  src0.readSrc();
16927  src1.readSrc();
16928 
16929  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16930  if (wf->execMask(lane)) {
16931  sdst.setBit(lane, !(src0[lane] >= src1[lane]) ? 1 : 0);
16932  }
16933  }
16934 
16935  sdst.write();
16936  }
16937 
16939  InFmt_VOP3 *iFmt)
16940  : Inst_VOP3(iFmt, "v_cmp_nlg_f32", true)
16941  {
16942  setFlag(ALU);
16943  setFlag(F32);
16944  } // Inst_VOP3__V_CMP_NLG_F32
16945 
16947  {
16948  } // ~Inst_VOP3__V_CMP_NLG_F32
16949 
16950  // D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
16951  void
16953  {
16954  Wavefront *wf = gpuDynInst->wavefront();
16955  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
16956  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
16957  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16958 
16959  src0.readSrc();
16960  src1.readSrc();
16961 
16962  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16963  if (wf->execMask(lane)) {
16964  sdst.setBit(lane, !(src0[lane] < src1[lane]
16965  || src0[lane] > src1[lane]) ? 1 : 0);
16966  }
16967  }
16968 
16969  sdst.write();
16970  }
16971 
16973  InFmt_VOP3 *iFmt)
16974  : Inst_VOP3(iFmt, "v_cmp_ngt_f32", true)
16975  {
16976  setFlag(ALU);
16977  setFlag(F32);
16978  } // Inst_VOP3__V_CMP_NGT_F32
16979 
16981  {
16982  } // ~Inst_VOP3__V_CMP_NGT_F32
16983 
16984  // D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
16985  void
16987  {
16988  Wavefront *wf = gpuDynInst->wavefront();
16989  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
16990  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
16991  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
16992 
16993  src0.readSrc();
16994  src1.readSrc();
16995 
16996  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
16997  if (wf->execMask(lane)) {
16998  sdst.setBit(lane, !(src0[lane] > src1[lane]) ? 1 : 0);
16999  }
17000  }
17001 
17002  sdst.write();
17003  }
17004 
17006  InFmt_VOP3 *iFmt)
17007  : Inst_VOP3(iFmt, "v_cmp_nle_f32", true)
17008  {
17009  setFlag(ALU);
17010  setFlag(F32);
17011  } // Inst_VOP3__V_CMP_NLE_F32
17012 
17014  {
17015  } // ~Inst_VOP3__V_CMP_NLE_F32
17016 
17017  // D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
17018  void
17020  {
17021  Wavefront *wf = gpuDynInst->wavefront();
17022  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17023  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17024  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17025 
17026  src0.readSrc();
17027  src1.readSrc();
17028 
17029  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17030  if (wf->execMask(lane)) {
17031  sdst.setBit(lane, !(src0[lane] <= src1[lane]) ? 1 : 0);
17032  }
17033  }
17034 
17035  sdst.write();
17036  }
17037 
17039  InFmt_VOP3 *iFmt)
17040  : Inst_VOP3(iFmt, "v_cmp_neq_f32", true)
17041  {
17042  setFlag(ALU);
17043  setFlag(F32);
17044  } // Inst_VOP3__V_CMP_NEQ_F32
17045 
17047  {
17048  } // ~Inst_VOP3__V_CMP_NEQ_F32
17049 
17050  // D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
17051  void
17053  {
17054  Wavefront *wf = gpuDynInst->wavefront();
17055  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17056  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17057  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17058 
17059  src0.readSrc();
17060  src1.readSrc();
17061 
17062  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17063  if (wf->execMask(lane)) {
17064  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
17065  }
17066  }
17067 
17068  sdst.write();
17069  }
17070 
17072  InFmt_VOP3 *iFmt)
17073  : Inst_VOP3(iFmt, "v_cmp_nlt_f32", true)
17074  {
17075  setFlag(ALU);
17076  setFlag(F32);
17077  } // Inst_VOP3__V_CMP_NLT_F32
17078 
17080  {
17081  } // ~Inst_VOP3__V_CMP_NLT_F32
17082 
17083  // D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
17084  void
17086  {
17087  Wavefront *wf = gpuDynInst->wavefront();
17088  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17089  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17090  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17091 
17092  src0.readSrc();
17093  src1.readSrc();
17094 
17095  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17096  if (wf->execMask(lane)) {
17097  sdst.setBit(lane, !(src0[lane] < src1[lane]) ? 1 : 0);
17098  }
17099  }
17100 
17101  sdst.write();
17102  }
17103 
17105  InFmt_VOP3 *iFmt)
17106  : Inst_VOP3(iFmt, "v_cmp_tru_f32", true)
17107  {
17108  setFlag(ALU);
17109  setFlag(F32);
17110  } // Inst_VOP3__V_CMP_TRU_F32
17111 
17113  {
17114  } // ~Inst_VOP3__V_CMP_TRU_F32
17115 
17116  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
17117  void
17119  {
17120  Wavefront *wf = gpuDynInst->wavefront();
17121  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17122 
17123  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17124  if (wf->execMask(lane)) {
17125  sdst.setBit(lane, 1);
17126  }
17127  }
17128 
17129  sdst.write();
17130  }
17131 
17133  InFmt_VOP3 *iFmt)
17134  : Inst_VOP3(iFmt, "v_cmpx_f_f32", true)
17135  {
17136  setFlag(ALU);
17137  setFlag(F32);
17138  } // Inst_VOP3__V_CMPX_F_F32
17139 
17141  {
17142  } // ~Inst_VOP3__V_CMPX_F_F32
17143 
17144  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
17145  void
17147  {
17148  Wavefront *wf = gpuDynInst->wavefront();
17149  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17150 
17151  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17152  if (wf->execMask(lane)) {
17153  sdst.setBit(lane, 0);
17154  }
17155  }
17156 
17157  wf->execMask() = sdst.rawData();
17158  sdst.write();
17159  }
17160 
17162  InFmt_VOP3 *iFmt)
17163  : Inst_VOP3(iFmt, "v_cmpx_lt_f32", true)
17164  {
17165  setFlag(ALU);
17166  setFlag(F32);
17167  } // Inst_VOP3__V_CMPX_LT_F32
17168 
17170  {
17171  } // ~Inst_VOP3__V_CMPX_LT_F32
17172 
17173  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
17174  void
17176  {
17177  Wavefront *wf = gpuDynInst->wavefront();
17178  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17179  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17180  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17181 
17182  src0.readSrc();
17183  src1.readSrc();
17184 
17185  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17186  if (wf->execMask(lane)) {
17187  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
17188  }
17189  }
17190 
17191  wf->execMask() = sdst.rawData();
17192  sdst.write();
17193  }
17194 
17196  InFmt_VOP3 *iFmt)
17197  : Inst_VOP3(iFmt, "v_cmpx_eq_f32", true)
17198  {
17199  setFlag(ALU);
17200  setFlag(F32);
17201  } // Inst_VOP3__V_CMPX_EQ_F32
17202 
17204  {
17205  } // ~Inst_VOP3__V_CMPX_EQ_F32
17206 
17207  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
17208  void
17210  {
17211  Wavefront *wf = gpuDynInst->wavefront();
17212  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17213  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17214  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17215 
17216  src0.readSrc();
17217  src1.readSrc();
17218 
17219  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17220  if (wf->execMask(lane)) {
17221  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
17222  }
17223  }
17224 
17225  wf->execMask() = sdst.rawData();
17226  sdst.write();
17227  }
17228 
17230  InFmt_VOP3 *iFmt)
17231  : Inst_VOP3(iFmt, "v_cmpx_le_f32", true)
17232  {
17233  setFlag(ALU);
17234  setFlag(F32);
17235  } // Inst_VOP3__V_CMPX_LE_F32
17236 
17238  {
17239  } // ~Inst_VOP3__V_CMPX_LE_F32
17240 
17241  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
17242  void
17244  {
17245  Wavefront *wf = gpuDynInst->wavefront();
17246  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17247  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17248  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17249 
17250  src0.readSrc();
17251  src1.readSrc();
17252 
17253  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17254  if (wf->execMask(lane)) {
17255  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
17256  }
17257  }
17258 
17259  wf->execMask() = sdst.rawData();
17260  sdst.write();
17261  }
17262 
17264  InFmt_VOP3 *iFmt)
17265  : Inst_VOP3(iFmt, "v_cmpx_gt_f32", true)
17266  {
17267  setFlag(ALU);
17268  setFlag(F32);
17269  } // Inst_VOP3__V_CMPX_GT_F32
17270 
17272  {
17273  } // ~Inst_VOP3__V_CMPX_GT_F32
17274 
17275  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
17276  void
17278  {
17279  Wavefront *wf = gpuDynInst->wavefront();
17280  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17281  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17282  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17283 
17284  src0.readSrc();
17285  src1.readSrc();
17286 
17287  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17288  if (wf->execMask(lane)) {
17289  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
17290  }
17291  }
17292 
17293  wf->execMask() = sdst.rawData();
17294  sdst.write();
17295  }
17296 
17298  InFmt_VOP3 *iFmt)
17299  : Inst_VOP3(iFmt, "v_cmpx_lg_f32", true)
17300  {
17301  setFlag(ALU);
17302  setFlag(F32);
17303  } // Inst_VOP3__V_CMPX_LG_F32
17304 
17306  {
17307  } // ~Inst_VOP3__V_CMPX_LG_F32
17308 
17309  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
17310  void
17312  {
17313  Wavefront *wf = gpuDynInst->wavefront();
17314  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17315  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17316  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17317 
17318  src0.readSrc();
17319  src1.readSrc();
17320 
17321  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17322  if (wf->execMask(lane)) {
17323  sdst.setBit(lane, (src0[lane] < src1[lane]
17324  || src0[lane] > src1[lane]) ? 1 : 0);
17325  }
17326  }
17327 
17328  wf->execMask() = sdst.rawData();
17329  sdst.write();
17330  }
17331 
17333  InFmt_VOP3 *iFmt)
17334  : Inst_VOP3(iFmt, "v_cmpx_ge_f32", true)
17335  {
17336  setFlag(ALU);
17337  setFlag(F32);
17338  } // Inst_VOP3__V_CMPX_GE_F32
17339 
17341  {
17342  } // ~Inst_VOP3__V_CMPX_GE_F32
17343 
17344  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
17345  void
17347  {
17348  Wavefront *wf = gpuDynInst->wavefront();
17349  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17350  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17351  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17352 
17353  src0.readSrc();
17354  src1.readSrc();
17355 
17356  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17357  if (wf->execMask(lane)) {
17358  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
17359  }
17360  }
17361 
17362  wf->execMask() = sdst.rawData();
17363  sdst.write();
17364  }
17365 
17367  InFmt_VOP3 *iFmt)
17368  : Inst_VOP3(iFmt, "v_cmpx_o_f32", true)
17369  {
17370  setFlag(ALU);
17371  setFlag(F32);
17372  } // Inst_VOP3__V_CMPX_O_F32
17373 
17375  {
17376  } // ~Inst_VOP3__V_CMPX_O_F32
17377 
17378  // EXEC,D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC
17379  // encoding.
17380  void
17382  {
17383  Wavefront *wf = gpuDynInst->wavefront();
17384  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17385  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17386  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17387 
17388  src0.readSrc();
17389  src1.readSrc();
17390 
17391  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17392  if (wf->execMask(lane)) {
17393  sdst.setBit(lane, (!std::isnan(src0[lane])
17394  && !std::isnan(src1[lane])) ? 1 : 0);
17395  }
17396  }
17397 
17398  wf->execMask() = sdst.rawData();
17399  sdst.write();
17400  }
17401 
17403  InFmt_VOP3 *iFmt)
17404  : Inst_VOP3(iFmt, "v_cmpx_u_f32", true)
17405  {
17406  setFlag(ALU);
17407  setFlag(F32);
17408  } // Inst_VOP3__V_CMPX_U_F32
17409 
17411  {
17412  } // ~Inst_VOP3__V_CMPX_U_F32
17413 
17414  // EXEC,D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC
17415  // encoding.
17416  void
17418  {
17419  Wavefront *wf = gpuDynInst->wavefront();
17420  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17421  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17422  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17423 
17424  src0.readSrc();
17425  src1.readSrc();
17426 
17427  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17428  if (wf->execMask(lane)) {
17429  sdst.setBit(lane, (std::isnan(src0[lane])
17430  || std::isnan(src1[lane])) ? 1 : 0);
17431  }
17432  }
17433 
17434  wf->execMask() = sdst.rawData();
17435  sdst.write();
17436  }
17437 
17439  InFmt_VOP3 *iFmt)
17440  : Inst_VOP3(iFmt, "v_cmpx_nge_f32", true)
17441  {
17442  setFlag(ALU);
17443  setFlag(F32);
17444  } // Inst_VOP3__V_CMPX_NGE_F32
17445 
17447  {
17448  } // ~Inst_VOP3__V_CMPX_NGE_F32
17449 
17450  // EXEC,D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
17451  void
17453  {
17454  Wavefront *wf = gpuDynInst->wavefront();
17455  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17456  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17457  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17458 
17459  src0.readSrc();
17460  src1.readSrc();
17461 
17462  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17463  if (wf->execMask(lane)) {
17464  sdst.setBit(lane, !(src0[lane] >= src1[lane]) ? 1 : 0);
17465  }
17466  }
17467 
17468  wf->execMask() = sdst.rawData();
17469  sdst.write();
17470  }
17471 
17473  InFmt_VOP3 *iFmt)
17474  : Inst_VOP3(iFmt, "v_cmpx_nlg_f32", true)
17475  {
17476  setFlag(ALU);
17477  setFlag(F32);
17478  } // Inst_VOP3__V_CMPX_NLG_F32
17479 
17481  {
17482  } // ~Inst_VOP3__V_CMPX_NLG_F32
17483 
17484  // EXEC,D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
17485  void
17487  {
17488  Wavefront *wf = gpuDynInst->wavefront();
17489  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17490  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17491  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17492 
17493  src0.readSrc();
17494  src1.readSrc();
17495 
17496  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17497  if (wf->execMask(lane)) {
17498  sdst.setBit(lane, !(src0[lane] < src1[lane]
17499  || src0[lane] > src1[lane]) ? 1 : 0);
17500  }
17501  }
17502 
17503  wf->execMask() = sdst.rawData();
17504  sdst.write();
17505  }
17506 
17508  InFmt_VOP3 *iFmt)
17509  : Inst_VOP3(iFmt, "v_cmpx_ngt_f32", true)
17510  {
17511  setFlag(ALU);
17512  setFlag(F32);
17513  } // Inst_VOP3__V_CMPX_NGT_F32
17514 
17516  {
17517  } // ~Inst_VOP3__V_CMPX_NGT_F32
17518 
17519  // EXEC,D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
17520  void
17522  {
17523  Wavefront *wf = gpuDynInst->wavefront();
17524  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17525  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17526  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17527 
17528  src0.readSrc();
17529  src1.readSrc();
17530 
17531  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17532  if (wf->execMask(lane)) {
17533  sdst.setBit(lane, !(src0[lane] > src1[lane]) ? 1 : 0);
17534  }
17535  }
17536 
17537  wf->execMask() = sdst.rawData();
17538  sdst.write();
17539  }
17540 
17542  InFmt_VOP3 *iFmt)
17543  : Inst_VOP3(iFmt, "v_cmpx_nle_f32", true)
17544  {
17545  setFlag(ALU);
17546  setFlag(F32);
17547  } // Inst_VOP3__V_CMPX_NLE_F32
17548 
17550  {
17551  } // ~Inst_VOP3__V_CMPX_NLE_F32
17552 
17553  // EXEC,D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
17554  void
17556  {
17557  Wavefront *wf = gpuDynInst->wavefront();
17558  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17559  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17560  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17561 
17562  src0.readSrc();
17563  src1.readSrc();
17564 
17565  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17566  if (wf->execMask(lane)) {
17567  sdst.setBit(lane, !(src0[lane] <= src1[lane]) ? 1 : 0);
17568  }
17569  }
17570 
17571  wf->execMask() = sdst.rawData();
17572  sdst.write();
17573  }
17574 
17576  InFmt_VOP3 *iFmt)
17577  : Inst_VOP3(iFmt, "v_cmpx_neq_f32", true)
17578  {
17579  setFlag(ALU);
17580  setFlag(F32);
17581  } // Inst_VOP3__V_CMPX_NEQ_F32
17582 
17584  {
17585  } // ~Inst_VOP3__V_CMPX_NEQ_F32
17586 
17587  // EXEC,D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
17588  void
17590  {
17591  Wavefront *wf = gpuDynInst->wavefront();
17592  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17593  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17594  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17595 
17596  src0.readSrc();
17597  src1.readSrc();
17598 
17599  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17600  if (wf->execMask(lane)) {
17601  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
17602  }
17603  }
17604 
17605  wf->execMask() = sdst.rawData();
17606  sdst.write();
17607  }
17608 
17610  InFmt_VOP3 *iFmt)
17611  : Inst_VOP3(iFmt, "v_cmpx_nlt_f32", true)
17612  {
17613  setFlag(ALU);
17614  setFlag(F32);
17615  } // Inst_VOP3__V_CMPX_NLT_F32
17616 
17618  {
17619  } // ~Inst_VOP3__V_CMPX_NLT_F32
17620 
17621  // EXEC,D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
17622  void
17624  {
17625  Wavefront *wf = gpuDynInst->wavefront();
17626  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
17627  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
17628  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17629 
17630  src0.readSrc();
17631  src1.readSrc();
17632 
17633  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17634  if (wf->execMask(lane)) {
17635  sdst.setBit(lane, !(src0[lane] < src1[lane]) ? 1 : 0);
17636  }
17637  }
17638 
17639  wf->execMask() = sdst.rawData();
17640  sdst.write();
17641  }
17642 
17644  InFmt_VOP3 *iFmt)
17645  : Inst_VOP3(iFmt, "v_cmpx_tru_f32", true)
17646  {
17647  setFlag(ALU);
17648  setFlag(F32);
17649  } // Inst_VOP3__V_CMPX_TRU_F32
17650 
17652  {
17653  } // ~Inst_VOP3__V_CMPX_TRU_F32
17654 
17655  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
17656  void
17658  {
17659  Wavefront *wf = gpuDynInst->wavefront();
17660  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17661 
17662  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17663  if (wf->execMask(lane)) {
17664  sdst.setBit(lane, 1);
17665  }
17666  }
17667 
17668  wf->execMask() = sdst.rawData();
17669  sdst.write();
17670  }
17671 
17673  : Inst_VOP3(iFmt, "v_cmp_f_f64", true)
17674  {
17675  setFlag(ALU);
17676  setFlag(F64);
17677  } // Inst_VOP3__V_CMP_F_F64
17678 
17680  {
17681  } // ~Inst_VOP3__V_CMP_F_F64
17682 
17683  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
17684  void
17686  {
17687  Wavefront *wf = gpuDynInst->wavefront();
17688  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17689 
17690  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17691  if (wf->execMask(lane)) {
17692  sdst.setBit(lane, 0);
17693  }
17694  }
17695 
17696  sdst.write();
17697  }
17698 
17700  InFmt_VOP3 *iFmt)
17701  : Inst_VOP3(iFmt, "v_cmp_lt_f64", true)
17702  {
17703  setFlag(ALU);
17704  setFlag(F64);
17705  } // Inst_VOP3__V_CMP_LT_F64
17706 
17708  {
17709  } // ~Inst_VOP3__V_CMP_LT_F64
17710 
17711  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
17712  void
17714  {
17715  Wavefront *wf = gpuDynInst->wavefront();
17716  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
17717  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
17718  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17719 
17720  src0.readSrc();
17721  src1.readSrc();
17722 
17723  if (instData.ABS & 0x1) {
17724  src0.absModifier();
17725  }
17726 
17727  if (instData.ABS & 0x2) {
17728  src1.absModifier();
17729  }
17730 
17731  if (extData.NEG & 0x1) {
17732  src0.negModifier();
17733  }
17734 
17735  if (extData.NEG & 0x2) {
17736  src1.negModifier();
17737  }
17738 
17742  assert(!(instData.ABS & 0x4));
17743  assert(!(extData.NEG & 0x4));
17744 
17745  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17746  if (wf->execMask(lane)) {
17747  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
17748  }
17749  }
17750 
17751  sdst.write();
17752  }
17753 
17755  InFmt_VOP3 *iFmt)
17756  : Inst_VOP3(iFmt, "v_cmp_eq_f64", true)
17757  {
17758  setFlag(ALU);
17759  setFlag(F64);
17760  } // Inst_VOP3__V_CMP_EQ_F64
17761 
17763  {
17764  } // ~Inst_VOP3__V_CMP_EQ_F64
17765 
17766  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
17767  void
17769  {
17770  Wavefront *wf = gpuDynInst->wavefront();
17771  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
17772  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
17773  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17774 
17775  src0.readSrc();
17776  src1.readSrc();
17777 
17778  if (instData.ABS & 0x1) {
17779  src0.absModifier();
17780  }
17781 
17782  if (instData.ABS & 0x2) {
17783  src1.absModifier();
17784  }
17785 
17786  if (extData.NEG & 0x1) {
17787  src0.negModifier();
17788  }
17789 
17790  if (extData.NEG & 0x2) {
17791  src1.negModifier();
17792  }
17793 
17797  assert(!(instData.ABS & 0x4));
17798  assert(!(extData.NEG & 0x4));
17799 
17800  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17801  if (wf->execMask(lane)) {
17802  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
17803  }
17804  }
17805 
17806  sdst.write();
17807  }
17808 
17810  InFmt_VOP3 *iFmt)
17811  : Inst_VOP3(iFmt, "v_cmp_le_f64", true)
17812  {
17813  setFlag(ALU);
17814  setFlag(F64);
17815  } // Inst_VOP3__V_CMP_LE_F64
17816 
17818  {
17819  } // ~Inst_VOP3__V_CMP_LE_F64
17820 
17821  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
17822  void
17824  {
17825  Wavefront *wf = gpuDynInst->wavefront();
17826  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
17827  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
17828  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17829 
17830  src0.readSrc();
17831  src1.readSrc();
17832 
17833  if (instData.ABS & 0x1) {
17834  src0.absModifier();
17835  }
17836 
17837  if (instData.ABS & 0x2) {
17838  src1.absModifier();
17839  }
17840 
17841  if (extData.NEG & 0x1) {
17842  src0.negModifier();
17843  }
17844 
17845  if (extData.NEG & 0x2) {
17846  src1.negModifier();
17847  }
17848 
17852  assert(!(instData.ABS & 0x4));
17853  assert(!(extData.NEG & 0x4));
17854 
17855  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17856  if (wf->execMask(lane)) {
17857  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
17858  }
17859  }
17860 
17861  sdst.write();
17862  }
17863 
17865  InFmt_VOP3 *iFmt)
17866  : Inst_VOP3(iFmt, "v_cmp_gt_f64", true)
17867  {
17868  setFlag(ALU);
17869  setFlag(F64);
17870  } // Inst_VOP3__V_CMP_GT_F64
17871 
17873  {
17874  } // ~Inst_VOP3__V_CMP_GT_F64
17875 
17876  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
17877  void
17879  {
17880  Wavefront *wf = gpuDynInst->wavefront();
17881  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
17882  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
17883  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17884 
17885  src0.readSrc();
17886  src1.readSrc();
17887 
17888  if (instData.ABS & 0x1) {
17889  src0.absModifier();
17890  }
17891 
17892  if (instData.ABS & 0x2) {
17893  src1.absModifier();
17894  }
17895 
17896  if (extData.NEG & 0x1) {
17897  src0.negModifier();
17898  }
17899 
17900  if (extData.NEG & 0x2) {
17901  src1.negModifier();
17902  }
17903 
17907  assert(!(instData.ABS & 0x4));
17908  assert(!(extData.NEG & 0x4));
17909 
17910  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17911  if (wf->execMask(lane)) {
17912  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
17913  }
17914  }
17915 
17916  sdst.write();
17917  }
17918 
17920  InFmt_VOP3 *iFmt)
17921  : Inst_VOP3(iFmt, "v_cmp_lg_f64", true)
17922  {
17923  setFlag(ALU);
17924  setFlag(F64);
17925  } // Inst_VOP3__V_CMP_LG_F64
17926 
17928  {
17929  } // ~Inst_VOP3__V_CMP_LG_F64
17930 
17931  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
17932  void
17934  {
17935  Wavefront *wf = gpuDynInst->wavefront();
17936  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
17937  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
17938  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17939 
17940  src0.readSrc();
17941  src1.readSrc();
17942 
17943  if (instData.ABS & 0x1) {
17944  src0.absModifier();
17945  }
17946 
17947  if (instData.ABS & 0x2) {
17948  src1.absModifier();
17949  }
17950 
17951  if (extData.NEG & 0x1) {
17952  src0.negModifier();
17953  }
17954 
17955  if (extData.NEG & 0x2) {
17956  src1.negModifier();
17957  }
17958 
17962  assert(!(instData.ABS & 0x4));
17963  assert(!(extData.NEG & 0x4));
17964 
17965  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
17966  if (wf->execMask(lane)) {
17967  sdst.setBit(lane, (src0[lane] < src1[lane]
17968  || src0[lane] > src1[lane]) ? 1 : 0);
17969  }
17970  }
17971 
17972  sdst.write();
17973  }
17974 
17976  InFmt_VOP3 *iFmt)
17977  : Inst_VOP3(iFmt, "v_cmp_ge_f64", true)
17978  {
17979  setFlag(ALU);
17980  setFlag(F64);
17981  } // Inst_VOP3__V_CMP_GE_F64
17982 
17984  {
17985  } // ~Inst_VOP3__V_CMP_GE_F64
17986 
17987  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
17988  void
17990  {
17991  Wavefront *wf = gpuDynInst->wavefront();
17992  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
17993  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
17994  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
17995 
17996  src0.readSrc();
17997  src1.readSrc();
17998 
17999  if (instData.ABS & 0x1) {
18000  src0.absModifier();
18001  }
18002 
18003  if (instData.ABS & 0x2) {
18004  src1.absModifier();
18005  }
18006 
18007  if (extData.NEG & 0x1) {
18008  src0.negModifier();
18009  }
18010 
18011  if (extData.NEG & 0x2) {
18012  src1.negModifier();
18013  }
18014 
18018  assert(!(instData.ABS & 0x4));
18019  assert(!(extData.NEG & 0x4));
18020 
18021  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18022  if (wf->execMask(lane)) {
18023  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
18024  }
18025  }
18026 
18027  sdst.write();
18028  }
18029 
18031  : Inst_VOP3(iFmt, "v_cmp_o_f64", true)
18032  {
18033  setFlag(ALU);
18034  setFlag(F64);
18035  } // Inst_VOP3__V_CMP_O_F64
18036 
18038  {
18039  } // ~Inst_VOP3__V_CMP_O_F64
18040 
18041  // D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC encoding.
18042  void
18044  {
18045  Wavefront *wf = gpuDynInst->wavefront();
18046  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18047  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18048  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18049 
18050  src0.readSrc();
18051  src1.readSrc();
18052 
18053  if (instData.ABS & 0x1) {
18054  src0.absModifier();
18055  }
18056 
18057  if (instData.ABS & 0x2) {
18058  src1.absModifier();
18059  }
18060 
18061  if (extData.NEG & 0x1) {
18062  src0.negModifier();
18063  }
18064 
18065  if (extData.NEG & 0x2) {
18066  src1.negModifier();
18067  }
18068 
18072  assert(!(instData.ABS & 0x4));
18073  assert(!(extData.NEG & 0x4));
18074 
18075  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18076  if (wf->execMask(lane)) {
18077  sdst.setBit(lane, (!std::isnan(src0[lane])
18078  && !std::isnan(src1[lane])) ? 1 : 0);
18079  }
18080  }
18081 
18082  sdst.write();
18083  }
18084 
18086  : Inst_VOP3(iFmt, "v_cmp_u_f64", true)
18087  {
18088  setFlag(ALU);
18089  setFlag(F64);
18090  } // Inst_VOP3__V_CMP_U_F64
18091 
18093  {
18094  } // ~Inst_VOP3__V_CMP_U_F64
18095 
18096  // D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC encoding.
18097  void
18099  {
18100  Wavefront *wf = gpuDynInst->wavefront();
18101  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18102  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18103  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18104 
18105  src0.readSrc();
18106  src1.readSrc();
18107 
18108  if (instData.ABS & 0x1) {
18109  src0.absModifier();
18110  }
18111 
18112  if (instData.ABS & 0x2) {
18113  src1.absModifier();
18114  }
18115 
18116  if (extData.NEG & 0x1) {
18117  src0.negModifier();
18118  }
18119 
18120  if (extData.NEG & 0x2) {
18121  src1.negModifier();
18122  }
18123 
18127  assert(!(instData.ABS & 0x4));
18128  assert(!(extData.NEG & 0x4));
18129 
18130  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18131  if (wf->execMask(lane)) {
18132  sdst.setBit(lane, (std::isnan(src0[lane])
18133  || std::isnan(src1[lane])) ? 1 : 0);
18134  }
18135  }
18136 
18137  sdst.write();
18138  }
18139 
18141  InFmt_VOP3 *iFmt)
18142  : Inst_VOP3(iFmt, "v_cmp_nge_f64", true)
18143  {
18144  setFlag(ALU);
18145  setFlag(F64);
18146  } // Inst_VOP3__V_CMP_NGE_F64
18147 
18149  {
18150  } // ~Inst_VOP3__V_CMP_NGE_F64
18151 
18152  // D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
18153  void
18155  {
18156  Wavefront *wf = gpuDynInst->wavefront();
18157  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18158  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18159  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18160 
18161  src0.readSrc();
18162  src1.readSrc();
18163 
18164  if (instData.ABS & 0x1) {
18165  src0.absModifier();
18166  }
18167 
18168  if (instData.ABS & 0x2) {
18169  src1.absModifier();
18170  }
18171 
18172  if (extData.NEG & 0x1) {
18173  src0.negModifier();
18174  }
18175 
18176  if (extData.NEG & 0x2) {
18177  src1.negModifier();
18178  }
18179 
18183  assert(!(instData.ABS & 0x4));
18184  assert(!(extData.NEG & 0x4));
18185 
18186  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18187  if (wf->execMask(lane)) {
18188  sdst.setBit(lane, !(src0[lane] >= src1[lane]) ? 1 : 0);
18189  }
18190  }
18191 
18192  sdst.write();
18193  }
18194 
18196  InFmt_VOP3 *iFmt)
18197  : Inst_VOP3(iFmt, "v_cmp_nlg_f64", true)
18198  {
18199  setFlag(ALU);
18200  setFlag(F64);
18201  } // Inst_VOP3__V_CMP_NLG_F64
18202 
18204  {
18205  } // ~Inst_VOP3__V_CMP_NLG_F64
18206 
18207  // D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
18208  void
18210  {
18211  Wavefront *wf = gpuDynInst->wavefront();
18212  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18213  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18214  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18215 
18216  src0.readSrc();
18217  src1.readSrc();
18218 
18219  if (instData.ABS & 0x1) {
18220  src0.absModifier();
18221  }
18222 
18223  if (instData.ABS & 0x2) {
18224  src1.absModifier();
18225  }
18226 
18227  if (extData.NEG & 0x1) {
18228  src0.negModifier();
18229  }
18230 
18231  if (extData.NEG & 0x2) {
18232  src1.negModifier();
18233  }
18234 
18238  assert(!(instData.ABS & 0x4));
18239  assert(!(extData.NEG & 0x4));
18240 
18241  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18242  if (wf->execMask(lane)) {
18243  sdst.setBit(lane, !(src0[lane] < src1[lane]
18244  || src0[lane] > src1[lane]) ? 1 : 0);
18245  }
18246  }
18247 
18248  sdst.write();
18249  }
18250 
18252  InFmt_VOP3 *iFmt)
18253  : Inst_VOP3(iFmt, "v_cmp_ngt_f64", true)
18254  {
18255  setFlag(ALU);
18256  setFlag(F64);
18257  } // Inst_VOP3__V_CMP_NGT_F64
18258 
18260  {
18261  } // ~Inst_VOP3__V_CMP_NGT_F64
18262 
18263  // D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
18264  void
18266  {
18267  Wavefront *wf = gpuDynInst->wavefront();
18268  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18269  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18270  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18271 
18272  src0.readSrc();
18273  src1.readSrc();
18274 
18275  if (instData.ABS & 0x1) {
18276  src0.absModifier();
18277  }
18278 
18279  if (instData.ABS & 0x2) {
18280  src1.absModifier();
18281  }
18282 
18283  if (extData.NEG & 0x1) {
18284  src0.negModifier();
18285  }
18286 
18287  if (extData.NEG & 0x2) {
18288  src1.negModifier();
18289  }
18290 
18294  assert(!(instData.ABS & 0x4));
18295  assert(!(extData.NEG & 0x4));
18296 
18297  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18298  if (wf->execMask(lane)) {
18299  sdst.setBit(lane, !(src0[lane] > src1[lane]) ? 1 : 0);
18300  }
18301  }
18302 
18303  sdst.write();
18304  }
18305 
18307  InFmt_VOP3 *iFmt)
18308  : Inst_VOP3(iFmt, "v_cmp_nle_f64", true)
18309  {
18310  setFlag(ALU);
18311  setFlag(F64);
18312  } // Inst_VOP3__V_CMP_NLE_F64
18313 
18315  {
18316  } // ~Inst_VOP3__V_CMP_NLE_F64
18317 
18318  // D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
18319  void
18321  {
18322  Wavefront *wf = gpuDynInst->wavefront();
18323  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18324  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18325  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18326 
18327  src0.readSrc();
18328  src1.readSrc();
18329 
18330  if (instData.ABS & 0x1) {
18331  src0.absModifier();
18332  }
18333 
18334  if (instData.ABS & 0x2) {
18335  src1.absModifier();
18336  }
18337 
18338  if (extData.NEG & 0x1) {
18339  src0.negModifier();
18340  }
18341 
18342  if (extData.NEG & 0x2) {
18343  src1.negModifier();
18344  }
18345 
18349  assert(!(instData.ABS & 0x4));
18350  assert(!(extData.NEG & 0x4));
18351 
18352  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18353  if (wf->execMask(lane)) {
18354  sdst.setBit(lane, !(src0[lane] <= src1[lane]) ? 1 : 0);
18355  }
18356  }
18357 
18358  sdst.write();
18359  }
18360 
18362  InFmt_VOP3 *iFmt)
18363  : Inst_VOP3(iFmt, "v_cmp_neq_f64", true)
18364  {
18365  setFlag(ALU);
18366  setFlag(F64);
18367  } // Inst_VOP3__V_CMP_NEQ_F64
18368 
18370  {
18371  } // ~Inst_VOP3__V_CMP_NEQ_F64
18372 
18373  // D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
18374  void
18376  {
18377  Wavefront *wf = gpuDynInst->wavefront();
18378  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18379  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18380  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18381 
18382  src0.readSrc();
18383  src1.readSrc();
18384 
18385  if (instData.ABS & 0x1) {
18386  src0.absModifier();
18387  }
18388 
18389  if (instData.ABS & 0x2) {
18390  src1.absModifier();
18391  }
18392 
18393  if (extData.NEG & 0x1) {
18394  src0.negModifier();
18395  }
18396 
18397  if (extData.NEG & 0x2) {
18398  src1.negModifier();
18399  }
18400 
18404  assert(!(instData.ABS & 0x4));
18405  assert(!(extData.NEG & 0x4));
18406 
18407  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18408  if (wf->execMask(lane)) {
18409  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
18410  }
18411  }
18412 
18413  sdst.write();
18414  }
18415 
18417  InFmt_VOP3 *iFmt)
18418  : Inst_VOP3(iFmt, "v_cmp_nlt_f64", true)
18419  {
18420  setFlag(ALU);
18421  setFlag(F64);
18422  } // Inst_VOP3__V_CMP_NLT_F64
18423 
18425  {
18426  } // ~Inst_VOP3__V_CMP_NLT_F64
18427 
18428  // D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
18429  void
18431  {
18432  Wavefront *wf = gpuDynInst->wavefront();
18433  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18434  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18435  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18436 
18437  src0.readSrc();
18438  src1.readSrc();
18439 
18440  if (instData.ABS & 0x1) {
18441  src0.absModifier();
18442  }
18443 
18444  if (instData.ABS & 0x2) {
18445  src1.absModifier();
18446  }
18447 
18448  if (extData.NEG & 0x1) {
18449  src0.negModifier();
18450  }
18451 
18452  if (extData.NEG & 0x2) {
18453  src1.negModifier();
18454  }
18455 
18459  assert(!(instData.ABS & 0x4));
18460  assert(!(extData.NEG & 0x4));
18461 
18462  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18463  if (wf->execMask(lane)) {
18464  sdst.setBit(lane, !(src0[lane] < src1[lane]) ? 1 : 0);
18465  }
18466  }
18467 
18468  sdst.write();
18469  }
18470 
18472  InFmt_VOP3 *iFmt)
18473  : Inst_VOP3(iFmt, "v_cmp_tru_f64", true)
18474  {
18475  setFlag(ALU);
18476  setFlag(F64);
18477  } // Inst_VOP3__V_CMP_TRU_F64
18478 
18480  {
18481  } // ~Inst_VOP3__V_CMP_TRU_F64
18482 
18483  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
18484  void
18486  {
18487  Wavefront *wf = gpuDynInst->wavefront();
18488  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18489 
18490  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18491  if (wf->execMask(lane)) {
18492  sdst.setBit(lane, 1);
18493  }
18494  }
18495 
18496  sdst.write();
18497  }
18498 
18500  InFmt_VOP3 *iFmt)
18501  : Inst_VOP3(iFmt, "v_cmpx_f_f64", true)
18502  {
18503  setFlag(ALU);
18504  setFlag(F64);
18505  } // Inst_VOP3__V_CMPX_F_F64
18506 
18508  {
18509  } // ~Inst_VOP3__V_CMPX_F_F64
18510 
18511  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
18512  void
18514  {
18515  Wavefront *wf = gpuDynInst->wavefront();
18516  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18517 
18518  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18519  if (wf->execMask(lane)) {
18520  sdst.setBit(lane, 0);
18521  }
18522  }
18523 
18524  wf->execMask() = sdst.rawData();
18525  sdst.write();
18526  }
18527 
18529  InFmt_VOP3 *iFmt)
18530  : Inst_VOP3(iFmt, "v_cmpx_lt_f64", true)
18531  {
18532  setFlag(ALU);
18533  setFlag(F64);
18534  } // Inst_VOP3__V_CMPX_LT_F64
18535 
18537  {
18538  } // ~Inst_VOP3__V_CMPX_LT_F64
18539 
18540  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
18541  void
18543  {
18544  Wavefront *wf = gpuDynInst->wavefront();
18545  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18546  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18547  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18548 
18549  src0.readSrc();
18550  src1.readSrc();
18551 
18552  if (instData.ABS & 0x1) {
18553  src0.absModifier();
18554  }
18555 
18556  if (instData.ABS & 0x2) {
18557  src1.absModifier();
18558  }
18559 
18560  if (extData.NEG & 0x1) {
18561  src0.negModifier();
18562  }
18563 
18564  if (extData.NEG & 0x2) {
18565  src1.negModifier();
18566  }
18567 
18571  assert(!(instData.ABS & 0x4));
18572  assert(!(extData.NEG & 0x4));
18573 
18574  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18575  if (wf->execMask(lane)) {
18576  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
18577  }
18578  }
18579 
18580  wf->execMask() = sdst.rawData();
18581  sdst.write();
18582  }
18583 
18585  InFmt_VOP3 *iFmt)
18586  : Inst_VOP3(iFmt, "v_cmpx_eq_f64", true)
18587  {
18588  setFlag(ALU);
18589  setFlag(F64);
18590  } // Inst_VOP3__V_CMPX_EQ_F64
18591 
18593  {
18594  } // ~Inst_VOP3__V_CMPX_EQ_F64
18595 
18596  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
18597  void
18599  {
18600  Wavefront *wf = gpuDynInst->wavefront();
18601  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18602  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18603  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18604 
18605  src0.readSrc();
18606  src1.readSrc();
18607 
18608  if (instData.ABS & 0x1) {
18609  src0.absModifier();
18610  }
18611 
18612  if (instData.ABS & 0x2) {
18613  src1.absModifier();
18614  }
18615 
18616  if (extData.NEG & 0x1) {
18617  src0.negModifier();
18618  }
18619 
18620  if (extData.NEG & 0x2) {
18621  src1.negModifier();
18622  }
18623 
18627  assert(!(instData.ABS & 0x4));
18628  assert(!(extData.NEG & 0x4));
18629 
18630  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18631  if (wf->execMask(lane)) {
18632  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
18633  }
18634  }
18635 
18636  wf->execMask() = sdst.rawData();
18637  sdst.write();
18638  }
18639 
18641  InFmt_VOP3 *iFmt)
18642  : Inst_VOP3(iFmt, "v_cmpx_le_f64", true)
18643  {
18644  setFlag(ALU);
18645  setFlag(F64);
18646  } // Inst_VOP3__V_CMPX_LE_F64
18647 
18649  {
18650  } // ~Inst_VOP3__V_CMPX_LE_F64
18651 
18652  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
18653  void
18655  {
18656  Wavefront *wf = gpuDynInst->wavefront();
18657  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18658  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18659  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18660 
18661  src0.readSrc();
18662  src1.readSrc();
18663 
18664  if (instData.ABS & 0x1) {
18665  src0.absModifier();
18666  }
18667 
18668  if (instData.ABS & 0x2) {
18669  src1.absModifier();
18670  }
18671 
18672  if (extData.NEG & 0x1) {
18673  src0.negModifier();
18674  }
18675 
18676  if (extData.NEG & 0x2) {
18677  src1.negModifier();
18678  }
18679 
18683  assert(!(instData.ABS & 0x4));
18684  assert(!(extData.NEG & 0x4));
18685 
18686  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18687  if (wf->execMask(lane)) {
18688  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
18689  }
18690  }
18691 
18692  wf->execMask() = sdst.rawData();
18693  sdst.write();
18694  }
18695 
18697  InFmt_VOP3 *iFmt)
18698  : Inst_VOP3(iFmt, "v_cmpx_gt_f64", true)
18699  {
18700  setFlag(ALU);
18701  setFlag(F64);
18702  } // Inst_VOP3__V_CMPX_GT_F64
18703 
18705  {
18706  } // ~Inst_VOP3__V_CMPX_GT_F64
18707 
18708  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
18709  void
18711  {
18712  Wavefront *wf = gpuDynInst->wavefront();
18713  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18714  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18715  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18716 
18717  src0.readSrc();
18718  src1.readSrc();
18719 
18720  if (instData.ABS & 0x1) {
18721  src0.absModifier();
18722  }
18723 
18724  if (instData.ABS & 0x2) {
18725  src1.absModifier();
18726  }
18727 
18728  if (extData.NEG & 0x1) {
18729  src0.negModifier();
18730  }
18731 
18732  if (extData.NEG & 0x2) {
18733  src1.negModifier();
18734  }
18735 
18739  assert(!(instData.ABS & 0x4));
18740  assert(!(extData.NEG & 0x4));
18741 
18742  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18743  if (wf->execMask(lane)) {
18744  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
18745  }
18746  }
18747 
18748  wf->execMask() = sdst.rawData();
18749  sdst.write();
18750  }
18751 
18753  InFmt_VOP3 *iFmt)
18754  : Inst_VOP3(iFmt, "v_cmpx_lg_f64", true)
18755  {
18756  setFlag(ALU);
18757  setFlag(F64);
18758  } // Inst_VOP3__V_CMPX_LG_F64
18759 
18761  {
18762  } // ~Inst_VOP3__V_CMPX_LG_F64
18763 
18764  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
18765  void
18767  {
18768  Wavefront *wf = gpuDynInst->wavefront();
18769  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18770  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18771  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18772 
18773  src0.readSrc();
18774  src1.readSrc();
18775 
18776  if (instData.ABS & 0x1) {
18777  src0.absModifier();
18778  }
18779 
18780  if (instData.ABS & 0x2) {
18781  src1.absModifier();
18782  }
18783 
18784  if (extData.NEG & 0x1) {
18785  src0.negModifier();
18786  }
18787 
18788  if (extData.NEG & 0x2) {
18789  src1.negModifier();
18790  }
18791 
18795  assert(!(instData.ABS & 0x4));
18796  assert(!(extData.NEG & 0x4));
18797 
18798  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18799  if (wf->execMask(lane)) {
18800  sdst.setBit(lane, (src0[lane] < src1[lane]
18801  || src0[lane] > src1[lane]) ? 1 : 0);
18802  }
18803  }
18804 
18805  wf->execMask() = sdst.rawData();
18806  sdst.write();
18807  }
18808 
18810  InFmt_VOP3 *iFmt)
18811  : Inst_VOP3(iFmt, "v_cmpx_ge_f64", true)
18812  {
18813  setFlag(ALU);
18814  setFlag(F64);
18815  } // Inst_VOP3__V_CMPX_GE_F64
18816 
18818  {
18819  } // ~Inst_VOP3__V_CMPX_GE_F64
18820 
18821  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
18822  void
18824  {
18825  Wavefront *wf = gpuDynInst->wavefront();
18826  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18827  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18828  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18829 
18830  src0.readSrc();
18831  src1.readSrc();
18832 
18833  if (instData.ABS & 0x1) {
18834  src0.absModifier();
18835  }
18836 
18837  if (instData.ABS & 0x2) {
18838  src1.absModifier();
18839  }
18840 
18841  if (extData.NEG & 0x1) {
18842  src0.negModifier();
18843  }
18844 
18845  if (extData.NEG & 0x2) {
18846  src1.negModifier();
18847  }
18848 
18852  assert(!(instData.ABS & 0x4));
18853  assert(!(extData.NEG & 0x4));
18854 
18855  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18856  if (wf->execMask(lane)) {
18857  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
18858  }
18859  }
18860 
18861  wf->execMask() = sdst.rawData();
18862  sdst.write();
18863  }
18864 
18866  InFmt_VOP3 *iFmt)
18867  : Inst_VOP3(iFmt, "v_cmpx_o_f64", true)
18868  {
18869  setFlag(ALU);
18870  setFlag(F64);
18871  } // Inst_VOP3__V_CMPX_O_F64
18872 
18874  {
18875  } // ~Inst_VOP3__V_CMPX_O_F64
18876 
18877  // EXEC,D.u64[threadID] = (!isNan(S0) && !isNan(S1)); D = VCC in VOPC
18878  // encoding.
18879  void
18881  {
18882  Wavefront *wf = gpuDynInst->wavefront();
18883  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18884  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18885  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18886 
18887  src0.readSrc();
18888  src1.readSrc();
18889 
18890  if (instData.ABS & 0x1) {
18891  src0.absModifier();
18892  }
18893 
18894  if (instData.ABS & 0x2) {
18895  src1.absModifier();
18896  }
18897 
18898  if (extData.NEG & 0x1) {
18899  src0.negModifier();
18900  }
18901 
18902  if (extData.NEG & 0x2) {
18903  src1.negModifier();
18904  }
18905 
18909  assert(!(instData.ABS & 0x4));
18910  assert(!(extData.NEG & 0x4));
18911 
18912  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18913  if (wf->execMask(lane)) {
18914  sdst.setBit(lane, (!std::isnan(src0[lane])
18915  && !std::isnan(src1[lane])) ? 1 : 0);
18916  }
18917  }
18918 
18919  wf->execMask() = sdst.rawData();
18920  sdst.write();
18921  }
18922 
18924  InFmt_VOP3 *iFmt)
18925  : Inst_VOP3(iFmt, "v_cmpx_u_f64", true)
18926  {
18927  setFlag(ALU);
18928  setFlag(F64);
18929  } // Inst_VOP3__V_CMPX_U_F64
18930 
18932  {
18933  } // ~Inst_VOP3__V_CMPX_U_F64
18934 
18935  // EXEC,D.u64[threadID] = (isNan(S0) || isNan(S1)); D = VCC in VOPC
18936  // encoding.
18937  void
18939  {
18940  Wavefront *wf = gpuDynInst->wavefront();
18941  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18942  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
18943  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
18944 
18945  src0.readSrc();
18946  src1.readSrc();
18947 
18948  if (instData.ABS & 0x1) {
18949  src0.absModifier();
18950  }
18951 
18952  if (instData.ABS & 0x2) {
18953  src1.absModifier();
18954  }
18955 
18956  if (extData.NEG & 0x1) {
18957  src0.negModifier();
18958  }
18959 
18960  if (extData.NEG & 0x2) {
18961  src1.negModifier();
18962  }
18963 
18967  assert(!(instData.ABS & 0x4));
18968  assert(!(extData.NEG & 0x4));
18969 
18970  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
18971  if (wf->execMask(lane)) {
18972  sdst.setBit(lane, (std::isnan(src0[lane])
18973  || std::isnan(src1[lane])) ? 1 : 0);
18974  }
18975  }
18976 
18977  wf->execMask() = sdst.rawData();
18978  sdst.write();
18979  }
18980 
18982  InFmt_VOP3 *iFmt)
18983  : Inst_VOP3(iFmt, "v_cmpx_nge_f64", true)
18984  {
18985  setFlag(ALU);
18986  setFlag(F64);
18987  } // Inst_VOP3__V_CMPX_NGE_F64
18988 
18990  {
18991  } // ~Inst_VOP3__V_CMPX_NGE_F64
18992 
18993  // EXEC,D.u64[threadID] = !(S0 >= S1); D = VCC in VOPC encoding.
18994  void
18996  {
18997  Wavefront *wf = gpuDynInst->wavefront();
18998  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
18999  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
19000  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19001 
19002  src0.readSrc();
19003  src1.readSrc();
19004 
19005  if (instData.ABS & 0x1) {
19006  src0.absModifier();
19007  }
19008 
19009  if (instData.ABS & 0x2) {
19010  src1.absModifier();
19011  }
19012 
19013  if (extData.NEG & 0x1) {
19014  src0.negModifier();
19015  }
19016 
19017  if (extData.NEG & 0x2) {
19018  src1.negModifier();
19019  }
19020 
19024  assert(!(instData.ABS & 0x4));
19025  assert(!(extData.NEG & 0x4));
19026 
19027  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19028  if (wf->execMask(lane)) {
19029  sdst.setBit(lane, !(src0[lane] >= src1[lane]) ? 1 : 0);
19030  }
19031  }
19032 
19033  wf->execMask() = sdst.rawData();
19034  sdst.write();
19035  }
19036 
19038  InFmt_VOP3 *iFmt)
19039  : Inst_VOP3(iFmt, "v_cmpx_nlg_f64", true)
19040  {
19041  setFlag(ALU);
19042  setFlag(F64);
19043  } // Inst_VOP3__V_CMPX_NLG_F64
19044 
19046  {
19047  } // ~Inst_VOP3__V_CMPX_NLG_F64
19048 
19049  // EXEC,D.u64[threadID] = !(S0 <> S1); D = VCC in VOPC encoding.
19050  void
19052  {
19053  Wavefront *wf = gpuDynInst->wavefront();
19054  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
19055  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
19056  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19057 
19058  src0.readSrc();
19059  src1.readSrc();
19060 
19061  if (instData.ABS & 0x1) {
19062  src0.absModifier();
19063  }
19064 
19065  if (instData.ABS & 0x2) {
19066  src1.absModifier();
19067  }
19068 
19069  if (extData.NEG & 0x1) {
19070  src0.negModifier();
19071  }
19072 
19073  if (extData.NEG & 0x2) {
19074  src1.negModifier();
19075  }
19076 
19080  assert(!(instData.ABS & 0x4));
19081  assert(!(extData.NEG & 0x4));
19082 
19083  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19084  if (wf->execMask(lane)) {
19085  sdst.setBit(lane, !(src0[lane] < src1[lane]
19086  || src0[lane] > src1[lane]) ? 1 : 0);
19087  }
19088  }
19089 
19090  wf->execMask() = sdst.rawData();
19091  sdst.write();
19092  }
19093 
19095  InFmt_VOP3 *iFmt)
19096  : Inst_VOP3(iFmt, "v_cmpx_ngt_f64", true)
19097  {
19098  setFlag(ALU);
19099  setFlag(F64);
19100  } // Inst_VOP3__V_CMPX_NGT_F64
19101 
19103  {
19104  } // ~Inst_VOP3__V_CMPX_NGT_F64
19105 
19106  // EXEC,D.u64[threadID] = !(S0 > S1); D = VCC in VOPC encoding.
19107  void
19109  {
19110  Wavefront *wf = gpuDynInst->wavefront();
19111  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
19112  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
19113  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19114 
19115  src0.readSrc();
19116  src1.readSrc();
19117 
19118  if (instData.ABS & 0x1) {
19119  src0.absModifier();
19120  }
19121 
19122  if (instData.ABS & 0x2) {
19123  src1.absModifier();
19124  }
19125 
19126  if (extData.NEG & 0x1) {
19127  src0.negModifier();
19128  }
19129 
19130  if (extData.NEG & 0x2) {
19131  src1.negModifier();
19132  }
19133 
19137  assert(!(instData.ABS & 0x4));
19138  assert(!(extData.NEG & 0x4));
19139 
19140  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19141  if (wf->execMask(lane)) {
19142  sdst.setBit(lane, !(src0[lane] > src1[lane]) ? 1 : 0);
19143  }
19144  }
19145 
19146  wf->execMask() = sdst.rawData();
19147  sdst.write();
19148  }
19149 
19151  InFmt_VOP3 *iFmt)
19152  : Inst_VOP3(iFmt, "v_cmpx_nle_f64", true)
19153  {
19154  setFlag(ALU);
19155  setFlag(F64);
19156  } // Inst_VOP3__V_CMPX_NLE_F64
19157 
19159  {
19160  } // ~Inst_VOP3__V_CMPX_NLE_F64
19161 
19162  // EXEC,D.u64[threadID] = !(S0 <= S1); D = VCC in VOPC encoding.
19163  void
19165  {
19166  Wavefront *wf = gpuDynInst->wavefront();
19167  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
19168  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
19169  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19170 
19171  src0.readSrc();
19172  src1.readSrc();
19173 
19174  if (instData.ABS & 0x1) {
19175  src0.absModifier();
19176  }
19177 
19178  if (instData.ABS & 0x2) {
19179  src1.absModifier();
19180  }
19181 
19182  if (extData.NEG & 0x1) {
19183  src0.negModifier();
19184  }
19185 
19186  if (extData.NEG & 0x2) {
19187  src1.negModifier();
19188  }
19189 
19193  assert(!(instData.ABS & 0x4));
19194  assert(!(extData.NEG & 0x4));
19195 
19196  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19197  if (wf->execMask(lane)) {
19198  sdst.setBit(lane, !(src0[lane] <= src1[lane]) ? 1 : 0);
19199  }
19200  }
19201 
19202  wf->execMask() = sdst.rawData();
19203  sdst.write();
19204  }
19205 
19207  InFmt_VOP3 *iFmt)
19208  : Inst_VOP3(iFmt, "v_cmpx_neq_f64", true)
19209  {
19210  setFlag(ALU);
19211  setFlag(F64);
19212  } // Inst_VOP3__V_CMPX_NEQ_F64
19213 
19215  {
19216  } // ~Inst_VOP3__V_CMPX_NEQ_F64
19217 
19218  // EXEC,D.u64[threadID] = !(S0 == S1); D = VCC in VOPC encoding.
19219  void
19221  {
19222  Wavefront *wf = gpuDynInst->wavefront();
19223  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
19224  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
19225  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19226 
19227  src0.readSrc();
19228  src1.readSrc();
19229 
19230  if (instData.ABS & 0x1) {
19231  src0.absModifier();
19232  }
19233 
19234  if (instData.ABS & 0x2) {
19235  src1.absModifier();
19236  }
19237 
19238  if (extData.NEG & 0x1) {
19239  src0.negModifier();
19240  }
19241 
19242  if (extData.NEG & 0x2) {
19243  src1.negModifier();
19244  }
19245 
19249  assert(!(instData.ABS & 0x4));
19250  assert(!(extData.NEG & 0x4));
19251 
19252  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19253  if (wf->execMask(lane)) {
19254  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
19255  }
19256  }
19257 
19258  wf->execMask() = sdst.rawData();
19259  sdst.write();
19260  }
19261 
19263  InFmt_VOP3 *iFmt)
19264  : Inst_VOP3(iFmt, "v_cmpx_nlt_f64", true)
19265  {
19266  setFlag(ALU);
19267  setFlag(F64);
19268  } // Inst_VOP3__V_CMPX_NLT_F64
19269 
19271  {
19272  } // ~Inst_VOP3__V_CMPX_NLT_F64
19273 
19274  // EXEC,D.u64[threadID] = !(S0 < S1); D = VCC in VOPC encoding.
19275  void
19277  {
19278  Wavefront *wf = gpuDynInst->wavefront();
19279  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
19280  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
19281  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19282 
19283  src0.readSrc();
19284  src1.readSrc();
19285 
19286  if (instData.ABS & 0x1) {
19287  src0.absModifier();
19288  }
19289 
19290  if (instData.ABS & 0x2) {
19291  src1.absModifier();
19292  }
19293 
19294  if (extData.NEG & 0x1) {
19295  src0.negModifier();
19296  }
19297 
19298  if (extData.NEG & 0x2) {
19299  src1.negModifier();
19300  }
19301 
19305  assert(!(instData.ABS & 0x4));
19306  assert(!(extData.NEG & 0x4));
19307 
19308  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19309  if (wf->execMask(lane)) {
19310  sdst.setBit(lane, !(src0[lane] < src1[lane]) ? 1 : 0);
19311  }
19312  }
19313 
19314  wf->execMask() = sdst.rawData();
19315  sdst.write();
19316  }
19317 
19319  InFmt_VOP3 *iFmt)
19320  : Inst_VOP3(iFmt, "v_cmpx_tru_f64", true)
19321  {
19322  setFlag(ALU);
19323  setFlag(F64);
19324  } // Inst_VOP3__V_CMPX_TRU_F64
19325 
19327  {
19328  } // ~Inst_VOP3__V_CMPX_TRU_F64
19329 
19330  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
19331  void
19333  {
19334  Wavefront *wf = gpuDynInst->wavefront();
19335  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19336 
19337  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19338  if (wf->execMask(lane)) {
19339  sdst.setBit(lane, 1);
19340  }
19341  }
19342 
19343  wf->execMask() = sdst.rawData();
19344  sdst.write();
19345  }
19346 
19348  : Inst_VOP3(iFmt, "v_cmp_f_i16", true)
19349  {
19350  setFlag(ALU);
19351  } // Inst_VOP3__V_CMP_F_I16
19352 
19354  {
19355  } // ~Inst_VOP3__V_CMP_F_I16
19356 
19357  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
19358  void
19360  {
19361  Wavefront *wf = gpuDynInst->wavefront();
19362  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19363 
19364  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19365  if (wf->execMask(lane)) {
19366  sdst.setBit(lane, 0);
19367  }
19368  }
19369 
19370  sdst.write();
19371  }
19372 
19374  InFmt_VOP3 *iFmt)
19375  : Inst_VOP3(iFmt, "v_cmp_lt_i16", true)
19376  {
19377  setFlag(ALU);
19378  } // Inst_VOP3__V_CMP_LT_I16
19379 
19381  {
19382  } // ~Inst_VOP3__V_CMP_LT_I16
19383 
19384  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
19385  void
19387  {
19388  Wavefront *wf = gpuDynInst->wavefront();
19389  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
19390  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
19391  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19392 
19393  src0.readSrc();
19394  src1.readSrc();
19395 
19399  assert(!(instData.ABS & 0x1));
19400  assert(!(instData.ABS & 0x2));
19401  assert(!(instData.ABS & 0x4));
19402  assert(!(extData.NEG & 0x1));
19403  assert(!(extData.NEG & 0x2));
19404  assert(!(extData.NEG & 0x4));
19405 
19406  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19407  if (wf->execMask(lane)) {
19408  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
19409  }
19410  }
19411 
19412  sdst.write();
19413  }
19414 
19416  InFmt_VOP3 *iFmt)
19417  : Inst_VOP3(iFmt, "v_cmp_eq_i16", true)
19418  {
19419  setFlag(ALU);
19420  } // Inst_VOP3__V_CMP_EQ_I16
19421 
19423  {
19424  } // ~Inst_VOP3__V_CMP_EQ_I16
19425 
19426  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
19427  void
19429  {
19430  Wavefront *wf = gpuDynInst->wavefront();
19431  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
19432  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
19433  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19434 
19435  src0.readSrc();
19436  src1.readSrc();
19437 
19441  assert(!(instData.ABS & 0x1));
19442  assert(!(instData.ABS & 0x2));
19443  assert(!(instData.ABS & 0x4));
19444  assert(!(extData.NEG & 0x1));
19445  assert(!(extData.NEG & 0x2));
19446  assert(!(extData.NEG & 0x4));
19447 
19448  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19449  if (wf->execMask(lane)) {
19450  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
19451  }
19452  }
19453 
19454  sdst.write();
19455  }
19456 
19458  InFmt_VOP3 *iFmt)
19459  : Inst_VOP3(iFmt, "v_cmp_le_i16", true)
19460  {
19461  setFlag(ALU);
19462  } // Inst_VOP3__V_CMP_LE_I16
19463 
19465  {
19466  } // ~Inst_VOP3__V_CMP_LE_I16
19467 
19468  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
19469  void
19471  {
19472  Wavefront *wf = gpuDynInst->wavefront();
19473  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
19474  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
19475  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19476 
19477  src0.readSrc();
19478  src1.readSrc();
19479 
19483  assert(!(instData.ABS & 0x1));
19484  assert(!(instData.ABS & 0x2));
19485  assert(!(instData.ABS & 0x4));
19486  assert(!(extData.NEG & 0x1));
19487  assert(!(extData.NEG & 0x2));
19488  assert(!(extData.NEG & 0x4));
19489 
19490  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19491  if (wf->execMask(lane)) {
19492  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
19493  }
19494  }
19495 
19496  sdst.write();
19497  }
19498 
19500  InFmt_VOP3 *iFmt)
19501  : Inst_VOP3(iFmt, "v_cmp_gt_i16", true)
19502  {
19503  setFlag(ALU);
19504  } // Inst_VOP3__V_CMP_GT_I16
19505 
19507  {
19508  } // ~Inst_VOP3__V_CMP_GT_I16
19509 
19510  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
19511  void
19513  {
19514  Wavefront *wf = gpuDynInst->wavefront();
19515  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
19516  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
19517  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19518 
19519  src0.readSrc();
19520  src1.readSrc();
19521 
19525  assert(!(instData.ABS & 0x1));
19526  assert(!(instData.ABS & 0x2));
19527  assert(!(instData.ABS & 0x4));
19528  assert(!(extData.NEG & 0x1));
19529  assert(!(extData.NEG & 0x2));
19530  assert(!(extData.NEG & 0x4));
19531 
19532  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19533  if (wf->execMask(lane)) {
19534  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
19535  }
19536  }
19537 
19538  sdst.write();
19539  }
19540 
19542  InFmt_VOP3 *iFmt)
19543  : Inst_VOP3(iFmt, "v_cmp_ne_i16", true)
19544  {
19545  setFlag(ALU);
19546  } // Inst_VOP3__V_CMP_NE_I16
19547 
19549  {
19550  } // ~Inst_VOP3__V_CMP_NE_I16
19551 
19552  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
19553  void
19555  {
19556  Wavefront *wf = gpuDynInst->wavefront();
19557  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
19558  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
19559  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19560 
19561  src0.readSrc();
19562  src1.readSrc();
19563 
19567  assert(!(instData.ABS & 0x1));
19568  assert(!(instData.ABS & 0x2));
19569  assert(!(instData.ABS & 0x4));
19570  assert(!(extData.NEG & 0x1));
19571  assert(!(extData.NEG & 0x2));
19572  assert(!(extData.NEG & 0x4));
19573 
19574  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19575  if (wf->execMask(lane)) {
19576  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
19577  }
19578  }
19579 
19580  sdst.write();
19581  }
19582 
19584  InFmt_VOP3 *iFmt)
19585  : Inst_VOP3(iFmt, "v_cmp_ge_i16", true)
19586  {
19587  setFlag(ALU);
19588  } // Inst_VOP3__V_CMP_GE_I16
19589 
19591  {
19592  } // ~Inst_VOP3__V_CMP_GE_I16
19593 
19594  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
19595  void
19597  {
19598  Wavefront *wf = gpuDynInst->wavefront();
19599  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
19600  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
19601  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19602 
19603  src0.readSrc();
19604  src1.readSrc();
19605 
19609  assert(!(instData.ABS & 0x1));
19610  assert(!(instData.ABS & 0x2));
19611  assert(!(instData.ABS & 0x4));
19612  assert(!(extData.NEG & 0x1));
19613  assert(!(extData.NEG & 0x2));
19614  assert(!(extData.NEG & 0x4));
19615 
19616  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19617  if (wf->execMask(lane)) {
19618  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
19619  }
19620  }
19621 
19622  sdst.write();
19623  }
19624 
19626  : Inst_VOP3(iFmt, "v_cmp_t_i16", true)
19627  {
19628  setFlag(ALU);
19629  } // Inst_VOP3__V_CMP_T_I16
19630 
19632  {
19633  } // ~Inst_VOP3__V_CMP_T_I16
19634 
19635  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
19636  void
19638  {
19639  Wavefront *wf = gpuDynInst->wavefront();
19640  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19641 
19642  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19643  if (wf->execMask(lane)) {
19644  sdst.setBit(lane, 1);
19645  }
19646  }
19647 
19648  sdst.write();
19649  }
19650 
19652  : Inst_VOP3(iFmt, "v_cmp_f_u16", true)
19653  {
19654  setFlag(ALU);
19655  } // Inst_VOP3__V_CMP_F_U16
19656 
19658  {
19659  } // ~Inst_VOP3__V_CMP_F_U16
19660 
19661  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
19662  void
19664  {
19665  Wavefront *wf = gpuDynInst->wavefront();
19666  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19667 
19668  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19669  if (wf->execMask(lane)) {
19670  sdst.setBit(lane, 0);
19671  }
19672  }
19673 
19674  sdst.write();
19675  }
19676 
19678  InFmt_VOP3 *iFmt)
19679  : Inst_VOP3(iFmt, "v_cmp_lt_u16", true)
19680  {
19681  setFlag(ALU);
19682  } // Inst_VOP3__V_CMP_LT_U16
19683 
19685  {
19686  } // ~Inst_VOP3__V_CMP_LT_U16
19687 
19688  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
19689  void
19691  {
19692  Wavefront *wf = gpuDynInst->wavefront();
19693  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
19694  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
19695  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19696 
19697  src0.readSrc();
19698  src1.readSrc();
19699 
19703  assert(!(instData.ABS & 0x1));
19704  assert(!(instData.ABS & 0x2));
19705  assert(!(instData.ABS & 0x4));
19706  assert(!(extData.NEG & 0x1));
19707  assert(!(extData.NEG & 0x2));
19708  assert(!(extData.NEG & 0x4));
19709 
19710  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19711  if (wf->execMask(lane)) {
19712  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
19713  }
19714  }
19715 
19716  sdst.write();
19717  }
19718 
19720  InFmt_VOP3 *iFmt)
19721  : Inst_VOP3(iFmt, "v_cmp_eq_u16", true)
19722  {
19723  setFlag(ALU);
19724  } // Inst_VOP3__V_CMP_EQ_U16
19725 
19727  {
19728  } // ~Inst_VOP3__V_CMP_EQ_U16
19729 
19730  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
19731  void
19733  {
19734  Wavefront *wf = gpuDynInst->wavefront();
19735  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
19736  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
19737  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19738 
19739  src0.readSrc();
19740  src1.readSrc();
19741 
19745  assert(!(instData.ABS & 0x1));
19746  assert(!(instData.ABS & 0x2));
19747  assert(!(instData.ABS & 0x4));
19748  assert(!(extData.NEG & 0x1));
19749  assert(!(extData.NEG & 0x2));
19750  assert(!(extData.NEG & 0x4));
19751 
19752  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19753  if (wf->execMask(lane)) {
19754  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
19755  }
19756  }
19757 
19758  sdst.write();
19759  }
19760 
19762  InFmt_VOP3 *iFmt)
19763  : Inst_VOP3(iFmt, "v_cmp_le_u16", true)
19764  {
19765  setFlag(ALU);
19766  } // Inst_VOP3__V_CMP_LE_U16
19767 
19769  {
19770  } // ~Inst_VOP3__V_CMP_LE_U16
19771 
19772  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
19773  void
19775  {
19776  Wavefront *wf = gpuDynInst->wavefront();
19777  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
19778  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
19779  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19780 
19781  src0.readSrc();
19782  src1.readSrc();
19783 
19787  assert(!(instData.ABS & 0x1));
19788  assert(!(instData.ABS & 0x2));
19789  assert(!(instData.ABS & 0x4));
19790  assert(!(extData.NEG & 0x1));
19791  assert(!(extData.NEG & 0x2));
19792  assert(!(extData.NEG & 0x4));
19793 
19794  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19795  if (wf->execMask(lane)) {
19796  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
19797  }
19798  }
19799 
19800  sdst.write();
19801  }
19802 
19804  InFmt_VOP3 *iFmt)
19805  : Inst_VOP3(iFmt, "v_cmp_gt_u16", true)
19806  {
19807  setFlag(ALU);
19808  } // Inst_VOP3__V_CMP_GT_U16
19809 
19811  {
19812  } // ~Inst_VOP3__V_CMP_GT_U16
19813 
19814  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
19815  void
19817  {
19818  Wavefront *wf = gpuDynInst->wavefront();
19819  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
19820  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
19821  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19822 
19823  src0.readSrc();
19824  src1.readSrc();
19825 
19829  assert(!(instData.ABS & 0x1));
19830  assert(!(instData.ABS & 0x2));
19831  assert(!(instData.ABS & 0x4));
19832  assert(!(extData.NEG & 0x1));
19833  assert(!(extData.NEG & 0x2));
19834  assert(!(extData.NEG & 0x4));
19835 
19836  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19837  if (wf->execMask(lane)) {
19838  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
19839  }
19840  }
19841 
19842  sdst.write();
19843  }
19844 
19846  InFmt_VOP3 *iFmt)
19847  : Inst_VOP3(iFmt, "v_cmp_ne_u16", true)
19848  {
19849  setFlag(ALU);
19850  } // Inst_VOP3__V_CMP_NE_U16
19851 
19853  {
19854  } // ~Inst_VOP3__V_CMP_NE_U16
19855 
19856  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
19857  void
19859  {
19860  Wavefront *wf = gpuDynInst->wavefront();
19861  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
19862  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
19863  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19864 
19865  src0.readSrc();
19866  src1.readSrc();
19867 
19871  assert(!(instData.ABS & 0x1));
19872  assert(!(instData.ABS & 0x2));
19873  assert(!(instData.ABS & 0x4));
19874  assert(!(extData.NEG & 0x1));
19875  assert(!(extData.NEG & 0x2));
19876  assert(!(extData.NEG & 0x4));
19877 
19878  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19879  if (wf->execMask(lane)) {
19880  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
19881  }
19882  }
19883 
19884  sdst.write();
19885  }
19886 
19888  InFmt_VOP3 *iFmt)
19889  : Inst_VOP3(iFmt, "v_cmp_ge_u16", true)
19890  {
19891  setFlag(ALU);
19892  } // Inst_VOP3__V_CMP_GE_U16
19893 
19895  {
19896  } // ~Inst_VOP3__V_CMP_GE_U16
19897 
19898  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
19899  void
19901  {
19902  Wavefront *wf = gpuDynInst->wavefront();
19903  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
19904  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
19905  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19906 
19907  src0.readSrc();
19908  src1.readSrc();
19909 
19913  assert(!(instData.ABS & 0x1));
19914  assert(!(instData.ABS & 0x2));
19915  assert(!(instData.ABS & 0x4));
19916  assert(!(extData.NEG & 0x1));
19917  assert(!(extData.NEG & 0x2));
19918  assert(!(extData.NEG & 0x4));
19919 
19920  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19921  if (wf->execMask(lane)) {
19922  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
19923  }
19924  }
19925 
19926  sdst.write();
19927  }
19928 
19930  : Inst_VOP3(iFmt, "v_cmp_t_u16", true)
19931  {
19932  setFlag(ALU);
19933  } // Inst_VOP3__V_CMP_T_U16
19934 
19936  {
19937  } // ~Inst_VOP3__V_CMP_T_U16
19938 
19939  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
19940  void
19942  {
19943  Wavefront *wf = gpuDynInst->wavefront();
19944  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19945 
19946  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19947  if (wf->execMask(lane)) {
19948  sdst.setBit(lane, 1);
19949  }
19950  }
19951 
19952  sdst.write();
19953  }
19954 
19956  InFmt_VOP3 *iFmt)
19957  : Inst_VOP3(iFmt, "v_cmpx_f_i16", true)
19958  {
19959  setFlag(ALU);
19960  } // Inst_VOP3__V_CMPX_F_I16
19961 
19963  {
19964  } // ~Inst_VOP3__V_CMPX_F_I16
19965 
19966  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
19967  void
19969  {
19970  Wavefront *wf = gpuDynInst->wavefront();
19971  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
19972 
19973  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
19974  if (wf->execMask(lane)) {
19975  sdst.setBit(lane, 0);
19976  }
19977  }
19978 
19979  wf->execMask() = sdst.rawData();
19980  sdst.write();
19981  }
19982 
19984  InFmt_VOP3 *iFmt)
19985  : Inst_VOP3(iFmt, "v_cmpx_lt_i16", true)
19986  {
19987  setFlag(ALU);
19988  } // Inst_VOP3__V_CMPX_LT_I16
19989 
19991  {
19992  } // ~Inst_VOP3__V_CMPX_LT_I16
19993 
19994  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
19995  void
19997  {
19998  Wavefront *wf = gpuDynInst->wavefront();
19999  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
20000  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
20001  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20002 
20003  src0.readSrc();
20004  src1.readSrc();
20005 
20009  assert(!(instData.ABS & 0x1));
20010  assert(!(instData.ABS & 0x2));
20011  assert(!(instData.ABS & 0x4));
20012  assert(!(extData.NEG & 0x1));
20013  assert(!(extData.NEG & 0x2));
20014  assert(!(extData.NEG & 0x4));
20015 
20016  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20017  if (wf->execMask(lane)) {
20018  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
20019  }
20020  }
20021 
20022  wf->execMask() = sdst.rawData();
20023  sdst.write();
20024  }
20025 
20027  InFmt_VOP3 *iFmt)
20028  : Inst_VOP3(iFmt, "v_cmpx_eq_i16", true)
20029  {
20030  setFlag(ALU);
20031  } // Inst_VOP3__V_CMPX_EQ_I16
20032 
20034  {
20035  } // ~Inst_VOP3__V_CMPX_EQ_I16
20036 
20037  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
20038  void
20040  {
20041  Wavefront *wf = gpuDynInst->wavefront();
20042  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
20043  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
20044  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20045 
20046  src0.readSrc();
20047  src1.readSrc();
20048 
20052  assert(!(instData.ABS & 0x1));
20053  assert(!(instData.ABS & 0x2));
20054  assert(!(instData.ABS & 0x4));
20055  assert(!(extData.NEG & 0x1));
20056  assert(!(extData.NEG & 0x2));
20057  assert(!(extData.NEG & 0x4));
20058 
20059  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20060  if (wf->execMask(lane)) {
20061  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
20062  }
20063  }
20064 
20065  wf->execMask() = sdst.rawData();
20066  sdst.write();
20067  }
20068 
20070  InFmt_VOP3 *iFmt)
20071  : Inst_VOP3(iFmt, "v_cmpx_le_i16", true)
20072  {
20073  setFlag(ALU);
20074  } // Inst_VOP3__V_CMPX_LE_I16
20075 
20077  {
20078  } // ~Inst_VOP3__V_CMPX_LE_I16
20079 
20080  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
20081  void
20083  {
20084  Wavefront *wf = gpuDynInst->wavefront();
20085  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
20086  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
20087  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20088 
20089  src0.readSrc();
20090  src1.readSrc();
20091 
20095  assert(!(instData.ABS & 0x1));
20096  assert(!(instData.ABS & 0x2));
20097  assert(!(instData.ABS & 0x4));
20098  assert(!(extData.NEG & 0x1));
20099  assert(!(extData.NEG & 0x2));
20100  assert(!(extData.NEG & 0x4));
20101 
20102  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20103  if (wf->execMask(lane)) {
20104  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
20105  }
20106  }
20107 
20108  wf->execMask() = sdst.rawData();
20109  sdst.write();
20110  }
20111 
20113  InFmt_VOP3 *iFmt)
20114  : Inst_VOP3(iFmt, "v_cmpx_gt_i16", true)
20115  {
20116  setFlag(ALU);
20117  } // Inst_VOP3__V_CMPX_GT_I16
20118 
20120  {
20121  } // ~Inst_VOP3__V_CMPX_GT_I16
20122 
20123  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
20124  void
20126  {
20127  Wavefront *wf = gpuDynInst->wavefront();
20128  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
20129  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
20130  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20131 
20132  src0.readSrc();
20133  src1.readSrc();
20134 
20138  assert(!(instData.ABS & 0x1));
20139  assert(!(instData.ABS & 0x2));
20140  assert(!(instData.ABS & 0x4));
20141  assert(!(extData.NEG & 0x1));
20142  assert(!(extData.NEG & 0x2));
20143  assert(!(extData.NEG & 0x4));
20144 
20145  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20146  if (wf->execMask(lane)) {
20147  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
20148  }
20149  }
20150 
20151  wf->execMask() = sdst.rawData();
20152  sdst.write();
20153  }
20154 
20156  InFmt_VOP3 *iFmt)
20157  : Inst_VOP3(iFmt, "v_cmpx_ne_i16", true)
20158  {
20159  setFlag(ALU);
20160  } // Inst_VOP3__V_CMPX_NE_I16
20161 
20163  {
20164  } // ~Inst_VOP3__V_CMPX_NE_I16
20165 
20166  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
20167  void
20169  {
20170  Wavefront *wf = gpuDynInst->wavefront();
20171  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
20172  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
20173  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20174 
20175  src0.readSrc();
20176  src1.readSrc();
20177 
20181  assert(!(instData.ABS & 0x1));
20182  assert(!(instData.ABS & 0x2));
20183  assert(!(instData.ABS & 0x4));
20184  assert(!(extData.NEG & 0x1));
20185  assert(!(extData.NEG & 0x2));
20186  assert(!(extData.NEG & 0x4));
20187 
20188  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20189  if (wf->execMask(lane)) {
20190  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
20191  }
20192  }
20193 
20194  wf->execMask() = sdst.rawData();
20195  sdst.write();
20196  }
20197 
20199  InFmt_VOP3 *iFmt)
20200  : Inst_VOP3(iFmt, "v_cmpx_ge_i16", true)
20201  {
20202  setFlag(ALU);
20203  } // Inst_VOP3__V_CMPX_GE_I16
20204 
20206  {
20207  } // ~Inst_VOP3__V_CMPX_GE_I16
20208 
20209  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
20210  void
20212  {
20213  Wavefront *wf = gpuDynInst->wavefront();
20214  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
20215  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
20216  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20217 
20218  src0.readSrc();
20219  src1.readSrc();
20220 
20224  assert(!(instData.ABS & 0x1));
20225  assert(!(instData.ABS & 0x2));
20226  assert(!(instData.ABS & 0x4));
20227  assert(!(extData.NEG & 0x1));
20228  assert(!(extData.NEG & 0x2));
20229  assert(!(extData.NEG & 0x4));
20230 
20231  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20232  if (wf->execMask(lane)) {
20233  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
20234  }
20235  }
20236 
20237  wf->execMask() = sdst.rawData();
20238  sdst.write();
20239  }
20240 
20242  InFmt_VOP3 *iFmt)
20243  : Inst_VOP3(iFmt, "v_cmpx_t_i16", true)
20244  {
20245  setFlag(ALU);
20246  } // Inst_VOP3__V_CMPX_T_I16
20247 
20249  {
20250  } // ~Inst_VOP3__V_CMPX_T_I16
20251 
20252  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
20253  void
20255  {
20256  Wavefront *wf = gpuDynInst->wavefront();
20257  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20258 
20259  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20260  if (wf->execMask(lane)) {
20261  sdst.setBit(lane, 1);
20262  }
20263  }
20264 
20265  wf->execMask() = sdst.rawData();
20266  sdst.write();
20267  }
20268 
20270  InFmt_VOP3 *iFmt)
20271  : Inst_VOP3(iFmt, "v_cmpx_f_u16", true)
20272  {
20273  setFlag(ALU);
20274  } // Inst_VOP3__V_CMPX_F_U16
20275 
20277  {
20278  } // ~Inst_VOP3__V_CMPX_F_U16
20279 
20280  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
20281  void
20283  {
20284  Wavefront *wf = gpuDynInst->wavefront();
20285  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20286 
20287  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20288  if (wf->execMask(lane)) {
20289  sdst.setBit(lane, 0);
20290  }
20291  }
20292 
20293  wf->execMask() = sdst.rawData();
20294  sdst.write();
20295  }
20296 
20298  InFmt_VOP3 *iFmt)
20299  : Inst_VOP3(iFmt, "v_cmpx_lt_u16", true)
20300  {
20301  setFlag(ALU);
20302  } // Inst_VOP3__V_CMPX_LT_U16
20303 
20305  {
20306  } // ~Inst_VOP3__V_CMPX_LT_U16
20307 
20308  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
20309  void
20311  {
20312  Wavefront *wf = gpuDynInst->wavefront();
20313  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
20314  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
20315  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20316 
20317  src0.readSrc();
20318  src1.readSrc();
20319 
20323  assert(!(instData.ABS & 0x1));
20324  assert(!(instData.ABS & 0x2));
20325  assert(!(instData.ABS & 0x4));
20326  assert(!(extData.NEG & 0x1));
20327  assert(!(extData.NEG & 0x2));
20328  assert(!(extData.NEG & 0x4));
20329 
20330  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20331  if (wf->execMask(lane)) {
20332  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
20333  }
20334  }
20335 
20336  wf->execMask() = sdst.rawData();
20337  sdst.write();
20338  }
20339 
20341  InFmt_VOP3 *iFmt)
20342  : Inst_VOP3(iFmt, "v_cmpx_eq_u16", true)
20343  {
20344  setFlag(ALU);
20345  } // Inst_VOP3__V_CMPX_EQ_U16
20346 
20348  {
20349  } // ~Inst_VOP3__V_CMPX_EQ_U16
20350 
20351  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
20352  void
20354  {
20355  Wavefront *wf = gpuDynInst->wavefront();
20356  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
20357  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
20358  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20359 
20360  src0.readSrc();
20361  src1.readSrc();
20362 
20366  assert(!(instData.ABS & 0x1));
20367  assert(!(instData.ABS & 0x2));
20368  assert(!(instData.ABS & 0x4));
20369  assert(!(extData.NEG & 0x1));
20370  assert(!(extData.NEG & 0x2));
20371  assert(!(extData.NEG & 0x4));
20372 
20373  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20374  if (wf->execMask(lane)) {
20375  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
20376  }
20377  }
20378 
20379  wf->execMask() = sdst.rawData();
20380  sdst.write();
20381  }
20382 
20384  InFmt_VOP3 *iFmt)
20385  : Inst_VOP3(iFmt, "v_cmpx_le_u16", true)
20386  {
20387  setFlag(ALU);
20388  } // Inst_VOP3__V_CMPX_LE_U16
20389 
20391  {
20392  } // ~Inst_VOP3__V_CMPX_LE_U16
20393 
20394  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
20395  void
20397  {
20398  Wavefront *wf = gpuDynInst->wavefront();
20399  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
20400  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
20401  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20402 
20403  src0.readSrc();
20404  src1.readSrc();
20405 
20409  assert(!(instData.ABS & 0x1));
20410  assert(!(instData.ABS & 0x2));
20411  assert(!(instData.ABS & 0x4));
20412  assert(!(extData.NEG & 0x1));
20413  assert(!(extData.NEG & 0x2));
20414  assert(!(extData.NEG & 0x4));
20415 
20416  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20417  if (wf->execMask(lane)) {
20418  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
20419  }
20420  }
20421 
20422  wf->execMask() = sdst.rawData();
20423  sdst.write();
20424  }
20425 
20427  InFmt_VOP3 *iFmt)
20428  : Inst_VOP3(iFmt, "v_cmpx_gt_u16", true)
20429  {
20430  setFlag(ALU);
20431  } // Inst_VOP3__V_CMPX_GT_U16
20432 
20434  {
20435  } // ~Inst_VOP3__V_CMPX_GT_U16
20436 
20437  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
20438  void
20440  {
20441  Wavefront *wf = gpuDynInst->wavefront();
20442  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
20443  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
20444  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20445 
20446  src0.readSrc();
20447  src1.readSrc();
20448 
20452  assert(!(instData.ABS & 0x1));
20453  assert(!(instData.ABS & 0x2));
20454  assert(!(instData.ABS & 0x4));
20455  assert(!(extData.NEG & 0x1));
20456  assert(!(extData.NEG & 0x2));
20457  assert(!(extData.NEG & 0x4));
20458 
20459  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20460  if (wf->execMask(lane)) {
20461  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
20462  }
20463  }
20464 
20465  wf->execMask() = sdst.rawData();
20466  sdst.write();
20467  }
20468 
20470  InFmt_VOP3 *iFmt)
20471  : Inst_VOP3(iFmt, "v_cmpx_ne_u16", true)
20472  {
20473  setFlag(ALU);
20474  } // Inst_VOP3__V_CMPX_NE_U16
20475 
20477  {
20478  } // ~Inst_VOP3__V_CMPX_NE_U16
20479 
20480  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
20481  void
20483  {
20484  Wavefront *wf = gpuDynInst->wavefront();
20485  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
20486  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
20487  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20488 
20489  src0.readSrc();
20490  src1.readSrc();
20491 
20495  assert(!(instData.ABS & 0x1));
20496  assert(!(instData.ABS & 0x2));
20497  assert(!(instData.ABS & 0x4));
20498  assert(!(extData.NEG & 0x1));
20499  assert(!(extData.NEG & 0x2));
20500  assert(!(extData.NEG & 0x4));
20501 
20502  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20503  if (wf->execMask(lane)) {
20504  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
20505  }
20506  }
20507 
20508  wf->execMask() = sdst.rawData();
20509  sdst.write();
20510  }
20511 
20513  InFmt_VOP3 *iFmt)
20514  : Inst_VOP3(iFmt, "v_cmpx_ge_u16", true)
20515  {
20516  setFlag(ALU);
20517  } // Inst_VOP3__V_CMPX_GE_U16
20518 
20520  {
20521  } // ~Inst_VOP3__V_CMPX_GE_U16
20522 
20523  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
20524  void
20526  {
20527  Wavefront *wf = gpuDynInst->wavefront();
20528  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
20529  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
20530  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20531 
20532  src0.readSrc();
20533  src1.readSrc();
20534 
20538  assert(!(instData.ABS & 0x1));
20539  assert(!(instData.ABS & 0x2));
20540  assert(!(instData.ABS & 0x4));
20541  assert(!(extData.NEG & 0x1));
20542  assert(!(extData.NEG & 0x2));
20543  assert(!(extData.NEG & 0x4));
20544 
20545  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20546  if (wf->execMask(lane)) {
20547  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
20548  }
20549  }
20550 
20551  wf->execMask() = sdst.rawData();
20552  sdst.write();
20553  }
20554 
20556  InFmt_VOP3 *iFmt)
20557  : Inst_VOP3(iFmt, "v_cmpx_t_u16", true)
20558  {
20559  setFlag(ALU);
20560  } // Inst_VOP3__V_CMPX_T_U16
20561 
20563  {
20564  } // ~Inst_VOP3__V_CMPX_T_U16
20565 
20566  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
20567  void
20569  {
20570  Wavefront *wf = gpuDynInst->wavefront();
20571  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20572 
20573  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20574  if (wf->execMask(lane)) {
20575  sdst.setBit(lane, 1);
20576  }
20577  }
20578 
20579  wf->execMask() = sdst.rawData();
20580  sdst.write();
20581  }
20582 
20584  : Inst_VOP3(iFmt, "v_cmp_f_i32", true)
20585  {
20586  setFlag(ALU);
20587  } // Inst_VOP3__V_CMP_F_I32
20588 
20590  {
20591  } // ~Inst_VOP3__V_CMP_F_I32
20592 
20593  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
20594  void
20596  {
20597  Wavefront *wf = gpuDynInst->wavefront();
20598  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20599 
20600  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20601  if (wf->execMask(lane)) {
20602  sdst.setBit(lane, 0);
20603  }
20604  }
20605 
20606  sdst.write();
20607  }
20608 
20610  InFmt_VOP3 *iFmt)
20611  : Inst_VOP3(iFmt, "v_cmp_lt_i32", true)
20612  {
20613  setFlag(ALU);
20614  } // Inst_VOP3__V_CMP_LT_I32
20615 
20617  {
20618  } // ~Inst_VOP3__V_CMP_LT_I32
20619 
20620  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
20621  void
20623  {
20624  Wavefront *wf = gpuDynInst->wavefront();
20625  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
20626  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
20627  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20628 
20629  src0.readSrc();
20630  src1.readSrc();
20631 
20635  assert(!(instData.ABS & 0x1));
20636  assert(!(instData.ABS & 0x2));
20637  assert(!(instData.ABS & 0x4));
20638  assert(!(extData.NEG & 0x1));
20639  assert(!(extData.NEG & 0x2));
20640  assert(!(extData.NEG & 0x4));
20641 
20642  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20643  if (wf->execMask(lane)) {
20644  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
20645  }
20646  }
20647 
20648  sdst.write();
20649  }
20650 
20652  InFmt_VOP3 *iFmt)
20653  : Inst_VOP3(iFmt, "v_cmp_eq_i32", true)
20654  {
20655  setFlag(ALU);
20656  } // Inst_VOP3__V_CMP_EQ_I32
20657 
20659  {
20660  } // ~Inst_VOP3__V_CMP_EQ_I32
20661 
20662  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
20663  void
20665  {
20666  Wavefront *wf = gpuDynInst->wavefront();
20667  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
20668  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
20669  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20670 
20671  src0.readSrc();
20672  src1.readSrc();
20673 
20677  assert(!(instData.ABS & 0x1));
20678  assert(!(instData.ABS & 0x2));
20679  assert(!(instData.ABS & 0x4));
20680  assert(!(extData.NEG & 0x1));
20681  assert(!(extData.NEG & 0x2));
20682  assert(!(extData.NEG & 0x4));
20683 
20684  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20685  if (wf->execMask(lane)) {
20686  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
20687  }
20688  }
20689 
20690  sdst.write();
20691  }
20692 
20694  InFmt_VOP3 *iFmt)
20695  : Inst_VOP3(iFmt, "v_cmp_le_i32", true)
20696  {
20697  setFlag(ALU);
20698  } // Inst_VOP3__V_CMP_LE_I32
20699 
20701  {
20702  } // ~Inst_VOP3__V_CMP_LE_I32
20703 
20704  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
20705  void
20707  {
20708  Wavefront *wf = gpuDynInst->wavefront();
20709  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
20710  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
20711  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20712 
20713  src0.readSrc();
20714  src1.readSrc();
20715 
20719  assert(!(instData.ABS & 0x1));
20720  assert(!(instData.ABS & 0x2));
20721  assert(!(instData.ABS & 0x4));
20722  assert(!(extData.NEG & 0x1));
20723  assert(!(extData.NEG & 0x2));
20724  assert(!(extData.NEG & 0x4));
20725 
20726  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20727  if (wf->execMask(lane)) {
20728  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
20729  }
20730  }
20731 
20732  sdst.write();
20733  }
20734 
20736  InFmt_VOP3 *iFmt)
20737  : Inst_VOP3(iFmt, "v_cmp_gt_i32", true)
20738  {
20739  setFlag(ALU);
20740  } // Inst_VOP3__V_CMP_GT_I32
20741 
20743  {
20744  } // ~Inst_VOP3__V_CMP_GT_I32
20745 
20746  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
20747  void
20749  {
20750  Wavefront *wf = gpuDynInst->wavefront();
20751  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
20752  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
20753  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20754 
20755  src0.readSrc();
20756  src1.readSrc();
20757 
20761  assert(!(instData.ABS & 0x1));
20762  assert(!(instData.ABS & 0x2));
20763  assert(!(instData.ABS & 0x4));
20764  assert(!(extData.NEG & 0x1));
20765  assert(!(extData.NEG & 0x2));
20766  assert(!(extData.NEG & 0x4));
20767 
20768  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20769  if (wf->execMask(lane)) {
20770  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
20771  }
20772  }
20773 
20774  sdst.write();
20775  }
20776 
20778  InFmt_VOP3 *iFmt)
20779  : Inst_VOP3(iFmt, "v_cmp_ne_i32", true)
20780  {
20781  setFlag(ALU);
20782  } // Inst_VOP3__V_CMP_NE_I32
20783 
20785  {
20786  } // ~Inst_VOP3__V_CMP_NE_I32
20787 
20788  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
20789  void
20791  {
20792  Wavefront *wf = gpuDynInst->wavefront();
20793  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
20794  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
20795  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20796 
20797  src0.readSrc();
20798  src1.readSrc();
20799 
20803  assert(!(instData.ABS & 0x1));
20804  assert(!(instData.ABS & 0x2));
20805  assert(!(instData.ABS & 0x4));
20806  assert(!(extData.NEG & 0x1));
20807  assert(!(extData.NEG & 0x2));
20808  assert(!(extData.NEG & 0x4));
20809 
20810  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20811  if (wf->execMask(lane)) {
20812  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
20813  }
20814  }
20815 
20816  sdst.write();
20817  }
20818 
20820  InFmt_VOP3 *iFmt)
20821  : Inst_VOP3(iFmt, "v_cmp_ge_i32", true)
20822  {
20823  setFlag(ALU);
20824  } // Inst_VOP3__V_CMP_GE_I32
20825 
20827  {
20828  } // ~Inst_VOP3__V_CMP_GE_I32
20829 
20830  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
20831  void
20833  {
20834  Wavefront *wf = gpuDynInst->wavefront();
20835  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
20836  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
20837  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20838 
20839  src0.readSrc();
20840  src1.readSrc();
20841 
20845  assert(!(instData.ABS & 0x1));
20846  assert(!(instData.ABS & 0x2));
20847  assert(!(instData.ABS & 0x4));
20848  assert(!(extData.NEG & 0x1));
20849  assert(!(extData.NEG & 0x2));
20850  assert(!(extData.NEG & 0x4));
20851 
20852  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20853  if (wf->execMask(lane)) {
20854  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
20855  }
20856  }
20857 
20858  sdst.write();
20859  }
20860 
20862  : Inst_VOP3(iFmt, "v_cmp_t_i32", true)
20863  {
20864  setFlag(ALU);
20865  } // Inst_VOP3__V_CMP_T_I32
20866 
20868  {
20869  } // ~Inst_VOP3__V_CMP_T_I32
20870 
20871  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
20872  void
20874  {
20875  Wavefront *wf = gpuDynInst->wavefront();
20876  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20877 
20878  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20879  if (wf->execMask(lane)) {
20880  sdst.setBit(lane, 1);
20881  }
20882  }
20883 
20884  sdst.write();
20885  }
20886 
20888  : Inst_VOP3(iFmt, "v_cmp_f_u32", true)
20889  {
20890  setFlag(ALU);
20891  } // Inst_VOP3__V_CMP_F_U32
20892 
20894  {
20895  } // ~Inst_VOP3__V_CMP_F_U32
20896 
20897  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
20898  void
20900  {
20901  Wavefront *wf = gpuDynInst->wavefront();
20902  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20903 
20904  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20905  if (wf->execMask(lane)) {
20906  sdst.setBit(lane, 0);
20907  }
20908  }
20909 
20910  sdst.write();
20911  }
20912 
20914  InFmt_VOP3 *iFmt)
20915  : Inst_VOP3(iFmt, "v_cmp_lt_u32", true)
20916  {
20917  setFlag(ALU);
20918  } // Inst_VOP3__V_CMP_LT_U32
20919 
20921  {
20922  } // ~Inst_VOP3__V_CMP_LT_U32
20923 
20924  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
20925  void
20927  {
20928  Wavefront *wf = gpuDynInst->wavefront();
20929  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
20930  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
20931  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20932 
20933  src0.readSrc();
20934  src1.readSrc();
20935 
20939  assert(!(instData.ABS & 0x1));
20940  assert(!(instData.ABS & 0x2));
20941  assert(!(instData.ABS & 0x4));
20942  assert(!(extData.NEG & 0x1));
20943  assert(!(extData.NEG & 0x2));
20944  assert(!(extData.NEG & 0x4));
20945 
20946  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20947  if (wf->execMask(lane)) {
20948  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
20949  }
20950  }
20951 
20952  sdst.write();
20953  }
20954 
20956  InFmt_VOP3 *iFmt)
20957  : Inst_VOP3(iFmt, "v_cmp_eq_u32", true)
20958  {
20959  setFlag(ALU);
20960  } // Inst_VOP3__V_CMP_EQ_U32
20961 
20963  {
20964  } // ~Inst_VOP3__V_CMP_EQ_U32
20965 
20966  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
20967  void
20969  {
20970  Wavefront *wf = gpuDynInst->wavefront();
20971  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
20972  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
20973  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
20974 
20975  src0.readSrc();
20976  src1.readSrc();
20977 
20981  assert(!(instData.ABS & 0x1));
20982  assert(!(instData.ABS & 0x2));
20983  assert(!(instData.ABS & 0x4));
20984  assert(!(extData.NEG & 0x1));
20985  assert(!(extData.NEG & 0x2));
20986  assert(!(extData.NEG & 0x4));
20987 
20988  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
20989  if (wf->execMask(lane)) {
20990  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
20991  }
20992  }
20993 
20994  sdst.write();
20995  }
20996 
20998  InFmt_VOP3 *iFmt)
20999  : Inst_VOP3(iFmt, "v_cmp_le_u32", true)
21000  {
21001  setFlag(ALU);
21002  } // Inst_VOP3__V_CMP_LE_U32
21003 
21005  {
21006  } // ~Inst_VOP3__V_CMP_LE_U32
21007 
21008  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
21009  void
21011  {
21012  Wavefront *wf = gpuDynInst->wavefront();
21013  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
21014  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
21015  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21016 
21017  src0.readSrc();
21018  src1.readSrc();
21019 
21023  assert(!(instData.ABS & 0x1));
21024  assert(!(instData.ABS & 0x2));
21025  assert(!(instData.ABS & 0x4));
21026  assert(!(extData.NEG & 0x1));
21027  assert(!(extData.NEG & 0x2));
21028  assert(!(extData.NEG & 0x4));
21029 
21030  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21031  if (wf->execMask(lane)) {
21032  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
21033  }
21034  }
21035 
21036  sdst.write();
21037  }
21038 
21040  InFmt_VOP3 *iFmt)
21041  : Inst_VOP3(iFmt, "v_cmp_gt_u32", true)
21042  {
21043  setFlag(ALU);
21044  } // Inst_VOP3__V_CMP_GT_U32
21045 
21047  {
21048  } // ~Inst_VOP3__V_CMP_GT_U32
21049 
21050  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
21051  void
21053  {
21054  Wavefront *wf = gpuDynInst->wavefront();
21055  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
21056  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
21057  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21058 
21059  src0.readSrc();
21060  src1.readSrc();
21061 
21065  assert(!(instData.ABS & 0x1));
21066  assert(!(instData.ABS & 0x2));
21067  assert(!(instData.ABS & 0x4));
21068  assert(!(extData.NEG & 0x1));
21069  assert(!(extData.NEG & 0x2));
21070  assert(!(extData.NEG & 0x4));
21071 
21072  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21073  if (wf->execMask(lane)) {
21074  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
21075  }
21076  }
21077 
21078  sdst.write();
21079  }
21080 
21082  InFmt_VOP3 *iFmt)
21083  : Inst_VOP3(iFmt, "v_cmp_ne_u32", true)
21084  {
21085  setFlag(ALU);
21086  } // Inst_VOP3__V_CMP_NE_U32
21087 
21089  {
21090  } // ~Inst_VOP3__V_CMP_NE_U32
21091 
21092  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
21093  void
21095  {
21096  Wavefront *wf = gpuDynInst->wavefront();
21097  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
21098  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
21099  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21100 
21101  src0.readSrc();
21102  src1.readSrc();
21103 
21107  assert(!(instData.ABS & 0x1));
21108  assert(!(instData.ABS & 0x2));
21109  assert(!(instData.ABS & 0x4));
21110  assert(!(extData.NEG & 0x1));
21111  assert(!(extData.NEG & 0x2));
21112  assert(!(extData.NEG & 0x4));
21113 
21114  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21115  if (wf->execMask(lane)) {
21116  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
21117  }
21118  }
21119 
21120  sdst.write();
21121  }
21122 
21124  InFmt_VOP3 *iFmt)
21125  : Inst_VOP3(iFmt, "v_cmp_ge_u32", true)
21126  {
21127  setFlag(ALU);
21128  } // Inst_VOP3__V_CMP_GE_U32
21129 
21131  {
21132  } // ~Inst_VOP3__V_CMP_GE_U32
21133 
21134  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
21135  void
21137  {
21138  Wavefront *wf = gpuDynInst->wavefront();
21139  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
21140  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
21141  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21142 
21143  src0.readSrc();
21144  src1.readSrc();
21145 
21149  assert(!(instData.ABS & 0x1));
21150  assert(!(instData.ABS & 0x2));
21151  assert(!(instData.ABS & 0x4));
21152  assert(!(extData.NEG & 0x1));
21153  assert(!(extData.NEG & 0x2));
21154  assert(!(extData.NEG & 0x4));
21155 
21156  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21157  if (wf->execMask(lane)) {
21158  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
21159  }
21160  }
21161 
21162  sdst.write();
21163  }
21164 
21166  : Inst_VOP3(iFmt, "v_cmp_t_u32", true)
21167  {
21168  setFlag(ALU);
21169  } // Inst_VOP3__V_CMP_T_U32
21170 
21172  {
21173  } // ~Inst_VOP3__V_CMP_T_U32
21174 
21175  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
21176  void
21178  {
21179  Wavefront *wf = gpuDynInst->wavefront();
21180  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21181 
21182  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21183  if (wf->execMask(lane)) {
21184  sdst.setBit(lane, 1);
21185  }
21186  }
21187 
21188  sdst.write();
21189  }
21190 
21192  InFmt_VOP3 *iFmt)
21193  : Inst_VOP3(iFmt, "v_cmpx_f_i32", true)
21194  {
21195  setFlag(ALU);
21196  } // Inst_VOP3__V_CMPX_F_I32
21197 
21199  {
21200  } // ~Inst_VOP3__V_CMPX_F_I32
21201 
21202  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
21203  void
21205  {
21206  Wavefront *wf = gpuDynInst->wavefront();
21207  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21208 
21209  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21210  if (wf->execMask(lane)) {
21211  sdst.setBit(lane, 0);
21212  }
21213  }
21214 
21215  wf->execMask() = sdst.rawData();
21216  sdst.write();
21217  }
21218 
21220  InFmt_VOP3 *iFmt)
21221  : Inst_VOP3(iFmt, "v_cmpx_lt_i32", true)
21222  {
21223  setFlag(ALU);
21224  } // Inst_VOP3__V_CMPX_LT_I32
21225 
21227  {
21228  } // ~Inst_VOP3__V_CMPX_LT_I32
21229 
21230  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
21231  void
21233  {
21234  Wavefront *wf = gpuDynInst->wavefront();
21235  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
21236  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
21237  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21238 
21239  src0.readSrc();
21240  src1.readSrc();
21241 
21245  assert(!(instData.ABS & 0x1));
21246  assert(!(instData.ABS & 0x2));
21247  assert(!(instData.ABS & 0x4));
21248  assert(!(extData.NEG & 0x1));
21249  assert(!(extData.NEG & 0x2));
21250  assert(!(extData.NEG & 0x4));
21251 
21252  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21253  if (wf->execMask(lane)) {
21254  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
21255  }
21256  }
21257 
21258  wf->execMask() = sdst.rawData();
21259  sdst.write();
21260  }
21261 
21263  InFmt_VOP3 *iFmt)
21264  : Inst_VOP3(iFmt, "v_cmpx_eq_i32", true)
21265  {
21266  setFlag(ALU);
21267  } // Inst_VOP3__V_CMPX_EQ_I32
21268 
21270  {
21271  } // ~Inst_VOP3__V_CMPX_EQ_I32
21272 
21273  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
21274  void
21276  {
21277  Wavefront *wf = gpuDynInst->wavefront();
21278  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
21279  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
21280  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21281 
21282  src0.readSrc();
21283  src1.readSrc();
21284 
21288  assert(!(instData.ABS & 0x1));
21289  assert(!(instData.ABS & 0x2));
21290  assert(!(instData.ABS & 0x4));
21291  assert(!(extData.NEG & 0x1));
21292  assert(!(extData.NEG & 0x2));
21293  assert(!(extData.NEG & 0x4));
21294 
21295  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21296  if (wf->execMask(lane)) {
21297  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
21298  }
21299  }
21300 
21301  wf->execMask() = sdst.rawData();
21302  sdst.write();
21303  }
21304 
21306  InFmt_VOP3 *iFmt)
21307  : Inst_VOP3(iFmt, "v_cmpx_le_i32", true)
21308  {
21309  setFlag(ALU);
21310  } // Inst_VOP3__V_CMPX_LE_I32
21311 
21313  {
21314  } // ~Inst_VOP3__V_CMPX_LE_I32
21315 
21316  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
21317  void
21319  {
21320  Wavefront *wf = gpuDynInst->wavefront();
21321  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
21322  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
21323  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21324 
21325  src0.readSrc();
21326  src1.readSrc();
21327 
21331  assert(!(instData.ABS & 0x1));
21332  assert(!(instData.ABS & 0x2));
21333  assert(!(instData.ABS & 0x4));
21334  assert(!(extData.NEG & 0x1));
21335  assert(!(extData.NEG & 0x2));
21336  assert(!(extData.NEG & 0x4));
21337 
21338  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21339  if (wf->execMask(lane)) {
21340  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
21341  }
21342  }
21343 
21344  wf->execMask() = sdst.rawData();
21345  sdst.write();
21346  }
21347 
21349  InFmt_VOP3 *iFmt)
21350  : Inst_VOP3(iFmt, "v_cmpx_gt_i32", true)
21351  {
21352  setFlag(ALU);
21353  } // Inst_VOP3__V_CMPX_GT_I32
21354 
21356  {
21357  } // ~Inst_VOP3__V_CMPX_GT_I32
21358 
21359  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
21360  void
21362  {
21363  Wavefront *wf = gpuDynInst->wavefront();
21364  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
21365  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
21366  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21367 
21368  src0.readSrc();
21369  src1.readSrc();
21370 
21374  assert(!(instData.ABS & 0x1));
21375  assert(!(instData.ABS & 0x2));
21376  assert(!(instData.ABS & 0x4));
21377  assert(!(extData.NEG & 0x1));
21378  assert(!(extData.NEG & 0x2));
21379  assert(!(extData.NEG & 0x4));
21380 
21381  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21382  if (wf->execMask(lane)) {
21383  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
21384  }
21385  }
21386 
21387  wf->execMask() = sdst.rawData();
21388  sdst.write();
21389  }
21390 
21392  InFmt_VOP3 *iFmt)
21393  : Inst_VOP3(iFmt, "v_cmpx_ne_i32", true)
21394  {
21395  setFlag(ALU);
21396  } // Inst_VOP3__V_CMPX_NE_I32
21397 
21399  {
21400  } // ~Inst_VOP3__V_CMPX_NE_I32
21401 
21402  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
21403  void
21405  {
21406  Wavefront *wf = gpuDynInst->wavefront();
21407  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
21408  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
21409  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21410 
21411  src0.readSrc();
21412  src1.readSrc();
21413 
21417  assert(!(instData.ABS & 0x1));
21418  assert(!(instData.ABS & 0x2));
21419  assert(!(instData.ABS & 0x4));
21420  assert(!(extData.NEG & 0x1));
21421  assert(!(extData.NEG & 0x2));
21422  assert(!(extData.NEG & 0x4));
21423 
21424  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21425  if (wf->execMask(lane)) {
21426  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
21427  }
21428  }
21429 
21430  wf->execMask() = sdst.rawData();
21431  sdst.write();
21432  }
21433 
21435  InFmt_VOP3 *iFmt)
21436  : Inst_VOP3(iFmt, "v_cmpx_ge_i32", true)
21437  {
21438  setFlag(ALU);
21439  } // Inst_VOP3__V_CMPX_GE_I32
21440 
21442  {
21443  } // ~Inst_VOP3__V_CMPX_GE_I32
21444 
21445  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
21446  void
21448  {
21449  Wavefront *wf = gpuDynInst->wavefront();
21450  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
21451  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
21452  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21453 
21454  src0.readSrc();
21455  src1.readSrc();
21456 
21460  assert(!(instData.ABS & 0x1));
21461  assert(!(instData.ABS & 0x2));
21462  assert(!(instData.ABS & 0x4));
21463  assert(!(extData.NEG & 0x1));
21464  assert(!(extData.NEG & 0x2));
21465  assert(!(extData.NEG & 0x4));
21466 
21467  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21468  if (wf->execMask(lane)) {
21469  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
21470  }
21471  }
21472 
21473  wf->execMask() = sdst.rawData();
21474  sdst.write();
21475  }
21476 
21478  InFmt_VOP3 *iFmt)
21479  : Inst_VOP3(iFmt, "v_cmpx_t_i32", true)
21480  {
21481  setFlag(ALU);
21482  } // Inst_VOP3__V_CMPX_T_I32
21483 
21485  {
21486  } // ~Inst_VOP3__V_CMPX_T_I32
21487 
21488  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
21489  void
21491  {
21492  Wavefront *wf = gpuDynInst->wavefront();
21493  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21494 
21495  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21496  if (wf->execMask(lane)) {
21497  sdst.setBit(lane, 1);
21498  }
21499  }
21500 
21501  wf->execMask() = sdst.rawData();
21502  sdst.write();
21503  }
21504 
21506  InFmt_VOP3 *iFmt)
21507  : Inst_VOP3(iFmt, "v_cmpx_f_u32", true)
21508  {
21509  setFlag(ALU);
21510  } // Inst_VOP3__V_CMPX_F_U32
21511 
21513  {
21514  } // ~Inst_VOP3__V_CMPX_F_U32
21515 
21516  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
21517  void
21519  {
21520  Wavefront *wf = gpuDynInst->wavefront();
21521  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21522 
21523  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21524  if (wf->execMask(lane)) {
21525  sdst.setBit(lane, 0);
21526  }
21527  }
21528 
21529  wf->execMask() = sdst.rawData();
21530  sdst.write();
21531  }
21532 
21534  InFmt_VOP3 *iFmt)
21535  : Inst_VOP3(iFmt, "v_cmpx_lt_u32", true)
21536  {
21537  setFlag(ALU);
21538  } // Inst_VOP3__V_CMPX_LT_U32
21539 
21541  {
21542  } // ~Inst_VOP3__V_CMPX_LT_U32
21543 
21544  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
21545  void
21547  {
21548  Wavefront *wf = gpuDynInst->wavefront();
21549  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
21550  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
21551  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21552 
21553  src0.readSrc();
21554  src1.readSrc();
21555 
21559  assert(!(instData.ABS & 0x1));
21560  assert(!(instData.ABS & 0x2));
21561  assert(!(instData.ABS & 0x4));
21562  assert(!(extData.NEG & 0x1));
21563  assert(!(extData.NEG & 0x2));
21564  assert(!(extData.NEG & 0x4));
21565 
21566  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21567  if (wf->execMask(lane)) {
21568  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
21569  }
21570  }
21571 
21572  wf->execMask() = sdst.rawData();
21573  sdst.write();
21574  }
21575 
21577  InFmt_VOP3 *iFmt)
21578  : Inst_VOP3(iFmt, "v_cmpx_eq_u32", true)
21579  {
21580  setFlag(ALU);
21581  } // Inst_VOP3__V_CMPX_EQ_U32
21582 
21584  {
21585  } // ~Inst_VOP3__V_CMPX_EQ_U32
21586 
21587  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
21588  void
21590  {
21591  Wavefront *wf = gpuDynInst->wavefront();
21592  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
21593  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
21594  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21595 
21596  src0.readSrc();
21597  src1.readSrc();
21598 
21602  assert(!(instData.ABS & 0x1));
21603  assert(!(instData.ABS & 0x2));
21604  assert(!(instData.ABS & 0x4));
21605  assert(!(extData.NEG & 0x1));
21606  assert(!(extData.NEG & 0x2));
21607  assert(!(extData.NEG & 0x4));
21608 
21609  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21610  if (wf->execMask(lane)) {
21611  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
21612  }
21613  }
21614 
21615  wf->execMask() = sdst.rawData();
21616  sdst.write();
21617  }
21618 
21620  InFmt_VOP3 *iFmt)
21621  : Inst_VOP3(iFmt, "v_cmpx_le_u32", true)
21622  {
21623  setFlag(ALU);
21624  } // Inst_VOP3__V_CMPX_LE_U32
21625 
21627  {
21628  } // ~Inst_VOP3__V_CMPX_LE_U32
21629 
21630  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
21631  void
21633  {
21634  Wavefront *wf = gpuDynInst->wavefront();
21635  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
21636  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
21637  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21638 
21639  src0.readSrc();
21640  src1.readSrc();
21641 
21645  assert(!(instData.ABS & 0x1));
21646  assert(!(instData.ABS & 0x2));
21647  assert(!(instData.ABS & 0x4));
21648  assert(!(extData.NEG & 0x1));
21649  assert(!(extData.NEG & 0x2));
21650  assert(!(extData.NEG & 0x4));
21651 
21652  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21653  if (wf->execMask(lane)) {
21654  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
21655  }
21656  }
21657 
21658  wf->execMask() = sdst.rawData();
21659  sdst.write();
21660  }
21661 
21663  InFmt_VOP3 *iFmt)
21664  : Inst_VOP3(iFmt, "v_cmpx_gt_u32", true)
21665  {
21666  setFlag(ALU);
21667  } // Inst_VOP3__V_CMPX_GT_U32
21668 
21670  {
21671  } // ~Inst_VOP3__V_CMPX_GT_U32
21672 
21673  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
21674  void
21676  {
21677  Wavefront *wf = gpuDynInst->wavefront();
21678  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
21679  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
21680  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21681 
21682  src0.readSrc();
21683  src1.readSrc();
21684 
21688  assert(!(instData.ABS & 0x1));
21689  assert(!(instData.ABS & 0x2));
21690  assert(!(instData.ABS & 0x4));
21691  assert(!(extData.NEG & 0x1));
21692  assert(!(extData.NEG & 0x2));
21693  assert(!(extData.NEG & 0x4));
21694 
21695  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21696  if (wf->execMask(lane)) {
21697  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
21698  }
21699  }
21700 
21701  wf->execMask() = sdst.rawData();
21702  sdst.write();
21703  }
21704 
21706  InFmt_VOP3 *iFmt)
21707  : Inst_VOP3(iFmt, "v_cmpx_ne_u32", true)
21708  {
21709  setFlag(ALU);
21710  } // Inst_VOP3__V_CMPX_NE_U32
21711 
21713  {
21714  } // ~Inst_VOP3__V_CMPX_NE_U32
21715 
21716  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
21717  void
21719  {
21720  Wavefront *wf = gpuDynInst->wavefront();
21721  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
21722  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
21723  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21724 
21725  src0.readSrc();
21726  src1.readSrc();
21727 
21731  assert(!(instData.ABS & 0x1));
21732  assert(!(instData.ABS & 0x2));
21733  assert(!(instData.ABS & 0x4));
21734  assert(!(extData.NEG & 0x1));
21735  assert(!(extData.NEG & 0x2));
21736  assert(!(extData.NEG & 0x4));
21737 
21738  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21739  if (wf->execMask(lane)) {
21740  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
21741  }
21742  }
21743 
21744  wf->execMask() = sdst.rawData();
21745  sdst.write();
21746  }
21747 
21749  InFmt_VOP3 *iFmt)
21750  : Inst_VOP3(iFmt, "v_cmpx_ge_u32", true)
21751  {
21752  setFlag(ALU);
21753  } // Inst_VOP3__V_CMPX_GE_U32
21754 
21756  {
21757  } // ~Inst_VOP3__V_CMPX_GE_U32
21758 
21759  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
21760  void
21762  {
21763  Wavefront *wf = gpuDynInst->wavefront();
21764  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
21765  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
21766  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21767 
21768  src0.readSrc();
21769  src1.readSrc();
21770 
21774  assert(!(instData.ABS & 0x1));
21775  assert(!(instData.ABS & 0x2));
21776  assert(!(instData.ABS & 0x4));
21777  assert(!(extData.NEG & 0x1));
21778  assert(!(extData.NEG & 0x2));
21779  assert(!(extData.NEG & 0x4));
21780 
21781  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21782  if (wf->execMask(lane)) {
21783  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
21784  }
21785  }
21786 
21787  wf->execMask() = sdst.rawData();
21788  sdst.write();
21789  }
21790 
21792  InFmt_VOP3 *iFmt)
21793  : Inst_VOP3(iFmt, "v_cmpx_t_u32", true)
21794  {
21795  setFlag(ALU);
21796  } // Inst_VOP3__V_CMPX_T_U32
21797 
21799  {
21800  } // ~Inst_VOP3__V_CMPX_T_U32
21801 
21802  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
21803  void
21805  {
21806  Wavefront *wf = gpuDynInst->wavefront();
21807  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21808 
21809  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21810  if (wf->execMask(lane)) {
21811  sdst.setBit(lane, 1);
21812  }
21813  }
21814 
21815  wf->execMask() = sdst.rawData();
21816  sdst.write();
21817  }
21818 
21820  : Inst_VOP3(iFmt, "v_cmp_f_i64", true)
21821  {
21822  setFlag(ALU);
21823  } // Inst_VOP3__V_CMP_F_I64
21824 
21826  {
21827  } // ~Inst_VOP3__V_CMP_F_I64
21828 
21829  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
21830  void
21832  {
21833  Wavefront *wf = gpuDynInst->wavefront();
21834  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21835 
21836  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21837  if (wf->execMask(lane)) {
21838  sdst.setBit(lane, 0);
21839  }
21840  }
21841 
21842  sdst.write();
21843  }
21844 
21846  InFmt_VOP3 *iFmt)
21847  : Inst_VOP3(iFmt, "v_cmp_lt_i64", true)
21848  {
21849  setFlag(ALU);
21850  } // Inst_VOP3__V_CMP_LT_I64
21851 
21853  {
21854  } // ~Inst_VOP3__V_CMP_LT_I64
21855 
21856  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
21857  void
21859  {
21860  Wavefront *wf = gpuDynInst->wavefront();
21861  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
21862  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
21863  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21864 
21865  src0.readSrc();
21866  src1.readSrc();
21867 
21871  assert(!(instData.ABS & 0x1));
21872  assert(!(instData.ABS & 0x2));
21873  assert(!(instData.ABS & 0x4));
21874  assert(!(extData.NEG & 0x1));
21875  assert(!(extData.NEG & 0x2));
21876  assert(!(extData.NEG & 0x4));
21877 
21878  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21879  if (wf->execMask(lane)) {
21880  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
21881  }
21882  }
21883 
21884  sdst.write();
21885  }
21886 
21888  InFmt_VOP3 *iFmt)
21889  : Inst_VOP3(iFmt, "v_cmp_eq_i64", true)
21890  {
21891  setFlag(ALU);
21892  } // Inst_VOP3__V_CMP_EQ_I64
21893 
21895  {
21896  } // ~Inst_VOP3__V_CMP_EQ_I64
21897 
21898  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
21899  void
21901  {
21902  Wavefront *wf = gpuDynInst->wavefront();
21903  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
21904  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
21905  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21906 
21907  src0.readSrc();
21908  src1.readSrc();
21909 
21913  assert(!(instData.ABS & 0x1));
21914  assert(!(instData.ABS & 0x2));
21915  assert(!(instData.ABS & 0x4));
21916  assert(!(extData.NEG & 0x1));
21917  assert(!(extData.NEG & 0x2));
21918  assert(!(extData.NEG & 0x4));
21919 
21920  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21921  if (wf->execMask(lane)) {
21922  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
21923  }
21924  }
21925 
21926  sdst.write();
21927  }
21928 
21930  InFmt_VOP3 *iFmt)
21931  : Inst_VOP3(iFmt, "v_cmp_le_i64", true)
21932  {
21933  setFlag(ALU);
21934  } // Inst_VOP3__V_CMP_LE_I64
21935 
21937  {
21938  } // ~Inst_VOP3__V_CMP_LE_I64
21939 
21940  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
21941  void
21943  {
21944  Wavefront *wf = gpuDynInst->wavefront();
21945  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
21946  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
21947  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21948 
21949  src0.readSrc();
21950  src1.readSrc();
21951 
21955  assert(!(instData.ABS & 0x1));
21956  assert(!(instData.ABS & 0x2));
21957  assert(!(instData.ABS & 0x4));
21958  assert(!(extData.NEG & 0x1));
21959  assert(!(extData.NEG & 0x2));
21960  assert(!(extData.NEG & 0x4));
21961 
21962  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
21963  if (wf->execMask(lane)) {
21964  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
21965  }
21966  }
21967 
21968  sdst.write();
21969  }
21970 
21972  InFmt_VOP3 *iFmt)
21973  : Inst_VOP3(iFmt, "v_cmp_gt_i64", true)
21974  {
21975  setFlag(ALU);
21976  } // Inst_VOP3__V_CMP_GT_I64
21977 
21979  {
21980  } // ~Inst_VOP3__V_CMP_GT_I64
21981 
21982  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
21983  void
21985  {
21986  Wavefront *wf = gpuDynInst->wavefront();
21987  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
21988  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
21989  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
21990 
21991  src0.readSrc();
21992  src1.readSrc();
21993 
21997  assert(!(instData.ABS & 0x1));
21998  assert(!(instData.ABS & 0x2));
21999  assert(!(instData.ABS & 0x4));
22000  assert(!(extData.NEG & 0x1));
22001  assert(!(extData.NEG & 0x2));
22002  assert(!(extData.NEG & 0x4));
22003 
22004  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22005  if (wf->execMask(lane)) {
22006  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
22007  }
22008  }
22009 
22010  sdst.write();
22011  }
22012 
22014  InFmt_VOP3 *iFmt)
22015  : Inst_VOP3(iFmt, "v_cmp_ne_i64", true)
22016  {
22017  setFlag(ALU);
22018  } // Inst_VOP3__V_CMP_NE_I64
22019 
22021  {
22022  } // ~Inst_VOP3__V_CMP_NE_I64
22023 
22024  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
22025  void
22027  {
22028  Wavefront *wf = gpuDynInst->wavefront();
22029  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
22030  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
22031  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22032 
22033  src0.readSrc();
22034  src1.readSrc();
22035 
22039  assert(!(instData.ABS & 0x1));
22040  assert(!(instData.ABS & 0x2));
22041  assert(!(instData.ABS & 0x4));
22042  assert(!(extData.NEG & 0x1));
22043  assert(!(extData.NEG & 0x2));
22044  assert(!(extData.NEG & 0x4));
22045 
22046  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22047  if (wf->execMask(lane)) {
22048  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
22049  }
22050  }
22051 
22052  sdst.write();
22053  }
22054 
22056  InFmt_VOP3 *iFmt)
22057  : Inst_VOP3(iFmt, "v_cmp_ge_i64", true)
22058  {
22059  setFlag(ALU);
22060  } // Inst_VOP3__V_CMP_GE_I64
22061 
22063  {
22064  } // ~Inst_VOP3__V_CMP_GE_I64
22065 
22066  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
22067  void
22069  {
22070  Wavefront *wf = gpuDynInst->wavefront();
22071  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
22072  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
22073  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22074 
22075  src0.readSrc();
22076  src1.readSrc();
22077 
22081  assert(!(instData.ABS & 0x1));
22082  assert(!(instData.ABS & 0x2));
22083  assert(!(instData.ABS & 0x4));
22084  assert(!(extData.NEG & 0x1));
22085  assert(!(extData.NEG & 0x2));
22086  assert(!(extData.NEG & 0x4));
22087 
22088  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22089  if (wf->execMask(lane)) {
22090  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
22091  }
22092  }
22093 
22094  sdst.write();
22095  }
22096 
22098  : Inst_VOP3(iFmt, "v_cmp_t_i64", true)
22099  {
22100  setFlag(ALU);
22101  } // Inst_VOP3__V_CMP_T_I64
22102 
22104  {
22105  } // ~Inst_VOP3__V_CMP_T_I64
22106 
22107  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
22108  void
22110  {
22111  Wavefront *wf = gpuDynInst->wavefront();
22112  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22113 
22114  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22115  if (wf->execMask(lane)) {
22116  sdst.setBit(lane, 1);
22117  }
22118  }
22119 
22120  sdst.write();
22121  }
22122 
22124  : Inst_VOP3(iFmt, "v_cmp_f_u64", true)
22125  {
22126  setFlag(ALU);
22127  } // Inst_VOP3__V_CMP_F_U64
22128 
22130  {
22131  } // ~Inst_VOP3__V_CMP_F_U64
22132 
22133  // D.u64[threadID] = 0; D = VCC in VOPC encoding.
22134  void
22136  {
22137  Wavefront *wf = gpuDynInst->wavefront();
22138  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22139 
22140  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22141  if (wf->execMask(lane)) {
22142  sdst.setBit(lane, 0);
22143  }
22144  }
22145 
22146  sdst.write();
22147  }
22148 
22150  InFmt_VOP3 *iFmt)
22151  : Inst_VOP3(iFmt, "v_cmp_lt_u64", true)
22152  {
22153  setFlag(ALU);
22154  } // Inst_VOP3__V_CMP_LT_U64
22155 
22157  {
22158  } // ~Inst_VOP3__V_CMP_LT_U64
22159 
22160  // D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
22161  void
22163  {
22164  Wavefront *wf = gpuDynInst->wavefront();
22165  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
22166  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
22167  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22168 
22169  src0.readSrc();
22170  src1.readSrc();
22171 
22175  assert(!(instData.ABS & 0x1));
22176  assert(!(instData.ABS & 0x2));
22177  assert(!(instData.ABS & 0x4));
22178  assert(!(extData.NEG & 0x1));
22179  assert(!(extData.NEG & 0x2));
22180  assert(!(extData.NEG & 0x4));
22181 
22182  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22183  if (wf->execMask(lane)) {
22184  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
22185  }
22186  }
22187 
22188  sdst.write();
22189  }
22190 
22192  InFmt_VOP3 *iFmt)
22193  : Inst_VOP3(iFmt, "v_cmp_eq_u64", true)
22194  {
22195  setFlag(ALU);
22196  } // Inst_VOP3__V_CMP_EQ_U64
22197 
22199  {
22200  } // ~Inst_VOP3__V_CMP_EQ_U64
22201 
22202  // D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
22203  void
22205  {
22206  Wavefront *wf = gpuDynInst->wavefront();
22207  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
22208  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
22209  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22210 
22211  src0.readSrc();
22212  src1.readSrc();
22213 
22217  assert(!(instData.ABS & 0x1));
22218  assert(!(instData.ABS & 0x2));
22219  assert(!(instData.ABS & 0x4));
22220  assert(!(extData.NEG & 0x1));
22221  assert(!(extData.NEG & 0x2));
22222  assert(!(extData.NEG & 0x4));
22223 
22224  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22225  if (wf->execMask(lane)) {
22226  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
22227  }
22228  }
22229 
22230  sdst.write();
22231  }
22232 
22234  InFmt_VOP3 *iFmt)
22235  : Inst_VOP3(iFmt, "v_cmp_le_u64", true)
22236  {
22237  setFlag(ALU);
22238  } // Inst_VOP3__V_CMP_LE_U64
22239 
22241  {
22242  } // ~Inst_VOP3__V_CMP_LE_U64
22243 
22244  // D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
22245  void
22247  {
22248  Wavefront *wf = gpuDynInst->wavefront();
22249  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
22250  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
22251  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22252 
22253  src0.readSrc();
22254  src1.readSrc();
22255 
22259  assert(!(instData.ABS & 0x1));
22260  assert(!(instData.ABS & 0x2));
22261  assert(!(instData.ABS & 0x4));
22262  assert(!(extData.NEG & 0x1));
22263  assert(!(extData.NEG & 0x2));
22264  assert(!(extData.NEG & 0x4));
22265 
22266  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22267  if (wf->execMask(lane)) {
22268  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
22269  }
22270  }
22271 
22272  sdst.write();
22273  }
22274 
22276  InFmt_VOP3 *iFmt)
22277  : Inst_VOP3(iFmt, "v_cmp_gt_u64", true)
22278  {
22279  setFlag(ALU);
22280  } // Inst_VOP3__V_CMP_GT_U64
22281 
22283  {
22284  } // ~Inst_VOP3__V_CMP_GT_U64
22285 
22286  // D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
22287  void
22289  {
22290  Wavefront *wf = gpuDynInst->wavefront();
22291  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
22292  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
22293  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22294 
22295  src0.readSrc();
22296  src1.readSrc();
22297 
22301  assert(!(instData.ABS & 0x1));
22302  assert(!(instData.ABS & 0x2));
22303  assert(!(instData.ABS & 0x4));
22304  assert(!(extData.NEG & 0x1));
22305  assert(!(extData.NEG & 0x2));
22306  assert(!(extData.NEG & 0x4));
22307 
22308  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22309  if (wf->execMask(lane)) {
22310  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
22311  }
22312  }
22313 
22314  sdst.write();
22315  }
22316 
22318  InFmt_VOP3 *iFmt)
22319  : Inst_VOP3(iFmt, "v_cmp_ne_u64", true)
22320  {
22321  setFlag(ALU);
22322  } // Inst_VOP3__V_CMP_NE_U64
22323 
22325  {
22326  } // ~Inst_VOP3__V_CMP_NE_U64
22327 
22328  // D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
22329  void
22331  {
22332  Wavefront *wf = gpuDynInst->wavefront();
22333  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
22334  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
22335  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22336 
22337  src0.readSrc();
22338  src1.readSrc();
22339 
22343  assert(!(instData.ABS & 0x1));
22344  assert(!(instData.ABS & 0x2));
22345  assert(!(instData.ABS & 0x4));
22346  assert(!(extData.NEG & 0x1));
22347  assert(!(extData.NEG & 0x2));
22348  assert(!(extData.NEG & 0x4));
22349 
22350  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22351  if (wf->execMask(lane)) {
22352  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
22353  }
22354  }
22355 
22356  sdst.write();
22357  }
22358 
22360  InFmt_VOP3 *iFmt)
22361  : Inst_VOP3(iFmt, "v_cmp_ge_u64", true)
22362  {
22363  setFlag(ALU);
22364  } // Inst_VOP3__V_CMP_GE_U64
22365 
22367  {
22368  } // ~Inst_VOP3__V_CMP_GE_U64
22369 
22370  // D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
22371  void
22373  {
22374  Wavefront *wf = gpuDynInst->wavefront();
22375  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
22376  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
22377  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22378 
22379  src0.readSrc();
22380  src1.readSrc();
22381 
22385  assert(!(instData.ABS & 0x1));
22386  assert(!(instData.ABS & 0x2));
22387  assert(!(instData.ABS & 0x4));
22388  assert(!(extData.NEG & 0x1));
22389  assert(!(extData.NEG & 0x2));
22390  assert(!(extData.NEG & 0x4));
22391 
22392  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22393  if (wf->execMask(lane)) {
22394  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
22395  }
22396  }
22397 
22398  sdst.write();
22399  }
22400 
22402  : Inst_VOP3(iFmt, "v_cmp_t_u64", true)
22403  {
22404  setFlag(ALU);
22405  } // Inst_VOP3__V_CMP_T_U64
22406 
22408  {
22409  } // ~Inst_VOP3__V_CMP_T_U64
22410 
22411  // D.u64[threadID] = 1; D = VCC in VOPC encoding.
22412  void
22414  {
22415  Wavefront *wf = gpuDynInst->wavefront();
22416  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22417 
22418  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22419  if (wf->execMask(lane)) {
22420  sdst.setBit(lane, 1);
22421  }
22422  }
22423 
22424  sdst.write();
22425  }
22426 
22428  InFmt_VOP3 *iFmt)
22429  : Inst_VOP3(iFmt, "v_cmpx_f_i64", true)
22430  {
22431  setFlag(ALU);
22432  } // Inst_VOP3__V_CMPX_F_I64
22433 
22435  {
22436  } // ~Inst_VOP3__V_CMPX_F_I64
22437 
22438  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
22439  void
22441  {
22442  Wavefront *wf = gpuDynInst->wavefront();
22443  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22444 
22445  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22446  if (wf->execMask(lane)) {
22447  sdst.setBit(lane, 0);
22448  }
22449  }
22450 
22451  wf->execMask() = sdst.rawData();
22452  sdst.write();
22453  }
22454 
22456  InFmt_VOP3 *iFmt)
22457  : Inst_VOP3(iFmt, "v_cmpx_lt_i64", true)
22458  {
22459  setFlag(ALU);
22460  } // Inst_VOP3__V_CMPX_LT_I64
22461 
22463  {
22464  } // ~Inst_VOP3__V_CMPX_LT_I64
22465 
22466  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
22467  void
22469  {
22470  Wavefront *wf = gpuDynInst->wavefront();
22471  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
22472  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
22473  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22474 
22475  src0.readSrc();
22476  src1.readSrc();
22477 
22481  assert(!(instData.ABS & 0x1));
22482  assert(!(instData.ABS & 0x2));
22483  assert(!(instData.ABS & 0x4));
22484  assert(!(extData.NEG & 0x1));
22485  assert(!(extData.NEG & 0x2));
22486  assert(!(extData.NEG & 0x4));
22487 
22488  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22489  if (wf->execMask(lane)) {
22490  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
22491  }
22492  }
22493 
22494  wf->execMask() = sdst.rawData();
22495  sdst.write();
22496  }
22497 
22499  InFmt_VOP3 *iFmt)
22500  : Inst_VOP3(iFmt, "v_cmpx_eq_i64", true)
22501  {
22502  setFlag(ALU);
22503  } // Inst_VOP3__V_CMPX_EQ_I64
22504 
22506  {
22507  } // ~Inst_VOP3__V_CMPX_EQ_I64
22508 
22509  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
22510  void
22512  {
22513  Wavefront *wf = gpuDynInst->wavefront();
22514  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
22515  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
22516  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22517 
22518  src0.readSrc();
22519  src1.readSrc();
22520 
22524  assert(!(instData.ABS & 0x1));
22525  assert(!(instData.ABS & 0x2));
22526  assert(!(instData.ABS & 0x4));
22527  assert(!(extData.NEG & 0x1));
22528  assert(!(extData.NEG & 0x2));
22529  assert(!(extData.NEG & 0x4));
22530 
22531  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22532  if (wf->execMask(lane)) {
22533  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
22534  }
22535  }
22536 
22537  wf->execMask() = sdst.rawData();
22538  sdst.write();
22539  }
22540 
22542  InFmt_VOP3 *iFmt)
22543  : Inst_VOP3(iFmt, "v_cmpx_le_i64", true)
22544  {
22545  setFlag(ALU);
22546  } // Inst_VOP3__V_CMPX_LE_I64
22547 
22549  {
22550  } // ~Inst_VOP3__V_CMPX_LE_I64
22551 
22552  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
22553  void
22555  {
22556  Wavefront *wf = gpuDynInst->wavefront();
22557  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
22558  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
22559  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22560 
22561  src0.readSrc();
22562  src1.readSrc();
22563 
22567  assert(!(instData.ABS & 0x1));
22568  assert(!(instData.ABS & 0x2));
22569  assert(!(instData.ABS & 0x4));
22570  assert(!(extData.NEG & 0x1));
22571  assert(!(extData.NEG & 0x2));
22572  assert(!(extData.NEG & 0x4));
22573 
22574  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22575  if (wf->execMask(lane)) {
22576  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
22577  }
22578  }
22579 
22580  wf->execMask() = sdst.rawData();
22581  sdst.write();
22582  }
22583 
22585  InFmt_VOP3 *iFmt)
22586  : Inst_VOP3(iFmt, "v_cmpx_gt_i64", true)
22587  {
22588  setFlag(ALU);
22589  } // Inst_VOP3__V_CMPX_GT_I64
22590 
22592  {
22593  } // ~Inst_VOP3__V_CMPX_GT_I64
22594 
22595  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
22596  void
22598  {
22599  Wavefront *wf = gpuDynInst->wavefront();
22600  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
22601  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
22602  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22603 
22604  src0.readSrc();
22605  src1.readSrc();
22606 
22610  assert(!(instData.ABS & 0x1));
22611  assert(!(instData.ABS & 0x2));
22612  assert(!(instData.ABS & 0x4));
22613  assert(!(extData.NEG & 0x1));
22614  assert(!(extData.NEG & 0x2));
22615  assert(!(extData.NEG & 0x4));
22616 
22617  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22618  if (wf->execMask(lane)) {
22619  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
22620  }
22621  }
22622 
22623  wf->execMask() = sdst.rawData();
22624  sdst.write();
22625  }
22626 
22628  InFmt_VOP3 *iFmt)
22629  : Inst_VOP3(iFmt, "v_cmpx_ne_i64", true)
22630  {
22631  setFlag(ALU);
22632  } // Inst_VOP3__V_CMPX_NE_I64
22633 
22635  {
22636  } // ~Inst_VOP3__V_CMPX_NE_I64
22637 
22638  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
22639  void
22641  {
22642  Wavefront *wf = gpuDynInst->wavefront();
22643  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
22644  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
22645  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22646 
22647  src0.readSrc();
22648  src1.readSrc();
22649 
22653  assert(!(instData.ABS & 0x1));
22654  assert(!(instData.ABS & 0x2));
22655  assert(!(instData.ABS & 0x4));
22656  assert(!(extData.NEG & 0x1));
22657  assert(!(extData.NEG & 0x2));
22658  assert(!(extData.NEG & 0x4));
22659 
22660  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22661  if (wf->execMask(lane)) {
22662  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
22663  }
22664  }
22665 
22666  wf->execMask() = sdst.rawData();
22667  sdst.write();
22668  }
22669 
22671  InFmt_VOP3 *iFmt)
22672  : Inst_VOP3(iFmt, "v_cmpx_ge_i64", true)
22673  {
22674  setFlag(ALU);
22675  } // Inst_VOP3__V_CMPX_GE_I64
22676 
22678  {
22679  } // ~Inst_VOP3__V_CMPX_GE_I64
22680 
22681  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
22682  void
22684  {
22685  Wavefront *wf = gpuDynInst->wavefront();
22686  ConstVecOperandI64 src0(gpuDynInst, extData.SRC0);
22687  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
22688  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22689 
22690  src0.readSrc();
22691  src1.readSrc();
22692 
22696  assert(!(instData.ABS & 0x1));
22697  assert(!(instData.ABS & 0x2));
22698  assert(!(instData.ABS & 0x4));
22699  assert(!(extData.NEG & 0x1));
22700  assert(!(extData.NEG & 0x2));
22701  assert(!(extData.NEG & 0x4));
22702 
22703  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22704  if (wf->execMask(lane)) {
22705  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
22706  }
22707  }
22708 
22709  wf->execMask() = sdst.rawData();
22710  sdst.write();
22711  }
22712 
22714  InFmt_VOP3 *iFmt)
22715  : Inst_VOP3(iFmt, "v_cmpx_t_i64", true)
22716  {
22717  setFlag(ALU);
22718  } // Inst_VOP3__V_CMPX_T_I64
22719 
22721  {
22722  } // ~Inst_VOP3__V_CMPX_T_I64
22723 
22724  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
22725  void
22727  {
22728  Wavefront *wf = gpuDynInst->wavefront();
22729  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22730 
22731  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22732  if (wf->execMask(lane)) {
22733  sdst.setBit(lane, 1);
22734  }
22735  }
22736 
22737  wf->execMask() = sdst.rawData();
22738  sdst.write();
22739  }
22740 
22742  InFmt_VOP3 *iFmt)
22743  : Inst_VOP3(iFmt, "v_cmpx_f_u64", true)
22744  {
22745  setFlag(ALU);
22746  } // Inst_VOP3__V_CMPX_F_U64
22747 
22749  {
22750  } // ~Inst_VOP3__V_CMPX_F_U64
22751 
22752  // EXEC,D.u64[threadID] = 0; D = VCC in VOPC encoding.
22753  void
22755  {
22756  Wavefront *wf = gpuDynInst->wavefront();
22757  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22758 
22759  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22760  if (wf->execMask(lane)) {
22761  sdst.setBit(lane, 0);
22762  }
22763  }
22764 
22765  wf->execMask() = sdst.rawData();
22766  sdst.write();
22767  }
22768 
22770  InFmt_VOP3 *iFmt)
22771  : Inst_VOP3(iFmt, "v_cmpx_lt_u64", true)
22772  {
22773  setFlag(ALU);
22774  } // Inst_VOP3__V_CMPX_LT_U64
22775 
22777  {
22778  } // ~Inst_VOP3__V_CMPX_LT_U64
22779 
22780  // EXEC,D.u64[threadID] = (S0 < S1); D = VCC in VOPC encoding.
22781  void
22783  {
22784  Wavefront *wf = gpuDynInst->wavefront();
22785  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
22786  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
22787  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22788 
22789  src0.readSrc();
22790  src1.readSrc();
22791 
22795  assert(!(instData.ABS & 0x1));
22796  assert(!(instData.ABS & 0x2));
22797  assert(!(instData.ABS & 0x4));
22798  assert(!(extData.NEG & 0x1));
22799  assert(!(extData.NEG & 0x2));
22800  assert(!(extData.NEG & 0x4));
22801 
22802  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22803  if (wf->execMask(lane)) {
22804  sdst.setBit(lane, src0[lane] < src1[lane] ? 1 : 0);
22805  }
22806  }
22807 
22808  wf->execMask() = sdst.rawData();
22809  sdst.write();
22810  }
22811 
22813  InFmt_VOP3 *iFmt)
22814  : Inst_VOP3(iFmt, "v_cmpx_eq_u64", true)
22815  {
22816  setFlag(ALU);
22817  } // Inst_VOP3__V_CMPX_EQ_U64
22818 
22820  {
22821  } // ~Inst_VOP3__V_CMPX_EQ_U64
22822 
22823  // EXEC,D.u64[threadID] = (S0 == S1); D = VCC in VOPC encoding.
22824  void
22826  {
22827  Wavefront *wf = gpuDynInst->wavefront();
22828  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
22829  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
22830  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22831 
22832  src0.readSrc();
22833  src1.readSrc();
22834 
22838  assert(!(instData.ABS & 0x1));
22839  assert(!(instData.ABS & 0x2));
22840  assert(!(instData.ABS & 0x4));
22841  assert(!(extData.NEG & 0x1));
22842  assert(!(extData.NEG & 0x2));
22843  assert(!(extData.NEG & 0x4));
22844 
22845  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22846  if (wf->execMask(lane)) {
22847  sdst.setBit(lane, src0[lane] == src1[lane] ? 1 : 0);
22848  }
22849  }
22850 
22851  wf->execMask() = sdst.rawData();
22852  sdst.write();
22853  }
22854 
22856  InFmt_VOP3 *iFmt)
22857  : Inst_VOP3(iFmt, "v_cmpx_le_u64", true)
22858  {
22859  setFlag(ALU);
22860  } // Inst_VOP3__V_CMPX_LE_U64
22861 
22863  {
22864  } // ~Inst_VOP3__V_CMPX_LE_U64
22865 
22866  // EXEC,D.u64[threadID] = (S0 <= S1); D = VCC in VOPC encoding.
22867  void
22869  {
22870  Wavefront *wf = gpuDynInst->wavefront();
22871  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
22872  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
22873  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22874 
22875  src0.readSrc();
22876  src1.readSrc();
22877 
22881  assert(!(instData.ABS & 0x1));
22882  assert(!(instData.ABS & 0x2));
22883  assert(!(instData.ABS & 0x4));
22884  assert(!(extData.NEG & 0x1));
22885  assert(!(extData.NEG & 0x2));
22886  assert(!(extData.NEG & 0x4));
22887 
22888  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22889  if (wf->execMask(lane)) {
22890  sdst.setBit(lane, src0[lane] <= src1[lane] ? 1 : 0);
22891  }
22892  }
22893 
22894  wf->execMask() = sdst.rawData();
22895  sdst.write();
22896  }
22897 
22899  InFmt_VOP3 *iFmt)
22900  : Inst_VOP3(iFmt, "v_cmpx_gt_u64", true)
22901  {
22902  setFlag(ALU);
22903  } // Inst_VOP3__V_CMPX_GT_U64
22904 
22906  {
22907  } // ~Inst_VOP3__V_CMPX_GT_U64
22908 
22909  // EXEC,D.u64[threadID] = (S0 > S1); D = VCC in VOPC encoding.
22910  void
22912  {
22913  Wavefront *wf = gpuDynInst->wavefront();
22914  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
22915  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
22916  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22917 
22918  src0.readSrc();
22919  src1.readSrc();
22920 
22924  assert(!(instData.ABS & 0x1));
22925  assert(!(instData.ABS & 0x2));
22926  assert(!(instData.ABS & 0x4));
22927  assert(!(extData.NEG & 0x1));
22928  assert(!(extData.NEG & 0x2));
22929  assert(!(extData.NEG & 0x4));
22930 
22931  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22932  if (wf->execMask(lane)) {
22933  sdst.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
22934  }
22935  }
22936 
22937  wf->execMask() = sdst.rawData();
22938  sdst.write();
22939  }
22940 
22942  InFmt_VOP3 *iFmt)
22943  : Inst_VOP3(iFmt, "v_cmpx_ne_u64", true)
22944  {
22945  setFlag(ALU);
22946  } // Inst_VOP3__V_CMPX_NE_U64
22947 
22949  {
22950  } // ~Inst_VOP3__V_CMPX_NE_U64
22951 
22952  // EXEC,D.u64[threadID] = (S0 <> S1); D = VCC in VOPC encoding.
22953  void
22955  {
22956  Wavefront *wf = gpuDynInst->wavefront();
22957  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
22958  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
22959  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
22960 
22961  src0.readSrc();
22962  src1.readSrc();
22963 
22967  assert(!(instData.ABS & 0x1));
22968  assert(!(instData.ABS & 0x2));
22969  assert(!(instData.ABS & 0x4));
22970  assert(!(extData.NEG & 0x1));
22971  assert(!(extData.NEG & 0x2));
22972  assert(!(extData.NEG & 0x4));
22973 
22974  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
22975  if (wf->execMask(lane)) {
22976  sdst.setBit(lane, src0[lane] != src1[lane] ? 1 : 0);
22977  }
22978  }
22979 
22980  wf->execMask() = sdst.rawData();
22981  sdst.write();
22982  }
22983 
22985  InFmt_VOP3 *iFmt)
22986  : Inst_VOP3(iFmt, "v_cmpx_ge_u64", true)
22987  {
22988  setFlag(ALU);
22989  } // Inst_VOP3__V_CMPX_GE_U64
22990 
22992  {
22993  } // ~Inst_VOP3__V_CMPX_GE_U64
22994 
22995  // EXEC,D.u64[threadID] = (S0 >= S1); D = VCC in VOPC encoding.
22996  void
22998  {
22999  Wavefront *wf = gpuDynInst->wavefront();
23000  ConstVecOperandU64 src0(gpuDynInst, extData.SRC0);
23001  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
23002  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
23003 
23004  src0.readSrc();
23005  src1.readSrc();
23006 
23010  assert(!(instData.ABS & 0x1));
23011  assert(!(instData.ABS & 0x2));
23012  assert(!(instData.ABS & 0x4));
23013  assert(!(extData.NEG & 0x1));
23014  assert(!(extData.NEG & 0x2));
23015  assert(!(extData.NEG & 0x4));
23016 
23017  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23018  if (wf->execMask(lane)) {
23019  sdst.setBit(lane, src0[lane] >= src1[lane] ? 1 : 0);
23020  }
23021  }
23022 
23023  wf->execMask() = sdst.rawData();
23024  sdst.write();
23025  }
23026 
23028  InFmt_VOP3 *iFmt)
23029  : Inst_VOP3(iFmt, "v_cmpx_t_u64", true)
23030  {
23031  setFlag(ALU);
23032  } // Inst_VOP3__V_CMPX_T_U64
23033 
23035  {
23036  } // ~Inst_VOP3__V_CMPX_T_U64
23037 
23038  // EXEC,D.u64[threadID] = 1; D = VCC in VOPC encoding.
23039  void
23041  {
23042  Wavefront *wf = gpuDynInst->wavefront();
23043  ScalarOperandU64 sdst(gpuDynInst, instData.VDST);
23044 
23048  assert(!(instData.ABS & 0x1));
23049  assert(!(instData.ABS & 0x2));
23050  assert(!(instData.ABS & 0x4));
23051  assert(!(extData.NEG & 0x1));
23052  assert(!(extData.NEG & 0x2));
23053  assert(!(extData.NEG & 0x4));
23054 
23055  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23056  if (wf->execMask(lane)) {
23057  sdst.setBit(lane, 1);
23058  }
23059  }
23060 
23061  wf->execMask() = sdst.rawData();
23062  sdst.write();
23063  }
23064 
23066  : Inst_VOP3(iFmt, "v_cndmask_b32", false)
23067  {
23068  setFlag(ALU);
23069  setFlag(ReadsVCC);
23070  } // Inst_VOP3__V_CNDMASK_B32
23071 
23073  {
23074  } // ~Inst_VOP3__V_CNDMASK_B32
23075 
23076  // D.u = (VCC[i] ? S1.u : S0.u) (i = threadID in wave); VOP3: specify VCC
23077  // as a scalar GPR in S2.
23078  void
23080  {
23081  Wavefront *wf = gpuDynInst->wavefront();
23082  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
23083  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
23084  ConstScalarOperandU64 vcc(gpuDynInst, extData.SRC2);
23085  VecOperandU32 vdst(gpuDynInst, instData.VDST);
23086 
23087  src0.readSrc();
23088  src1.readSrc();
23089  vcc.read();
23090 
23094  assert(!(instData.ABS & 0x1));
23095  assert(!(instData.ABS & 0x2));
23096  assert(!(instData.ABS & 0x4));
23097  assert(!(extData.NEG & 0x1));
23098  assert(!(extData.NEG & 0x2));
23099  assert(!(extData.NEG & 0x4));
23100 
23101  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23102  if (wf->execMask(lane)) {
23103  vdst[lane] = bits(vcc.rawData(), lane)
23104  ? src1[lane] : src0[lane];
23105  }
23106  }
23107 
23108  vdst.write();
23109  }
23110 
23112  : Inst_VOP3(iFmt, "v_add_f32", false)
23113  {
23114  setFlag(ALU);
23115  setFlag(F32);
23116  } // Inst_VOP3__V_ADD_F32
23117 
23119  {
23120  } // ~Inst_VOP3__V_ADD_F32
23121 
23122  // D.f = S0.f + S1.f.
23123  void
23125  {
23126  Wavefront *wf = gpuDynInst->wavefront();
23127  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
23128  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
23129  VecOperandF32 vdst(gpuDynInst, instData.VDST);
23130 
23131  src0.readSrc();
23132  src1.readSrc();
23133 
23134  if (instData.ABS & 0x1) {
23135  src0.absModifier();
23136  }
23137 
23138  if (instData.ABS & 0x2) {
23139  src1.absModifier();
23140  }
23141 
23142  if (extData.NEG & 0x1) {
23143  src0.negModifier();
23144  }
23145 
23146  if (extData.NEG & 0x2) {
23147  src1.negModifier();
23148  }
23149 
23153  assert(!(instData.ABS & 0x4));
23154  assert(!(extData.NEG & 0x4));
23155 
23156  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23157  if (wf->execMask(lane)) {
23158  vdst[lane] = src0[lane] + src1[lane];
23159  }
23160  }
23161 
23162  vdst.write();
23163  }
23164 
23166  : Inst_VOP3(iFmt, "v_sub_f32", false)
23167  {
23168  setFlag(ALU);
23169  setFlag(F32);
23170  } // Inst_VOP3__V_SUB_F32
23171 
23173  {
23174  } // ~Inst_VOP3__V_SUB_F32
23175 
23176  // D.f = S0.f - S1.f.
23177  void
23179  {
23180  Wavefront *wf = gpuDynInst->wavefront();
23181  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
23182  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
23183  VecOperandF32 vdst(gpuDynInst, instData.VDST);
23184 
23185  src0.readSrc();
23186  src1.readSrc();
23187 
23188  if (instData.ABS & 0x1) {
23189  src0.absModifier();
23190  }
23191 
23192  if (instData.ABS & 0x2) {
23193  src1.absModifier();
23194  }
23195 
23196  if (extData.NEG & 0x1) {
23197  src0.negModifier();
23198  }
23199 
23200  if (extData.NEG & 0x2) {
23201  src1.negModifier();
23202  }
23203 
23207  assert(!(instData.ABS & 0x4));
23208  assert(!(extData.NEG & 0x4));
23209 
23210  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23211  if (wf->execMask(lane)) {
23212  vdst[lane] = src0[lane] - src1[lane];
23213  }
23214  }
23215 
23216  vdst.write();
23217  }
23218 
23220  : Inst_VOP3(iFmt, "v_subrev_f32", false)
23221  {
23222  setFlag(ALU);
23223  setFlag(F32);
23224  } // Inst_VOP3__V_SUBREV_F32
23225 
23227  {
23228  } // ~Inst_VOP3__V_SUBREV_F32
23229 
23230  // D.f = S1.f - S0.f.
23231  void
23233  {
23234  Wavefront *wf = gpuDynInst->wavefront();
23235  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
23236  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
23237  VecOperandF32 vdst(gpuDynInst, instData.VDST);
23238 
23239  src0.readSrc();
23240  src1.readSrc();
23241 
23242  if (instData.ABS & 0x1) {
23243  src0.absModifier();
23244  }
23245 
23246  if (instData.ABS & 0x2) {
23247  src1.absModifier();
23248  }
23249 
23250  if (extData.NEG & 0x1) {
23251  src0.negModifier();
23252  }
23253 
23254  if (extData.NEG & 0x2) {
23255  src1.negModifier();
23256  }
23257 
23261  assert(!(instData.ABS & 0x4));
23262  assert(!(extData.NEG & 0x4));
23263 
23264  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23265  if (wf->execMask(lane)) {
23266  vdst[lane] = src1[lane] - src0[lane];
23267  }
23268  }
23269 
23270  vdst.write();
23271  }
23272 
23274  : Inst_VOP3(iFmt, "v_mul_legacy_f32", false)
23275  {
23276  setFlag(ALU);
23277  setFlag(F32);
23278  } // Inst_VOP3__V_MUL_LEGACY_F32
23279 
23281  {
23282  } // ~Inst_VOP3__V_MUL_LEGACY_F32
23283 
23284  // D.f = S0.f * S1.f
23285  void
23287  {
23288  Wavefront *wf = gpuDynInst->wavefront();
23289  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
23290  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
23291  VecOperandF32 vdst(gpuDynInst, instData.VDST);
23292 
23293  src0.readSrc();
23294  src1.readSrc();
23295 
23296  if (instData.ABS & 0x1) {
23297  src0.absModifier();
23298  }
23299 
23300  if (instData.ABS & 0x2) {
23301  src1.absModifier();
23302  }
23303 
23304  if (extData.NEG & 0x1) {
23305  src0.negModifier();
23306  }
23307 
23308  if (extData.NEG & 0x2) {
23309  src1.negModifier();
23310  }
23311 
23315  assert(!(instData.ABS & 0x4));
23316  assert(!(extData.NEG & 0x4));
23317 
23318  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23319  if (wf->execMask(lane)) {
23320  if (std::isnan(src0[lane]) ||
23321  std::isnan(src1[lane])) {
23322  vdst[lane] = NAN;
23323  } else if ((std::fpclassify(src0[lane]) == FP_SUBNORMAL ||
23324  std::fpclassify(src0[lane]) == FP_ZERO) &&
23325  !std::signbit(src0[lane])) {
23326  if (std::isinf(src1[lane])) {
23327  vdst[lane] = NAN;
23328  } else if (!std::signbit(src1[lane])) {
23329  vdst[lane] = +0.0;
23330  } else {
23331  vdst[lane] = -0.0;
23332  }
23333  } else if ((std::fpclassify(src0[lane]) == FP_SUBNORMAL ||
23334  std::fpclassify(src0[lane]) == FP_ZERO) &&
23335  std::signbit(src0[lane])) {
23336  if (std::isinf(src1[lane])) {
23337  vdst[lane] = NAN;
23338  } else if (std::signbit(src1[lane])) {
23339  vdst[lane] = +0.0;
23340  } else {
23341  vdst[lane] = -0.0;
23342  }
23343  } else if (std::isinf(src0[lane]) &&
23344  !std::signbit(src0[lane])) {
23345  if (std::fpclassify(src1[lane]) == FP_SUBNORMAL ||
23346  std::fpclassify(src1[lane]) == FP_ZERO) {
23347  vdst[lane] = NAN;
23348  } else if (!std::signbit(src1[lane])) {
23349  vdst[lane] = +INFINITY;
23350  } else {
23351  vdst[lane] = -INFINITY;
23352  }
23353  } else if (std::isinf(src0[lane]) &&
23354  std::signbit(src0[lane])) {
23355  if (std::fpclassify(src1[lane]) == FP_SUBNORMAL ||
23356  std::fpclassify(src1[lane]) == FP_ZERO) {
23357  vdst[lane] = NAN;
23358  } else if (std::signbit(src1[lane])) {
23359  vdst[lane] = +INFINITY;
23360  } else {
23361  vdst[lane] = -INFINITY;
23362  }
23363  } else {
23364  vdst[lane] = src0[lane] * src1[lane];
23365  }
23366  }
23367  }
23368 
23369  vdst.write();
23370  }
23371 
23373  : Inst_VOP3(iFmt, "v_mul_f32", false)
23374  {
23375  setFlag(ALU);
23376  setFlag(F32);
23377  } // Inst_VOP3__V_MUL_F32
23378 
23380  {
23381  } // ~Inst_VOP3__V_MUL_F32
23382 
23383  // D.f = S0.f * S1.f.
23384  void
23386  {
23387  Wavefront *wf = gpuDynInst->wavefront();
23388  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
23389  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
23390  VecOperandF32 vdst(gpuDynInst, instData.VDST);
23391 
23392  src0.readSrc();
23393  src1.readSrc();
23394 
23395  if (instData.ABS & 0x1) {
23396  src0.absModifier();
23397  }
23398 
23399  if (instData.ABS & 0x2) {
23400  src1.absModifier();
23401  }
23402 
23403  if (extData.NEG & 0x1) {
23404  src0.negModifier();
23405  }
23406 
23407  if (extData.NEG & 0x2) {
23408  src1.negModifier();
23409  }
23410 
23414  assert(!(instData.ABS & 0x4));
23415  assert(!(extData.NEG & 0x4));
23416 
23417  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23418  if (wf->execMask(lane)) {
23419  if (std::isnan(src0[lane]) ||
23420  std::isnan(src1[lane])) {
23421  vdst[lane] = NAN;
23422  } else if ((std::fpclassify(src0[lane]) == FP_SUBNORMAL ||
23423  std::fpclassify(src0[lane]) == FP_ZERO) &&
23424  !std::signbit(src0[lane])) {
23425  if (std::isinf(src1[lane])) {
23426  vdst[lane] = NAN;
23427  } else if (!std::signbit(src1[lane])) {
23428  vdst[lane] = +0.0;
23429  } else {
23430  vdst[lane] = -0.0;
23431  }
23432  } else if ((std::fpclassify(src0[lane]) == FP_SUBNORMAL ||
23433  std::fpclassify(src0[lane]) == FP_ZERO) &&
23434  std::signbit(src0[lane])) {
23435  if (std::isinf(src1[lane])) {
23436  vdst[lane] = NAN;
23437  } else if (std::signbit(src1[lane])) {
23438  vdst[lane] = +0.0;
23439  } else {
23440  vdst[lane] = -0.0;
23441  }
23442  } else if (std::isinf(src0[lane]) &&
23443  !std::signbit(src0[lane])) {
23444  if (std::fpclassify(src1[lane]) == FP_SUBNORMAL ||
23445  std::fpclassify(src1[lane]) == FP_ZERO) {
23446  vdst[lane] = NAN;
23447  } else if (!std::signbit(src1[lane])) {
23448  vdst[lane] = +INFINITY;
23449  } else {
23450  vdst[lane] = -INFINITY;
23451  }
23452  } else if (std::isinf(src0[lane]) &&
23453  std::signbit(src0[lane])) {
23454  if (std::fpclassify(src1[lane]) == FP_SUBNORMAL ||
23455  std::fpclassify(src1[lane]) == FP_ZERO) {
23456  vdst[lane] = NAN;
23457  } else if (std::signbit(src1[lane])) {
23458  vdst[lane] = +INFINITY;
23459  } else {
23460  vdst[lane] = -INFINITY;
23461  }
23462  } else {
23463  vdst[lane] = src0[lane] * src1[lane];
23464  }
23465  }
23466  }
23467 
23468  vdst.write();
23469  }
23470 
23472  : Inst_VOP3(iFmt, "v_mul_i32_i24", false)
23473  {
23474  setFlag(ALU);
23475  } // Inst_VOP3__V_MUL_I32_I24
23476 
23478  {
23479  } // ~Inst_VOP3__V_MUL_I32_I24
23480 
23481  // D.i = S0.i[23:0] * S1.i[23:0].
23482  void
23484  {
23485  Wavefront *wf = gpuDynInst->wavefront();
23486  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
23487  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
23488  VecOperandI32 vdst(gpuDynInst, instData.VDST);
23489 
23490  src0.readSrc();
23491  src1.read();
23492 
23496  assert(!(instData.ABS & 0x1));
23497  assert(!(instData.ABS & 0x2));
23498  assert(!(instData.ABS & 0x4));
23499  assert(!(extData.NEG & 0x1));
23500  assert(!(extData.NEG & 0x2));
23501  assert(!(extData.NEG & 0x4));
23502 
23503  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23504  if (wf->execMask(lane)) {
23505  vdst[lane] = szext<24>(src0[lane]) * szext<24>(src1[lane]);
23506  }
23507  }
23508 
23509  vdst.write();
23510  }
23511 
23513  : Inst_VOP3(iFmt, "v_mul_hi_i32_i24", false)
23514  {
23515  setFlag(ALU);
23516  } // Inst_VOP3__V_MUL_HI_I32_I24
23517 
23519  {
23520  } // ~Inst_VOP3__V_MUL_HI_I32_I24
23521 
23522  // D.i = (S0.i[23:0] * S1.i[23:0]) >> 32.
23523  void
23525  {
23526  Wavefront *wf = gpuDynInst->wavefront();
23527  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
23528  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
23529  VecOperandI32 vdst(gpuDynInst, instData.VDST);
23530 
23531  src0.readSrc();
23532  src1.readSrc();
23533 
23537  assert(!(instData.ABS & 0x1));
23538  assert(!(instData.ABS & 0x2));
23539  assert(!(instData.ABS & 0x4));
23540  assert(!(extData.NEG & 0x1));
23541  assert(!(extData.NEG & 0x2));
23542  assert(!(extData.NEG & 0x4));
23543 
23544  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23545  if (wf->execMask(lane)) {
23546  VecElemI64 tmp_src0 = (VecElemI64)szext<24>(src0[lane]);
23547  VecElemI64 tmp_src1 = (VecElemI64)szext<24>(src1[lane]);
23548 
23549  vdst[lane] = (VecElemI32)((tmp_src0 * tmp_src1) >> 32);
23550  }
23551  }
23552 
23553  vdst.write();
23554  }
23555 
23557  : Inst_VOP3(iFmt, "v_mul_u32_u24", false)
23558  {
23559  setFlag(ALU);
23560  } // Inst_VOP3__V_MUL_U32_U24
23561 
23563  {
23564  } // ~Inst_VOP3__V_MUL_U32_U24
23565 
23566  // D.u = S0.u[23:0] * S1.u[23:0].
23567  void
23569  {
23570  Wavefront *wf = gpuDynInst->wavefront();
23571  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
23572  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
23573  VecOperandU32 vdst(gpuDynInst, instData.VDST);
23574 
23575  src0.readSrc();
23576  src1.readSrc();
23577 
23581  assert(!(instData.ABS & 0x1));
23582  assert(!(instData.ABS & 0x2));
23583  assert(!(instData.ABS & 0x4));
23584  assert(!(extData.NEG & 0x1));
23585  assert(!(extData.NEG & 0x2));
23586  assert(!(extData.NEG & 0x4));
23587 
23588  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23589  if (wf->execMask(lane)) {
23590  vdst[lane] = bits(src0[lane], 23, 0) * bits(src1[lane], 23, 0);
23591  }
23592  }
23593 
23594  vdst.write();
23595  }
23596 
23598  : Inst_VOP3(iFmt, "v_mul_hi_u32_u24", false)
23599  {
23600  setFlag(ALU);
23601  } // Inst_VOP3__V_MUL_HI_U32_U24
23602 
23604  {
23605  } // ~Inst_VOP3__V_MUL_HI_U32_U24
23606 
23607  // D.i = (S0.u[23:0] * S1.u[23:0]) >> 32.
23608  void
23610  {
23611  Wavefront *wf = gpuDynInst->wavefront();
23612  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
23613  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
23614  VecOperandU32 vdst(gpuDynInst, instData.VDST);
23615 
23616  src0.readSrc();
23617  src1.readSrc();
23618 
23622  assert(!(instData.ABS & 0x1));
23623  assert(!(instData.ABS & 0x2));
23624  assert(!(instData.ABS & 0x4));
23625  assert(!(extData.NEG & 0x1));
23626  assert(!(extData.NEG & 0x2));
23627  assert(!(extData.NEG & 0x4));
23628 
23629  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23630  if (wf->execMask(lane)) {
23631  VecElemU64 tmp_src0 = (VecElemU64)bits(src0[lane], 23, 0);
23632  VecElemU64 tmp_src1 = (VecElemU64)bits(src1[lane], 23, 0);
23633  vdst[lane] = (VecElemU32)((tmp_src0 * tmp_src1) >> 32);
23634  }
23635  }
23636 
23637  vdst.write();
23638  }
23639 
23641  : Inst_VOP3(iFmt, "v_min_f32", false)
23642  {
23643  setFlag(ALU);
23644  setFlag(F32);
23645  } // Inst_VOP3__V_MIN_F32
23646 
23648  {
23649  } // ~Inst_VOP3__V_MIN_F32
23650 
23651  // D.f = (S0.f < S1.f ? S0.f : S1.f).
23652  void
23654  {
23655  Wavefront *wf = gpuDynInst->wavefront();
23656  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
23657  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
23658  VecOperandF32 vdst(gpuDynInst, instData.VDST);
23659 
23660  src0.readSrc();
23661  src1.readSrc();
23662 
23663  if (instData.ABS & 0x1) {
23664  src0.absModifier();
23665  }
23666 
23667  if (instData.ABS & 0x2) {
23668  src1.absModifier();
23669  }
23670 
23671  if (extData.NEG & 0x1) {
23672  src0.negModifier();
23673  }
23674 
23675  if (extData.NEG & 0x2) {
23676  src1.negModifier();
23677  }
23678 
23682  assert(!(instData.ABS & 0x4));
23683  assert(!(extData.NEG & 0x4));
23684 
23685  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23686  if (wf->execMask(lane)) {
23687  vdst[lane] = std::fmin(src0[lane], src1[lane]);
23688  }
23689  }
23690 
23691  vdst.write();
23692  }
23693 
23695  : Inst_VOP3(iFmt, "v_max_f32", false)
23696  {
23697  setFlag(ALU);
23698  setFlag(F32);
23699  } // Inst_VOP3__V_MAX_F32
23700 
23702  {
23703  } // ~Inst_VOP3__V_MAX_F32
23704 
23705  // D.f = (S0.f >= S1.f ? S0.f : S1.f).
23706  void
23708  {
23709  Wavefront *wf = gpuDynInst->wavefront();
23710  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
23711  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
23712  VecOperandF32 vdst(gpuDynInst, instData.VDST);
23713 
23714  src0.readSrc();
23715  src1.readSrc();
23716 
23717  if (instData.ABS & 0x1) {
23718  src0.absModifier();
23719  }
23720 
23721  if (instData.ABS & 0x2) {
23722  src1.absModifier();
23723  }
23724 
23725  if (extData.NEG & 0x1) {
23726  src0.negModifier();
23727  }
23728 
23729  if (extData.NEG & 0x2) {
23730  src1.negModifier();
23731  }
23732 
23736  assert(!(instData.ABS & 0x4));
23737  assert(!(extData.NEG & 0x4));
23738 
23739  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23740  if (wf->execMask(lane)) {
23741  vdst[lane] = std::fmax(src0[lane], src1[lane]);
23742  }
23743  }
23744 
23745  vdst.write();
23746  }
23747 
23749  : Inst_VOP3(iFmt, "v_min_i32", false)
23750  {
23751  setFlag(ALU);
23752  } // Inst_VOP3__V_MIN_I32
23753 
23755  {
23756  } // ~Inst_VOP3__V_MIN_I32
23757 
23758  // D.i = min(S0.i, S1.i).
23759  void
23761  {
23762  Wavefront *wf = gpuDynInst->wavefront();
23763  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
23764  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
23765  VecOperandI32 vdst(gpuDynInst, instData.VDST);
23766 
23767  src0.readSrc();
23768  src1.readSrc();
23769 
23773  assert(!(instData.ABS & 0x1));
23774  assert(!(instData.ABS & 0x2));
23775  assert(!(instData.ABS & 0x4));
23776  assert(!(extData.NEG & 0x1));
23777  assert(!(extData.NEG & 0x2));
23778  assert(!(extData.NEG & 0x4));
23779 
23780  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23781  if (wf->execMask(lane)) {
23782  vdst[lane] = std::min(src0[lane], src1[lane]);
23783  }
23784  }
23785 
23786  vdst.write();
23787  }
23788 
23790  : Inst_VOP3(iFmt, "v_max_i32", false)
23791  {
23792  setFlag(ALU);
23793  } // Inst_VOP3__V_MAX_I32
23794 
23796  {
23797  } // ~Inst_VOP3__V_MAX_I32
23798 
23799  // D.i = max(S0.i, S1.i).
23800  void
23802  {
23803  Wavefront *wf = gpuDynInst->wavefront();
23804  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
23805  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
23806  VecOperandI32 vdst(gpuDynInst, instData.VDST);
23807 
23808  src0.readSrc();
23809  src1.readSrc();
23810 
23814  assert(!(instData.ABS & 0x1));
23815  assert(!(instData.ABS & 0x2));
23816  assert(!(instData.ABS & 0x4));
23817  assert(!(extData.NEG & 0x1));
23818  assert(!(extData.NEG & 0x2));
23819  assert(!(extData.NEG & 0x4));
23820 
23821  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23822  if (wf->execMask(lane)) {
23823  vdst[lane] = std::max(src0[lane], src1[lane]);
23824  }
23825  }
23826 
23827  vdst.write();
23828  }
23829 
23831  : Inst_VOP3(iFmt, "v_min_u32", false)
23832  {
23833  setFlag(ALU);
23834  } // Inst_VOP3__V_MIN_U32
23835 
23837  {
23838  } // ~Inst_VOP3__V_MIN_U32
23839 
23840  // D.u = min(S0.u, S1.u).
23841  void
23843  {
23844  Wavefront *wf = gpuDynInst->wavefront();
23845  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
23846  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
23847  VecOperandU32 vdst(gpuDynInst, instData.VDST);
23848 
23849  src0.readSrc();
23850  src1.readSrc();
23851 
23855  assert(!(instData.ABS & 0x1));
23856  assert(!(instData.ABS & 0x2));
23857  assert(!(instData.ABS & 0x4));
23858  assert(!(extData.NEG & 0x1));
23859  assert(!(extData.NEG & 0x2));
23860  assert(!(extData.NEG & 0x4));
23861 
23862  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23863  if (wf->execMask(lane)) {
23864  vdst[lane] = std::min(src0[lane], src1[lane]);
23865  }
23866  }
23867 
23868  vdst.write();
23869  }
23870 
23872  : Inst_VOP3(iFmt, "v_max_u32", false)
23873  {
23874  setFlag(ALU);
23875  } // Inst_VOP3__V_MAX_U32
23876 
23878  {
23879  } // ~Inst_VOP3__V_MAX_U32
23880 
23881  // D.u = max(S0.u, S1.u).
23882  void
23884  {
23885  Wavefront *wf = gpuDynInst->wavefront();
23886  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
23887  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
23888  VecOperandU32 vdst(gpuDynInst, instData.VDST);
23889 
23890  src0.readSrc();
23891  src1.readSrc();
23892 
23896  assert(!(instData.ABS & 0x1));
23897  assert(!(instData.ABS & 0x2));
23898  assert(!(instData.ABS & 0x4));
23899  assert(!(extData.NEG & 0x1));
23900  assert(!(extData.NEG & 0x2));
23901  assert(!(extData.NEG & 0x4));
23902 
23903  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23904  if (wf->execMask(lane)) {
23905  vdst[lane] = std::max(src0[lane], src1[lane]);
23906  }
23907  }
23908 
23909  vdst.write();
23910  }
23911 
23913  : Inst_VOP3(iFmt, "v_lshrrev_b32", false)
23914  {
23915  setFlag(ALU);
23916  } // Inst_VOP3__V_LSHRREV_B32
23917 
23919  {
23920  } // ~Inst_VOP3__V_LSHRREV_B32
23921 
23922  // D.u = S1.u >> S0.u[4:0].
23923  // The vacated bits are set to zero.
23924  void
23926  {
23927  Wavefront *wf = gpuDynInst->wavefront();
23928  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
23929  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
23930  VecOperandU32 vdst(gpuDynInst, instData.VDST);
23931 
23932  src0.readSrc();
23933  src1.readSrc();
23934 
23938  assert(!(instData.ABS & 0x1));
23939  assert(!(instData.ABS & 0x2));
23940  assert(!(instData.ABS & 0x4));
23941  assert(!(extData.NEG & 0x1));
23942  assert(!(extData.NEG & 0x2));
23943  assert(!(extData.NEG & 0x4));
23944 
23945  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23946  if (wf->execMask(lane)) {
23947  vdst[lane] = src1[lane] >> bits(src0[lane], 4, 0);
23948  }
23949  }
23950 
23951  vdst.write();
23952  }
23953 
23955  : Inst_VOP3(iFmt, "v_ashrrev_i32", false)
23956  {
23957  setFlag(ALU);
23958  } // Inst_VOP3__V_ASHRREV_I32
23959 
23961  {
23962  } // ~Inst_VOP3__V_ASHRREV_I32
23963 
23964  // D.i = signext(S1.i) >> S0.i[4:0].
23965  // The vacated bits are set to the sign bit of the input value.
23966  void
23968  {
23969  Wavefront *wf = gpuDynInst->wavefront();
23970  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
23971  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
23972  VecOperandI32 vdst(gpuDynInst, instData.VDST);
23973 
23974  src0.readSrc();
23975  src1.readSrc();
23976 
23980  assert(!(instData.ABS & 0x1));
23981  assert(!(instData.ABS & 0x2));
23982  assert(!(instData.ABS & 0x4));
23983  assert(!(extData.NEG & 0x1));
23984  assert(!(extData.NEG & 0x2));
23985  assert(!(extData.NEG & 0x4));
23986 
23987  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
23988  if (wf->execMask(lane)) {
23989  vdst[lane] = src1[lane] >> bits(src0[lane], 4, 0);
23990  }
23991  }
23992 
23993  vdst.write();
23994  }
23995 
23997  : Inst_VOP3(iFmt, "v_lshlrev_b32", false)
23998  {
23999  setFlag(ALU);
24000  } // Inst_VOP3__V_LSHLREV_B32
24001 
24003  {
24004  } // ~Inst_VOP3__V_LSHLREV_B32
24005 
24006  // D.u = S1.u << S0.u[4:0].
24007  void
24009  {
24010  Wavefront *wf = gpuDynInst->wavefront();
24011  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
24012  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
24013  VecOperandU32 vdst(gpuDynInst, instData.VDST);
24014 
24015  src0.readSrc();
24016  src1.readSrc();
24017 
24021  assert(!(instData.ABS & 0x1));
24022  assert(!(instData.ABS & 0x2));
24023  assert(!(instData.ABS & 0x4));
24024  assert(!(extData.NEG & 0x1));
24025  assert(!(extData.NEG & 0x2));
24026  assert(!(extData.NEG & 0x4));
24027 
24028  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24029  if (wf->execMask(lane)) {
24030  vdst[lane] = src1[lane] << bits(src0[lane], 4, 0);
24031  }
24032  }
24033 
24034  vdst.write();
24035  }
24036 
24038  : Inst_VOP3(iFmt, "v_and_b32", false)
24039  {
24040  setFlag(ALU);
24041  } // Inst_VOP3__V_AND_B32
24042 
24044  {
24045  } // ~Inst_VOP3__V_AND_B32
24046 
24047  // D.u = S0.u & S1.u.
24048  // Input and output modifiers not supported.
24049  void
24051  {
24052  Wavefront *wf = gpuDynInst->wavefront();
24053  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
24054  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
24055  VecOperandU32 vdst(gpuDynInst, instData.VDST);
24056 
24057  src0.readSrc();
24058  src1.readSrc();
24059 
24063  assert(!(instData.ABS & 0x1));
24064  assert(!(instData.ABS & 0x2));
24065  assert(!(instData.ABS & 0x4));
24066  assert(!(extData.NEG & 0x1));
24067  assert(!(extData.NEG & 0x2));
24068  assert(!(extData.NEG & 0x4));
24069 
24070  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24071  if (wf->execMask(lane)) {
24072  vdst[lane] = src0[lane] & src1[lane];
24073  }
24074  }
24075 
24076  vdst.write();
24077  }
24078 
24080  : Inst_VOP3(iFmt, "v_or_b32", false)
24081  {
24082  setFlag(ALU);
24083  } // Inst_VOP3__V_OR_B32
24084 
24086  {
24087  } // ~Inst_VOP3__V_OR_B32
24088 
24089  // D.u = S0.u | S1.u.
24090  // Input and output modifiers not supported.
24091  void
24093  {
24094  Wavefront *wf = gpuDynInst->wavefront();
24095  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
24096  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
24097  VecOperandU32 vdst(gpuDynInst, instData.VDST);
24098 
24099  src0.readSrc();
24100  src1.readSrc();
24101 
24105  assert(!(instData.ABS & 0x1));
24106  assert(!(instData.ABS & 0x2));
24107  assert(!(instData.ABS & 0x4));
24108  assert(!(extData.NEG & 0x1));
24109  assert(!(extData.NEG & 0x2));
24110  assert(!(extData.NEG & 0x4));
24111 
24112  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24113  if (wf->execMask(lane)) {
24114  vdst[lane] = src0[lane] | src1[lane];
24115  }
24116  }
24117 
24118  vdst.write();
24119  }
24120 
24122  : Inst_VOP3(iFmt, "v_xor_b32", false)
24123  {
24124  setFlag(ALU);
24125  } // Inst_VOP3__V_XOR_B32
24126 
24128  {
24129  } // ~Inst_VOP3__V_XOR_B32
24130 
24131  // D.u = S0.u ^ S1.u.
24132  // Input and output modifiers not supported.
24133  void
24135  {
24136  Wavefront *wf = gpuDynInst->wavefront();
24137  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
24138  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
24139  VecOperandU32 vdst(gpuDynInst, instData.VDST);
24140 
24141  src0.readSrc();
24142  src1.readSrc();
24143 
24147  assert(!(instData.ABS & 0x1));
24148  assert(!(instData.ABS & 0x2));
24149  assert(!(instData.ABS & 0x4));
24150  assert(!(extData.NEG & 0x1));
24151  assert(!(extData.NEG & 0x2));
24152  assert(!(extData.NEG & 0x4));
24153 
24154  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24155  if (wf->execMask(lane)) {
24156  vdst[lane] = src0[lane] ^ src1[lane];
24157  }
24158  }
24159 
24160  vdst.write();
24161  }
24162 
24164  : Inst_VOP3(iFmt, "v_mac_f32", false)
24165  {
24166  setFlag(ALU);
24167  setFlag(F32);
24168  setFlag(MAC);
24169  } // Inst_VOP3__V_MAC_F32
24170 
24172  {
24173  } // ~Inst_VOP3__V_MAC_F32
24174 
24175  // D.f = S0.f * S1.f + D.f.
24176  void
24178  {
24179  Wavefront *wf = gpuDynInst->wavefront();
24180  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
24181  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
24182  VecOperandF32 vdst(gpuDynInst, instData.VDST);
24183 
24184  src0.readSrc();
24185  src1.readSrc();
24186  vdst.read();
24187 
24188  if (instData.ABS & 0x1) {
24189  src0.absModifier();
24190  }
24191 
24192  if (instData.ABS & 0x2) {
24193  src1.absModifier();
24194  }
24195 
24196  if (extData.NEG & 0x1) {
24197  src0.negModifier();
24198  }
24199 
24200  if (extData.NEG & 0x2) {
24201  src1.negModifier();
24202  }
24203 
24207  assert(!(instData.ABS & 0x4));
24208  assert(!(extData.NEG & 0x4));
24209 
24210  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24211  if (wf->execMask(lane)) {
24212  vdst[lane] = std::fma(src0[lane], src1[lane], vdst[lane]);
24213  }
24214  }
24215 
24216  vdst.write();
24217  }
24218 
24220  : Inst_VOP3_SDST_ENC(iFmt, "v_add_u32")
24221  {
24222  setFlag(ALU);
24223  setFlag(WritesVCC);
24224  } // Inst_VOP3__V_ADD_U32
24225 
24227  {
24228  } // ~Inst_VOP3__V_ADD_U32
24229 
24230  // D.u = S0.u + S1.u;
24231  // VCC[threadId] = (S0.u + S1.u >= 0x800000000ULL ? 1 : 0) is an UNSIGNED
24232  // overflow or carry-out.
24233  // In VOP3 the VCC destination may be an arbitrary SGPR-pair.
24234  void
24236  {
24237  Wavefront *wf = gpuDynInst->wavefront();
24238  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
24239  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
24240  VecOperandU32 vdst(gpuDynInst, instData.VDST);
24241  ScalarOperandU64 vcc(gpuDynInst, instData.SDST);
24242 
24243  src0.readSrc();
24244  src1.readSrc();
24245 
24249  assert(!(extData.NEG & 0x1));
24250  assert(!(extData.NEG & 0x2));
24251  assert(!(extData.NEG & 0x4));
24252 
24253  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24254  if (wf->execMask(lane)) {
24255  vdst[lane] = src0[lane] + src1[lane];
24256  vcc.setBit(lane, ((VecElemU64)src0[lane]
24257  + (VecElemU64)src1[lane]) >= 0x100000000ULL ? 1 : 0);
24258  }
24259  }
24260 
24261  vdst.write();
24262  vcc.write();
24263  }
24264 
24266  : Inst_VOP3_SDST_ENC(iFmt, "v_sub_u32")
24267  {
24268  setFlag(ALU);
24269  setFlag(WritesVCC);
24270  } // Inst_VOP3__V_SUB_U32
24271 
24273  {
24274  } // ~Inst_VOP3__V_SUB_U32
24275 
24276  // D.u = S0.u - S1.u;
24277  // VCC[threadId] = (S1.u > S0.u ? 1 : 0) is an UNSIGNED overflow or
24278  // carry-out.
24279  // In VOP3 the VCC destination may be an arbitrary SGPR-pair.
24280  void
24282  {
24283  Wavefront *wf = gpuDynInst->wavefront();
24284  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
24285  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
24286  VecOperandU32 vdst(gpuDynInst, instData.VDST);
24287  ScalarOperandU64 vcc(gpuDynInst, instData.SDST);
24288 
24289  src0.readSrc();
24290  src1.readSrc();
24291 
24295  assert(!(extData.NEG & 0x1));
24296  assert(!(extData.NEG & 0x2));
24297  assert(!(extData.NEG & 0x4));
24298 
24299  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24300  if (wf->execMask(lane)) {
24301  vdst[lane] = src0[lane] - src1[lane];
24302  vcc.setBit(lane, src1[lane] > src0[lane] ? 1 : 0);
24303  }
24304  }
24305 
24306  vdst.write();
24307  vcc.write();
24308  }
24309 
24311  InFmt_VOP3_SDST_ENC *iFmt)
24312  : Inst_VOP3_SDST_ENC(iFmt, "v_subrev_u32")
24313  {
24314  setFlag(ALU);
24315  setFlag(WritesVCC);
24316  } // Inst_VOP3__V_SUBREV_U32
24317 
24319  {
24320  } // ~Inst_VOP3__V_SUBREV_U32
24321 
24322  // D.u = S1.u - S0.u;
24323  // VCC[threadId] = (S0.u > S1.u ? 1 : 0) is an UNSIGNED overflow or
24324  // carry-out.
24325  // In VOP3 the VCC destination may be an arbitrary SGPR-pair.
24326  void
24328  {
24329  Wavefront *wf = gpuDynInst->wavefront();
24330  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
24331  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
24332  VecOperandU32 vdst(gpuDynInst, instData.VDST);
24333  ScalarOperandU64 vcc(gpuDynInst, instData.SDST);
24334 
24335  src0.readSrc();
24336  src1.readSrc();
24337 
24341  assert(!(extData.NEG & 0x1));
24342  assert(!(extData.NEG & 0x2));
24343  assert(!(extData.NEG & 0x4));
24344 
24345  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24346  if (wf->execMask(lane)) {
24347  vdst[lane] = src1[lane] - src0[lane];
24348  vcc.setBit(lane, src0[lane] > src1[lane] ? 1 : 0);
24349  }
24350  }
24351 
24352  vdst.write();
24353  vcc.write();
24354  }
24355 
24357  : Inst_VOP3_SDST_ENC(iFmt, "v_addc_u32")
24358  {
24359  setFlag(ALU);
24360  setFlag(WritesVCC);
24361  setFlag(ReadsVCC);
24362  } // Inst_VOP3__V_ADDC_U32
24363 
24365  {
24366  } // ~Inst_VOP3__V_ADDC_U32
24367 
24368  // D.u = S0.u + S1.u + VCC[threadId];
24369  // VCC[threadId] = (S0.u + S1.u + VCC[threadId] >= 0x100000000ULL ? 1 : 0)
24370  // is an UNSIGNED overflow.
24371  // In VOP3 the VCC destination may be an arbitrary SGPR-pair, and the VCC
24372  // source comes from the SGPR-pair at S2.u.
24373  void
24375  {
24376  Wavefront *wf = gpuDynInst->wavefront();
24377  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
24378  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
24379  ConstScalarOperandU64 vcc(gpuDynInst, extData.SRC2);
24380  VecOperandU32 vdst(gpuDynInst, instData.VDST);
24381  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
24382 
24383  src0.readSrc();
24384  src1.readSrc();
24385  vcc.read();
24386 
24390  assert(!(extData.NEG & 0x1));
24391  assert(!(extData.NEG & 0x2));
24392  assert(!(extData.NEG & 0x4));
24393 
24394  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24395  if (wf->execMask(lane)) {
24396  vdst[lane] = src0[lane] + src1[lane]
24397  + bits(vcc.rawData(), lane);
24398  sdst.setBit(lane, ((VecElemU64)src0[lane]
24399  + (VecElemU64)src1[lane]
24400  + (VecElemU64)bits(vcc.rawData(), lane))
24401  >= 0x100000000 ? 1 : 0);
24402  }
24403  }
24404 
24405  vdst.write();
24406  sdst.write();
24407  }
24408 
24410  : Inst_VOP3_SDST_ENC(iFmt, "v_subb_u32")
24411  {
24412  setFlag(ALU);
24413  setFlag(WritesVCC);
24414  setFlag(ReadsVCC);
24415  } // Inst_VOP3__V_SUBB_U32
24416 
24418  {
24419  } // ~Inst_VOP3__V_SUBB_U32
24420 
24421  // D.u = S0.u - S1.u - VCC[threadId];
24422  // VCC[threadId] = (S1.u + VCC[threadId] > S0.u ? 1 : 0) is an UNSIGNED
24423  // overflow.
24424  // In VOP3 the VCC destination may be an arbitrary SGPR-pair, and the VCC
24425  // source comes from the SGPR-pair at S2.u.
24426  void
24428  {
24429  Wavefront *wf = gpuDynInst->wavefront();
24430  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
24431  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
24432  ConstScalarOperandU64 vcc(gpuDynInst, extData.SRC2);
24433  ScalarOperandU64 sdst(gpuDynInst, instData.SDST);
24434  VecOperandU32 vdst(gpuDynInst, instData.VDST);
24435 
24436  src0.readSrc();
24437  src1.readSrc();
24438  vcc.read();
24439 
24443  assert(!(extData.NEG & 0x1));
24444  assert(!(extData.NEG & 0x2));
24445  assert(!(extData.NEG & 0x4));
24446 
24447  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24448  if (wf->execMask(lane)) {
24449  vdst[lane] = src0[lane] - src1[lane]
24450  - bits(vcc.rawData(), lane);
24451  sdst.setBit(lane, (src1[lane] + bits(vcc.rawData(), lane))
24452  > src0[lane] ? 1 : 0);
24453  }
24454  }
24455 
24456  vdst.write();
24457  sdst.write();
24458  }
24459 
24461  InFmt_VOP3_SDST_ENC *iFmt)
24462  : Inst_VOP3_SDST_ENC(iFmt, "v_subbrev_u32")
24463  {
24464  setFlag(ALU);
24465  setFlag(WritesVCC);
24466  setFlag(ReadsVCC);
24467  } // Inst_VOP3__V_SUBBREV_U32
24468 
24470  {
24471  } // ~Inst_VOP3__V_SUBBREV_U32
24472 
24473  // D.u = S1.u - S0.u - VCC[threadId];
24474  // VCC[threadId] = (S1.u + VCC[threadId] > S0.u ? 1 : 0) is an UNSIGNED
24475  // overflow.
24476  // In VOP3 the VCC destination may be an arbitrary SGPR-pair, and the VCC
24477  // source comes from the SGPR-pair at S2.u.
24478  void
24480  {
24481  Wavefront *wf = gpuDynInst->wavefront();
24482  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
24483  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
24484  ConstScalarOperandU64 sdst(gpuDynInst, instData.SDST);
24485  ScalarOperandU64 vcc(gpuDynInst, extData.SRC2);
24486  VecOperandU32 vdst(gpuDynInst, instData.VDST);
24487 
24488  src0.readSrc();
24489  src1.readSrc();
24490  vcc.read();
24491 
24495  assert(!(extData.NEG & 0x1));
24496  assert(!(extData.NEG & 0x2));
24497  assert(!(extData.NEG & 0x4));
24498 
24499  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24500  if (wf->execMask(lane)) {
24501  vdst[lane] = src1[lane] - src0[lane]
24502  - bits(vcc.rawData(), lane);
24503  sdst.setBit(lane, (src1[lane] + bits(vcc.rawData(), lane))
24504  > src0[lane] ? 1 : 0);
24505  }
24506  }
24507 
24508  vdst.write();
24509  sdst.write();
24510  }
24511 
24513  : Inst_VOP3(iFmt, "v_add_f16", false)
24514  {
24515  setFlag(ALU);
24516  setFlag(F16);
24517  } // Inst_VOP3__V_ADD_F16
24518 
24520  {
24521  } // ~Inst_VOP3__V_ADD_F16
24522 
24523  // D.f16 = S0.f16 + S1.f16.
24524  void
24526  {
24528  }
24529 
24531  : Inst_VOP3(iFmt, "v_sub_f16", false)
24532  {
24533  setFlag(ALU);
24534  setFlag(F16);
24535  } // Inst_VOP3__V_SUB_F16
24536 
24538  {
24539  } // ~Inst_VOP3__V_SUB_F16
24540 
24541  // D.f16 = S0.f16 - S1.f16.
24542  void
24544  {
24546  }
24547 
24549  : Inst_VOP3(iFmt, "v_subrev_f16", false)
24550  {
24551  setFlag(ALU);
24552  setFlag(F16);
24553  } // Inst_VOP3__V_SUBREV_F16
24554 
24556  {
24557  } // ~Inst_VOP3__V_SUBREV_F16
24558 
24559  // D.f16 = S1.f16 - S0.f16.
24560  void
24562  {
24564  }
24565 
24567  : Inst_VOP3(iFmt, "v_mul_f16", false)
24568  {
24569  setFlag(ALU);
24570  setFlag(F16);
24571  } // Inst_VOP3__V_MUL_F16
24572 
24574  {
24575  } // ~Inst_VOP3__V_MUL_F16
24576 
24577  // D.f16 = S0.f16 * S1.f16.
24578  void
24580  {
24582  }
24583 
24585  : Inst_VOP3(iFmt, "v_mac_f16", false)
24586  {
24587  setFlag(ALU);
24588  setFlag(F16);
24589  setFlag(MAC);
24590  } // Inst_VOP3__V_MAC_F16
24591 
24593  {
24594  } // ~Inst_VOP3__V_MAC_F16
24595 
24596  // D.f16 = S0.f16 * S1.f16 + D.f16.
24597  void
24599  {
24601  }
24602 
24604  : Inst_VOP3(iFmt, "v_add_u16", false)
24605  {
24606  setFlag(ALU);
24607  } // Inst_VOP3__V_ADD_U16
24608 
24610  {
24611  } // ~Inst_VOP3__V_ADD_U16
24612 
24613  // D.u16 = S0.u16 + S1.u16.
24614  void
24616  {
24617  Wavefront *wf = gpuDynInst->wavefront();
24618  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
24619  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
24620  VecOperandU16 vdst(gpuDynInst, instData.VDST);
24621 
24622  src0.readSrc();
24623  src1.readSrc();
24624 
24628  assert(!(instData.ABS & 0x1));
24629  assert(!(instData.ABS & 0x2));
24630  assert(!(instData.ABS & 0x4));
24631  assert(!(extData.NEG & 0x1));
24632  assert(!(extData.NEG & 0x2));
24633  assert(!(extData.NEG & 0x4));
24634 
24635  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24636  if (wf->execMask(lane)) {
24637  vdst[lane] = src0[lane] + src1[lane];
24638  }
24639  }
24640 
24641  vdst.write();
24642  }
24643 
24645  : Inst_VOP3(iFmt, "v_sub_u16", false)
24646  {
24647  setFlag(ALU);
24648  } // Inst_VOP3__V_SUB_U16
24649 
24651  {
24652  } // ~Inst_VOP3__V_SUB_U16
24653 
24654  // D.u16 = S0.u16 - S1.u16.
24655  void
24657  {
24658  Wavefront *wf = gpuDynInst->wavefront();
24659  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
24660  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
24661  VecOperandU16 vdst(gpuDynInst, instData.VDST);
24662 
24663  src0.readSrc();
24664  src1.readSrc();
24665 
24669  assert(!(instData.ABS & 0x1));
24670  assert(!(instData.ABS & 0x2));
24671  assert(!(instData.ABS & 0x4));
24672  assert(!(extData.NEG & 0x1));
24673  assert(!(extData.NEG & 0x2));
24674  assert(!(extData.NEG & 0x4));
24675 
24676  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24677  if (wf->execMask(lane)) {
24678  vdst[lane] = src0[lane] - src1[lane];
24679  }
24680  }
24681 
24682  vdst.write();
24683  }
24684 
24686  : Inst_VOP3(iFmt, "v_subrev_u16", false)
24687  {
24688  setFlag(ALU);
24689  } // Inst_VOP3__V_SUBREV_U16
24690 
24692  {
24693  } // ~Inst_VOP3__V_SUBREV_U16
24694 
24695  // D.u16 = S1.u16 - S0.u16.
24696  void
24698  {
24699  Wavefront *wf = gpuDynInst->wavefront();
24700  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
24701  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
24702  VecOperandU16 vdst(gpuDynInst, instData.VDST);
24703 
24704  src0.readSrc();
24705  src1.readSrc();
24706 
24710  assert(!(instData.ABS & 0x1));
24711  assert(!(instData.ABS & 0x2));
24712  assert(!(instData.ABS & 0x4));
24713  assert(!(extData.NEG & 0x1));
24714  assert(!(extData.NEG & 0x2));
24715  assert(!(extData.NEG & 0x4));
24716 
24717  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24718  if (wf->execMask(lane)) {
24719  vdst[lane] = src1[lane] - src0[lane];
24720  }
24721  }
24722 
24723  vdst.write();
24724  }
24725 
24727  : Inst_VOP3(iFmt, "v_mul_lo_u16", false)
24728  {
24729  setFlag(ALU);
24730  } // Inst_VOP3__V_MUL_LO_U16
24731 
24733  {
24734  } // ~Inst_VOP3__V_MUL_LO_U16
24735 
24736  // D.u16 = S0.u16 * S1.u16.
24737  void
24739  {
24740  Wavefront *wf = gpuDynInst->wavefront();
24741  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
24742  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
24743  VecOperandU16 vdst(gpuDynInst, instData.VDST);
24744 
24745  src0.readSrc();
24746  src1.readSrc();
24747 
24751  assert(!(instData.ABS & 0x1));
24752  assert(!(instData.ABS & 0x2));
24753  assert(!(instData.ABS & 0x4));
24754  assert(!(extData.NEG & 0x1));
24755  assert(!(extData.NEG & 0x2));
24756  assert(!(extData.NEG & 0x4));
24757 
24758  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24759  if (wf->execMask(lane)) {
24760  vdst[lane] = src0[lane] * src1[lane];
24761  }
24762  }
24763 
24764  vdst.write();
24765  }
24766 
24768  : Inst_VOP3(iFmt, "v_lshlrev_b16", false)
24769  {
24770  setFlag(ALU);
24771  } // Inst_VOP3__V_LSHLREV_B16
24772 
24774  {
24775  } // ~Inst_VOP3__V_LSHLREV_B16
24776 
24777  // D.u[15:0] = S1.u[15:0] << S0.u[3:0].
24778  void
24780  {
24781  Wavefront *wf = gpuDynInst->wavefront();
24782  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
24783  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
24784  VecOperandU16 vdst(gpuDynInst, instData.VDST);
24785 
24786  src0.readSrc();
24787  src1.readSrc();
24788 
24792  assert(!(instData.ABS & 0x1));
24793  assert(!(instData.ABS & 0x2));
24794  assert(!(instData.ABS & 0x4));
24795  assert(!(extData.NEG & 0x1));
24796  assert(!(extData.NEG & 0x2));
24797  assert(!(extData.NEG & 0x4));
24798 
24799  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24800  if (wf->execMask(lane)) {
24801  vdst[lane] = src1[lane] << bits(src0[lane], 3, 0);
24802  }
24803  }
24804 
24805  vdst.write();
24806  }
24807 
24809  : Inst_VOP3(iFmt, "v_lshrrev_b16", false)
24810  {
24811  setFlag(ALU);
24812  } // Inst_VOP3__V_LSHRREV_B16
24813 
24815  {
24816  } // ~Inst_VOP3__V_LSHRREV_B16
24817 
24818  // D.u[15:0] = S1.u[15:0] >> S0.u[3:0].
24819  // The vacated bits are set to zero.
24820  void
24822  {
24823  Wavefront *wf = gpuDynInst->wavefront();
24824  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
24825  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
24826  VecOperandU16 vdst(gpuDynInst, instData.VDST);
24827 
24828  src0.readSrc();
24829  src1.readSrc();
24830 
24831  if (instData.ABS & 0x1) {
24832  src0.absModifier();
24833  }
24834 
24835  if (instData.ABS & 0x2) {
24836  src1.absModifier();
24837  }
24838 
24839  if (extData.NEG & 0x1) {
24840  src0.negModifier();
24841  }
24842 
24843  if (extData.NEG & 0x2) {
24844  src1.negModifier();
24845  }
24846 
24847  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24848  if (wf->execMask(lane)) {
24849  vdst[lane] = src1[lane] >> bits(src0[lane], 3, 0);
24850  }
24851  }
24852 
24853  vdst.write();
24854  }
24855 
24857  : Inst_VOP3(iFmt, "v_ashrrev_i16", false)
24858  {
24859  setFlag(ALU);
24860  } // Inst_VOP3__V_ASHRREV_I16
24861 
24863  {
24864  } // ~Inst_VOP3__V_ASHRREV_I16
24865 
24866  // D.i[15:0] = signext(S1.i[15:0]) >> S0.i[3:0].
24867  // The vacated bits are set to the sign bit of the input value.
24868  void
24870  {
24871  Wavefront *wf = gpuDynInst->wavefront();
24872  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
24873  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
24874  VecOperandI16 vdst(gpuDynInst, instData.VDST);
24875 
24876  src0.readSrc();
24877  src1.readSrc();
24878 
24882  assert(!(instData.ABS & 0x1));
24883  assert(!(instData.ABS & 0x2));
24884  assert(!(instData.ABS & 0x4));
24885  assert(!(extData.NEG & 0x1));
24886  assert(!(extData.NEG & 0x2));
24887  assert(!(extData.NEG & 0x4));
24888 
24889  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24890  if (wf->execMask(lane)) {
24891  vdst[lane] = src1[lane] >> bits(src0[lane], 3, 0);
24892  }
24893  }
24894 
24895  vdst.write();
24896  }
24897 
24899  : Inst_VOP3(iFmt, "v_max_f16", false)
24900  {
24901  setFlag(ALU);
24902  setFlag(F16);
24903  } // Inst_VOP3__V_MAX_F16
24904 
24906  {
24907  } // ~Inst_VOP3__V_MAX_F16
24908 
24909  // D.f16 = max(S0.f16, S1.f16).
24910  void
24912  {
24914  }
24915 
24917  : Inst_VOP3(iFmt, "v_min_f16", false)
24918  {
24919  setFlag(ALU);
24920  setFlag(F16);
24921  } // Inst_VOP3__V_MIN_F16
24922 
24924  {
24925  } // ~Inst_VOP3__V_MIN_F16
24926 
24927  // D.f16 = min(S0.f16, S1.f16).
24928  void
24930  {
24932  }
24933 
24935  : Inst_VOP3(iFmt, "v_max_u16", false)
24936  {
24937  setFlag(ALU);
24938  } // Inst_VOP3__V_MAX_U16
24939 
24941  {
24942  } // ~Inst_VOP3__V_MAX_U16
24943 
24944  // D.u[15:0] = max(S0.u[15:0], S1.u[15:0]).
24945  void
24947  {
24948  Wavefront *wf = gpuDynInst->wavefront();
24949  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
24950  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
24951  VecOperandU16 vdst(gpuDynInst, instData.VDST);
24952 
24953  src0.readSrc();
24954  src1.readSrc();
24955 
24956  if (instData.ABS & 0x1) {
24957  src0.absModifier();
24958  }
24959 
24960  if (instData.ABS & 0x2) {
24961  src1.absModifier();
24962  }
24963 
24964  if (extData.NEG & 0x1) {
24965  src0.negModifier();
24966  }
24967 
24968  if (extData.NEG & 0x2) {
24969  src1.negModifier();
24970  }
24971 
24972  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
24973  if (wf->execMask(lane)) {
24974  vdst[lane] = std::max(src0[lane], src1[lane]);
24975  }
24976  }
24977 
24978  vdst.write();
24979  }
24980 
24982  : Inst_VOP3(iFmt, "v_max_i16", false)
24983  {
24984  setFlag(ALU);
24985  } // Inst_VOP3__V_MAX_I16
24986 
24988  {
24989  } // ~Inst_VOP3__V_MAX_I16
24990 
24991  // D.i[15:0] = max(S0.i[15:0], S1.i[15:0]).
24992  void
24994  {
24995  Wavefront *wf = gpuDynInst->wavefront();
24996  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
24997  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
24998  VecOperandI16 vdst(gpuDynInst, instData.VDST);
24999 
25000  src0.readSrc();
25001  src1.readSrc();
25002 
25003  if (instData.ABS & 0x1) {
25004  src0.absModifier();
25005  }
25006 
25007  if (instData.ABS & 0x2) {
25008  src1.absModifier();
25009  }
25010 
25011  if (extData.NEG & 0x1) {
25012  src0.negModifier();
25013  }
25014 
25015  if (extData.NEG & 0x2) {
25016  src1.negModifier();
25017  }
25018 
25019  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25020  if (wf->execMask(lane)) {
25021  vdst[lane] = std::max(src0[lane], src1[lane]);
25022  }
25023  }
25024 
25025  vdst.write();
25026  }
25027 
25029  : Inst_VOP3(iFmt, "v_min_u16", false)
25030  {
25031  setFlag(ALU);
25032  } // Inst_VOP3__V_MIN_U16
25033 
25035  {
25036  } // ~Inst_VOP3__V_MIN_U16
25037 
25038  // D.u[15:0] = min(S0.u[15:0], S1.u[15:0]).
25039  void
25041  {
25042  Wavefront *wf = gpuDynInst->wavefront();
25043  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
25044  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
25045  VecOperandU16 vdst(gpuDynInst, instData.VDST);
25046 
25047  src0.readSrc();
25048  src1.readSrc();
25049 
25050  if (instData.ABS & 0x1) {
25051  src0.absModifier();
25052  }
25053 
25054  if (instData.ABS & 0x2) {
25055  src1.absModifier();
25056  }
25057 
25058  if (extData.NEG & 0x1) {
25059  src0.negModifier();
25060  }
25061 
25062  if (extData.NEG & 0x2) {
25063  src1.negModifier();
25064  }
25065 
25066  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25067  if (wf->execMask(lane)) {
25068  vdst[lane] = std::min(src0[lane], src1[lane]);
25069  }
25070  }
25071 
25072  vdst.write();
25073  }
25074 
25076  : Inst_VOP3(iFmt, "v_min_i16", false)
25077  {
25078  setFlag(ALU);
25079  } // Inst_VOP3__V_MIN_I16
25080 
25082  {
25083  } // ~Inst_VOP3__V_MIN_I16
25084 
25085  // D.i[15:0] = min(S0.i[15:0], S1.i[15:0]).
25086  void
25088  {
25089  Wavefront *wf = gpuDynInst->wavefront();
25090  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
25091  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
25092  VecOperandI16 vdst(gpuDynInst, instData.VDST);
25093 
25094  src0.readSrc();
25095  src1.readSrc();
25096 
25097  if (instData.ABS & 0x1) {
25098  src0.absModifier();
25099  }
25100 
25101  if (instData.ABS & 0x2) {
25102  src1.absModifier();
25103  }
25104 
25105  if (extData.NEG & 0x1) {
25106  src0.negModifier();
25107  }
25108 
25109  if (extData.NEG & 0x2) {
25110  src1.negModifier();
25111  }
25112 
25113  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25114  if (wf->execMask(lane)) {
25115  vdst[lane] = std::min(src0[lane], src1[lane]);
25116  }
25117  }
25118 
25119  vdst.write();
25120  }
25121 
25123  : Inst_VOP3(iFmt, "v_ldexp_f16", false)
25124  {
25125  setFlag(ALU);
25126  setFlag(F16);
25127  } // Inst_VOP3__V_LDEXP_F16
25128 
25130  {
25131  } // ~Inst_VOP3__V_LDEXP_F16
25132 
25133  // D.f16 = S0.f16 * (2 ** S1.i16).
25134  void
25136  {
25138  }
25139 
25141  : Inst_VOP3(iFmt, "v_nop", false)
25142  {
25143  setFlag(Nop);
25144  setFlag(ALU);
25145  } // Inst_VOP3__V_NOP
25146 
25148  {
25149  } // ~Inst_VOP3__V_NOP
25150 
25151  // Do nothing.
25152  void
25154  {
25155  }
25156 
25158  : Inst_VOP3(iFmt, "v_mov_b32", false)
25159  {
25160  setFlag(ALU);
25161  } // Inst_VOP3__V_MOV_B32
25162 
25164  {
25165  } // ~Inst_VOP3__V_MOV_B32
25166 
25167  // D.u = S0.u.
25168  // Input and output modifiers not supported; this is an untyped operation.
25169  void
25171  {
25172  Wavefront *wf = gpuDynInst->wavefront();
25173  ConstVecOperandU32 src(gpuDynInst, extData.SRC0);
25174  VecOperandU32 vdst(gpuDynInst, instData.VDST);
25175 
25176  src.readSrc();
25177 
25178  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25179  if (wf->execMask(lane)) {
25180  vdst[lane] = src[lane];
25181  }
25182  }
25183 
25184  vdst.write();
25185  }
25186 
25188  : Inst_VOP3(iFmt, "v_cvt_i32_f64", false)
25189  {
25190  setFlag(ALU);
25191  setFlag(F64);
25192  } // Inst_VOP3__V_CVT_I32_F64
25193 
25195  {
25196  } // ~Inst_VOP3__V_CVT_I32_F64
25197 
25198  // D.i = (int)S0.d.
25199  // Out-of-range floating point values (including infinity) saturate. NaN
25200  // is converted to 0.
25201  void
25203  {
25204  Wavefront *wf = gpuDynInst->wavefront();
25205  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
25206  VecOperandI32 vdst(gpuDynInst, instData.VDST);
25207 
25208  src.readSrc();
25209 
25210  if (instData.ABS & 0x1) {
25211  src.absModifier();
25212  }
25213 
25214  if (extData.NEG & 0x1) {
25215  src.negModifier();
25216  }
25217 
25218  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25219  if (wf->execMask(lane)) {
25220  int exp;
25221  std::frexp(src[lane],&exp);
25222  if (std::isnan(src[lane])) {
25223  vdst[lane] = 0;
25224  } else if (std::isinf(src[lane]) || exp > 30) {
25225  if (std::signbit(src[lane])) {
25226  vdst[lane] = INT_MIN;
25227  } else {
25228  vdst[lane] = INT_MAX;
25229  }
25230  } else {
25231  vdst[lane] = (VecElemI32)src[lane];
25232  }
25233  }
25234  }
25235 
25236  vdst.write();
25237  }
25238 
25240  : Inst_VOP3(iFmt, "v_cvt_f64_i32", false)
25241  {
25242  setFlag(ALU);
25243  setFlag(F64);
25244  } // Inst_VOP3__V_CVT_F64_I32
25245 
25247  {
25248  } // ~Inst_VOP3__V_CVT_F64_I32
25249 
25250  // D.d = (double)S0.i.
25251  void
25253  {
25254  Wavefront *wf = gpuDynInst->wavefront();
25255  ConstVecOperandI32 src(gpuDynInst, extData.SRC0);
25256  VecOperandF64 vdst(gpuDynInst, instData.VDST);
25257 
25258  src.readSrc();
25259 
25260  if (instData.ABS & 0x1) {
25261  src.absModifier();
25262  }
25263 
25264  if (extData.NEG & 0x1) {
25265  src.negModifier();
25266  }
25267 
25268  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25269  if (wf->execMask(lane)) {
25270  vdst[lane] = (VecElemF64)src[lane];
25271  }
25272  }
25273 
25274  vdst.write();
25275  }
25276 
25278  : Inst_VOP3(iFmt, "v_cvt_f32_i32", false)
25279  {
25280  setFlag(ALU);
25281  setFlag(F32);
25282  } // Inst_VOP3__V_CVT_F32_I32
25283 
25285  {
25286  } // ~Inst_VOP3__V_CVT_F32_I32
25287 
25288  // D.f = (float)S0.i.
25289  void
25291  {
25292  Wavefront *wf = gpuDynInst->wavefront();
25293  VecOperandI32 src(gpuDynInst, extData.SRC0);
25294  VecOperandF32 vdst(gpuDynInst, instData.VDST);
25295 
25296  src.readSrc();
25297 
25301  assert(!(instData.ABS & 0x1));
25302  assert(!(instData.ABS & 0x2));
25303  assert(!(instData.ABS & 0x4));
25304  assert(!(extData.NEG & 0x1));
25305  assert(!(extData.NEG & 0x2));
25306  assert(!(extData.NEG & 0x4));
25307 
25308  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25309  if (wf->execMask(lane)) {
25310  vdst[lane] = (VecElemF32)src[lane];
25311  }
25312  }
25313 
25314  vdst.write();
25315  }
25316 
25318  : Inst_VOP3(iFmt, "v_cvt_f32_u32", false)
25319  {
25320  setFlag(ALU);
25321  setFlag(F32);
25322  } // Inst_VOP3__V_CVT_F32_U32
25323 
25325  {
25326  } // ~Inst_VOP3__V_CVT_F32_U32
25327 
25328  // D.f = (float)S0.u.
25329  void
25331  {
25332  Wavefront *wf = gpuDynInst->wavefront();
25333  ConstVecOperandU32 src(gpuDynInst, extData.SRC0);
25334  VecOperandF32 vdst(gpuDynInst, instData.VDST);
25335 
25336  src.readSrc();
25337 
25338  if (instData.ABS & 0x1) {
25339  src.absModifier();
25340  }
25341 
25342  if (extData.NEG & 0x1) {
25343  src.negModifier();
25344  }
25345 
25346  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25347  if (wf->execMask(lane)) {
25348  vdst[lane] = (VecElemF32)src[lane];
25349  }
25350  }
25351 
25352  vdst.write();
25353  }
25354 
25356  : Inst_VOP3(iFmt, "v_cvt_u32_f32", false)
25357  {
25358  setFlag(ALU);
25359  setFlag(F32);
25360  } // Inst_VOP3__V_CVT_U32_F32
25361 
25363  {
25364  } // ~Inst_VOP3__V_CVT_U32_F32
25365 
25366  // D.u = (unsigned)S0.f.
25367  // Out-of-range floating point values (including infinity) saturate. NaN
25368  // is converted to 0.
25369  void
25371  {
25372  Wavefront *wf = gpuDynInst->wavefront();
25373  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
25374  VecOperandU32 vdst(gpuDynInst, instData.VDST);
25375 
25376  src.readSrc();
25377 
25378  if (instData.ABS & 0x1) {
25379  src.absModifier();
25380  }
25381 
25382  if (extData.NEG & 0x1) {
25383  src.negModifier();
25384  }
25385 
25386  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25387  if (wf->execMask(lane)) {
25388  int exp;
25389  std::frexp(src[lane],&exp);
25390  if (std::isnan(src[lane])) {
25391  vdst[lane] = 0;
25392  } else if (std::isinf(src[lane])) {
25393  if (std::signbit(src[lane])) {
25394  vdst[lane] = 0;
25395  } else {
25396  vdst[lane] = UINT_MAX;
25397  }
25398  } else if (exp > 31) {
25399  vdst[lane] = UINT_MAX;
25400  } else {
25401  vdst[lane] = (VecElemU32)src[lane];
25402  }
25403  }
25404  }
25405 
25406  vdst.write();
25407  }
25408 
25410  : Inst_VOP3(iFmt, "v_cvt_i32_f32", false)
25411  {
25412  setFlag(ALU);
25413  setFlag(F32);
25414  } // Inst_VOP3__V_CVT_I32_F32
25415 
25417  {
25418  } // ~Inst_VOP3__V_CVT_I32_F32
25419 
25420  // D.i = (int)S0.f.
25421  // Out-of-range floating point values (including infinity) saturate. NaN
25422  // is converted to 0.
25423  void
25425  {
25426  Wavefront *wf = gpuDynInst->wavefront();
25427  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
25428  VecOperandI32 vdst(gpuDynInst, instData.VDST);
25429 
25430  src.readSrc();
25431 
25432  if (instData.ABS & 0x1) {
25433  src.absModifier();
25434  }
25435 
25436  if (extData.NEG & 0x1) {
25437  src.negModifier();
25438  }
25439 
25443  assert(!(instData.ABS & 0x2));
25444  assert(!(instData.ABS & 0x4));
25445  assert(!(extData.NEG & 0x2));
25446  assert(!(extData.NEG & 0x4));
25447 
25448  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25449  if (wf->execMask(lane)) {
25450  int exp;
25451  std::frexp(src[lane],&exp);
25452  if (std::isnan(src[lane])) {
25453  vdst[lane] = 0;
25454  } else if (std::isinf(src[lane]) || exp > 30) {
25455  if (std::signbit(src[lane])) {
25456  vdst[lane] = INT_MIN;
25457  } else {
25458  vdst[lane] = INT_MAX;
25459  }
25460  } else {
25461  vdst[lane] = (VecElemI32)src[lane];
25462  }
25463  }
25464  }
25465 
25466  vdst.write();
25467  }
25468 
25470  : Inst_VOP3(iFmt, "v_mov_fed_b32", false)
25471  {
25472  setFlag(ALU);
25473  } // Inst_VOP3__V_MOV_FED_B32
25474 
25476  {
25477  } // ~Inst_VOP3__V_MOV_FED_B32
25478 
25479  // D.u = S0.u;
25480  // Input and output modifiers not supported; this is an untyped operation.
25481  void
25483  {
25485  }
25486 
25488  : Inst_VOP3(iFmt, "v_cvt_f16_f32", false)
25489  {
25490  setFlag(ALU);
25491  setFlag(F32);
25492  } // Inst_VOP3__V_CVT_F16_F32
25493 
25495  {
25496  } // ~Inst_VOP3__V_CVT_F16_F32
25497 
25498  // D.f16 = flt32_to_flt16(S0.f).
25499  void
25501  {
25503  }
25504 
25506  : Inst_VOP3(iFmt, "v_cvt_f32_f16", false)
25507  {
25508  setFlag(ALU);
25509  setFlag(F32);
25510  } // Inst_VOP3__V_CVT_F32_F16
25511 
25513  {
25514  } // ~Inst_VOP3__V_CVT_F32_F16
25515 
25516  // D.f = flt16_to_flt32(S0.f16).
25517  void
25519  {
25521  }
25522 
25524  InFmt_VOP3 *iFmt)
25525  : Inst_VOP3(iFmt, "v_cvt_rpi_i32_f32", false)
25526  {
25527  setFlag(ALU);
25528  setFlag(F32);
25529  } // Inst_VOP3__V_CVT_RPI_I32_F32
25530 
25532  {
25533  } // ~Inst_VOP3__V_CVT_RPI_I32_F32
25534 
25535  // D.i = (int)floor(S0.f + 0.5).
25536  void
25538  {
25539  Wavefront *wf = gpuDynInst->wavefront();
25540  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
25541  VecOperandI32 vdst(gpuDynInst, instData.VDST);
25542 
25543  src.readSrc();
25544 
25545  if (instData.ABS & 0x1) {
25546  src.absModifier();
25547  }
25548 
25549  if (extData.NEG & 0x1) {
25550  src.negModifier();
25551  }
25552 
25553  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25554  if (wf->execMask(lane)) {
25555  vdst[lane] = (VecElemI32)std::floor(src[lane] + 0.5);
25556  }
25557  }
25558 
25559  vdst.write();
25560  }
25561 
25563  InFmt_VOP3 *iFmt)
25564  : Inst_VOP3(iFmt, "v_cvt_flr_i32_f32", false)
25565  {
25566  setFlag(ALU);
25567  setFlag(F32);
25568  } // Inst_VOP3__V_CVT_FLR_I32_F32
25569 
25571  {
25572  } // ~Inst_VOP3__V_CVT_FLR_I32_F32
25573 
25574  // D.i = (int)floor(S0.f).
25575  void
25577  {
25578  Wavefront *wf = gpuDynInst->wavefront();
25579  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
25580  VecOperandI32 vdst(gpuDynInst, instData.VDST);
25581 
25582  src.readSrc();
25583 
25584  if (instData.ABS & 0x1) {
25585  src.absModifier();
25586  }
25587 
25588  if (extData.NEG & 0x1) {
25589  src.negModifier();
25590  }
25591 
25592  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25593  if (wf->execMask(lane)) {
25594  vdst[lane] = (VecElemI32)std::floor(src[lane]);
25595  }
25596  }
25597 
25598  vdst.write();
25599  }
25600 
25602  : Inst_VOP3(iFmt, "v_cvt_off_f32_i4", false)
25603  {
25604  setFlag(ALU);
25605  setFlag(F32);
25606  } // Inst_VOP3__V_CVT_OFF_F32_I4
25607 
25609  {
25610  } // ~Inst_VOP3__V_CVT_OFF_F32_I4
25611 
25612  // 4-bit signed int to 32-bit float.
25613  void
25615  {
25617  }
25618 
25620  : Inst_VOP3(iFmt, "v_cvt_f32_f64", false)
25621  {
25622  setFlag(ALU);
25623  setFlag(F64);
25624  } // Inst_VOP3__V_CVT_F32_F64
25625 
25627  {
25628  } // ~Inst_VOP3__V_CVT_F32_F64
25629 
25630  // D.f = (float)S0.d.
25631  void
25633  {
25634  Wavefront *wf = gpuDynInst->wavefront();
25635  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
25636  VecOperandF32 vdst(gpuDynInst, instData.VDST);
25637 
25638  src.readSrc();
25639 
25640  if (instData.ABS & 0x1) {
25641  src.absModifier();
25642  }
25643 
25644  if (extData.NEG & 0x1) {
25645  src.negModifier();
25646  }
25647 
25651  assert(!(instData.ABS & 0x2));
25652  assert(!(instData.ABS & 0x4));
25653  assert(!(extData.NEG & 0x2));
25654  assert(!(extData.NEG & 0x4));
25655 
25656  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25657  if (wf->execMask(lane)) {
25658  vdst[lane] = (VecElemF32)src[lane];
25659  }
25660  }
25661 
25662  vdst.write();
25663  }
25664 
25666  : Inst_VOP3(iFmt, "v_cvt_f64_f32", false)
25667  {
25668  setFlag(ALU);
25669  setFlag(F64);
25670  } // Inst_VOP3__V_CVT_F64_F32
25671 
25673  {
25674  } // ~Inst_VOP3__V_CVT_F64_F32
25675 
25676  // D.d = (double)S0.f.
25677  void
25679  {
25680  Wavefront *wf = gpuDynInst->wavefront();
25681  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
25682  VecOperandF64 vdst(gpuDynInst, instData.VDST);
25683 
25684  src.readSrc();
25685 
25686  if (instData.ABS & 0x1) {
25687  src.absModifier();
25688  }
25689 
25690  if (extData.NEG & 0x1) {
25691  src.negModifier();
25692  }
25693 
25697  assert(!(instData.ABS & 0x2));
25698  assert(!(instData.ABS & 0x4));
25699  assert(!(extData.NEG & 0x2));
25700  assert(!(extData.NEG & 0x4));
25701 
25702  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25703  if (wf->execMask(lane)) {
25704  vdst[lane] = (VecElemF64)src[lane];
25705  }
25706  }
25707 
25708  vdst.write();
25709  }
25710 
25712  : Inst_VOP3(iFmt, "v_cvt_f32_ubyte0", false)
25713  {
25714  setFlag(ALU);
25715  setFlag(F32);
25716  } // Inst_VOP3__V_CVT_F32_UBYTE0
25717 
25719  {
25720  } // ~Inst_VOP3__V_CVT_F32_UBYTE0
25721 
25722  // D.f = (float)(S0.u[7:0]).
25723  void
25725  {
25726  Wavefront *wf = gpuDynInst->wavefront();
25727  ConstVecOperandU32 src(gpuDynInst, extData.SRC0);
25728  VecOperandF32 vdst(gpuDynInst, instData.VDST);
25729 
25730  src.readSrc();
25731 
25732  if (instData.ABS & 0x1) {
25733  src.absModifier();
25734  }
25735 
25736  if (extData.NEG & 0x1) {
25737  src.negModifier();
25738  }
25739 
25740  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25741  if (wf->execMask(lane)) {
25742  vdst[lane] = (VecElemF32)bits(src[lane], 7, 0);
25743  }
25744  }
25745 
25746  vdst.write();
25747  }
25748 
25750  : Inst_VOP3(iFmt, "v_cvt_f32_ubyte1", false)
25751  {
25752  setFlag(ALU);
25753  setFlag(F32);
25754  } // Inst_VOP3__V_CVT_F32_UBYTE1
25755 
25757  {
25758  } // ~Inst_VOP3__V_CVT_F32_UBYTE1
25759 
25760  // D.f = (float)(S0.u[15:8]).
25761  void
25763  {
25764  Wavefront *wf = gpuDynInst->wavefront();
25765  ConstVecOperandU32 src(gpuDynInst, extData.SRC0);
25766  VecOperandF32 vdst(gpuDynInst, instData.VDST);
25767 
25768  src.readSrc();
25769 
25770  if (instData.ABS & 0x1) {
25771  src.absModifier();
25772  }
25773 
25774  if (extData.NEG & 0x1) {
25775  src.negModifier();
25776  }
25777 
25778  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25779  if (wf->execMask(lane)) {
25780  vdst[lane] = (VecElemF32)bits(src[lane], 15, 8);
25781  }
25782  }
25783 
25784  vdst.write();
25785  }
25786 
25788  : Inst_VOP3(iFmt, "v_cvt_f32_ubyte2", false)
25789  {
25790  setFlag(ALU);
25791  setFlag(F32);
25792  } // Inst_VOP3__V_CVT_F32_UBYTE2
25793 
25795  {
25796  } // ~Inst_VOP3__V_CVT_F32_UBYTE2
25797 
25798  // D.f = (float)(S0.u[23:16]).
25799  void
25801  {
25802  Wavefront *wf = gpuDynInst->wavefront();
25803  ConstVecOperandU32 src(gpuDynInst, extData.SRC0);
25804  VecOperandF32 vdst(gpuDynInst, instData.VDST);
25805 
25806  src.readSrc();
25807 
25808  if (instData.ABS & 0x1) {
25809  src.absModifier();
25810  }
25811 
25812  if (extData.NEG & 0x1) {
25813  src.negModifier();
25814  }
25815 
25816  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25817  if (wf->execMask(lane)) {
25818  vdst[lane] = (VecElemF32)bits(src[lane], 23, 16);
25819  }
25820  }
25821 
25822  vdst.write();
25823  }
25824 
25826  : Inst_VOP3(iFmt, "v_cvt_f32_ubyte3", false)
25827  {
25828  setFlag(ALU);
25829  setFlag(F32);
25830  } // Inst_VOP3__V_CVT_F32_UBYTE3
25831 
25833  {
25834  } // ~Inst_VOP3__V_CVT_F32_UBYTE3
25835 
25836  // D.f = (float)(S0.u[31:24]).
25837  void
25839  {
25840  Wavefront *wf = gpuDynInst->wavefront();
25841  ConstVecOperandU32 src(gpuDynInst, extData.SRC0);
25842  VecOperandF32 vdst(gpuDynInst, instData.VDST);
25843 
25844  src.readSrc();
25845 
25846  if (instData.ABS & 0x1) {
25847  src.absModifier();
25848  }
25849 
25850  if (extData.NEG & 0x1) {
25851  src.negModifier();
25852  }
25853 
25854  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25855  if (wf->execMask(lane)) {
25856  vdst[lane] = (VecElemF32)bits(src[lane], 31, 24);
25857  }
25858  }
25859 
25860  vdst.write();
25861  }
25862 
25864  : Inst_VOP3(iFmt, "v_cvt_u32_f64", false)
25865  {
25866  setFlag(ALU);
25867  setFlag(F64);
25868  } // Inst_VOP3__V_CVT_U32_F64
25869 
25871  {
25872  } // ~Inst_VOP3__V_CVT_U32_F64
25873 
25874  // D.u = (unsigned)S0.d.
25875  // Out-of-range floating point values (including infinity) saturate. NaN
25876  // is converted to 0.
25877  void
25879  {
25880  Wavefront *wf = gpuDynInst->wavefront();
25881  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
25882  VecOperandU32 vdst(gpuDynInst, instData.VDST);
25883 
25884  src.readSrc();
25885 
25886  if (instData.ABS & 0x1) {
25887  src.absModifier();
25888  }
25889 
25890  if (extData.NEG & 0x1) {
25891  src.negModifier();
25892  }
25893 
25894  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25895  if (wf->execMask(lane)) {
25896  int exp;
25897  std::frexp(src[lane],&exp);
25898  if (std::isnan(src[lane])) {
25899  vdst[lane] = 0;
25900  } else if (std::isinf(src[lane])) {
25901  if (std::signbit(src[lane])) {
25902  vdst[lane] = 0;
25903  } else {
25904  vdst[lane] = UINT_MAX;
25905  }
25906  } else if (exp > 31) {
25907  vdst[lane] = UINT_MAX;
25908  } else {
25909  vdst[lane] = (VecElemU32)src[lane];
25910  }
25911  }
25912  }
25913 
25914  vdst.write();
25915  }
25916 
25918  : Inst_VOP3(iFmt, "v_cvt_f64_u32", false)
25919  {
25920  setFlag(ALU);
25921  setFlag(F64);
25922  } // Inst_VOP3__V_CVT_F64_U32
25923 
25925  {
25926  } // ~Inst_VOP3__V_CVT_F64_U32
25927 
25928  // D.d = (double)S0.u.
25929  void
25931  {
25932  Wavefront *wf = gpuDynInst->wavefront();
25933  ConstVecOperandU32 src(gpuDynInst, extData.SRC0);
25934  VecOperandF64 vdst(gpuDynInst, instData.VDST);
25935 
25936  src.readSrc();
25937 
25938  if (instData.ABS & 0x1) {
25939  src.absModifier();
25940  }
25941 
25942  if (extData.NEG & 0x1) {
25943  src.negModifier();
25944  }
25945 
25946  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25947  if (wf->execMask(lane)) {
25948  vdst[lane] = (VecElemF64)src[lane];
25949  }
25950  }
25951 
25952  vdst.write();
25953  }
25954 
25956  : Inst_VOP3(iFmt, "v_trunc_f64", false)
25957  {
25958  setFlag(ALU);
25959  setFlag(F64);
25960  } // Inst_VOP3__V_TRUNC_F64
25961 
25963  {
25964  } // ~Inst_VOP3__V_TRUNC_F64
25965 
25966  // D.d = trunc(S0.d), return integer part of S0.d.
25967  void
25969  {
25970  Wavefront *wf = gpuDynInst->wavefront();
25971  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
25972  VecOperandF64 vdst(gpuDynInst, instData.VDST);
25973 
25974  src.readSrc();
25975 
25976  if (instData.ABS & 0x1) {
25977  src.absModifier();
25978  }
25979 
25980  if (extData.NEG & 0x1) {
25981  src.negModifier();
25982  }
25983 
25984  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
25985  if (wf->execMask(lane)) {
25986  vdst[lane] = std::trunc(src[lane]);
25987  }
25988  }
25989 
25990  vdst.write();
25991  }
25992 
25994  : Inst_VOP3(iFmt, "v_ceil_f64", false)
25995  {
25996  setFlag(ALU);
25997  setFlag(F64);
25998  } // Inst_VOP3__V_CEIL_F64
25999 
26001  {
26002  } // ~Inst_VOP3__V_CEIL_F64
26003 
26004  // D.d = ceil(S0.d);
26005  void
26007  {
26008  Wavefront *wf = gpuDynInst->wavefront();
26009  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
26010  VecOperandF64 vdst(gpuDynInst, instData.VDST);
26011 
26012  src.readSrc();
26013 
26014  if (instData.ABS & 0x1) {
26015  src.absModifier();
26016  }
26017 
26018  if (extData.NEG & 0x1) {
26019  src.negModifier();
26020  }
26021 
26022  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26023  if (wf->execMask(lane)) {
26024  vdst[lane] = std::ceil(src[lane]);
26025  }
26026  }
26027 
26028  vdst.write();
26029  }
26030 
26032  : Inst_VOP3(iFmt, "v_rndne_f64", false)
26033  {
26034  setFlag(ALU);
26035  setFlag(F64);
26036  } // Inst_VOP3__V_RNDNE_F64
26037 
26039  {
26040  } // ~Inst_VOP3__V_RNDNE_F64
26041 
26042  // D.d = round_nearest_even(S0.d).
26043  void
26045  {
26046  Wavefront *wf = gpuDynInst->wavefront();
26047  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
26048  VecOperandF64 vdst(gpuDynInst, instData.VDST);
26049 
26050  src.readSrc();
26051 
26052  if (instData.ABS & 0x1) {
26053  src.absModifier();
26054  }
26055 
26056  if (extData.NEG & 0x1) {
26057  src.negModifier();
26058  }
26059 
26060  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26061  if (wf->execMask(lane)) {
26062  vdst[lane] = roundNearestEven(src[lane]);
26063  }
26064  }
26065 
26066  vdst.write();
26067  }
26068 
26070  : Inst_VOP3(iFmt, "v_floor_f64", false)
26071  {
26072  setFlag(ALU);
26073  setFlag(F64);
26074  } // Inst_VOP3__V_FLOOR_F64
26075 
26077  {
26078  } // ~Inst_VOP3__V_FLOOR_F64
26079 
26080  // D.d = floor(S0.d);
26081  void
26083  {
26084  Wavefront *wf = gpuDynInst->wavefront();
26085  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
26086  VecOperandF64 vdst(gpuDynInst, instData.VDST);
26087 
26088  src.readSrc();
26089 
26090  if (instData.ABS & 0x1) {
26091  src.absModifier();
26092  }
26093 
26094  if (extData.NEG & 0x1) {
26095  src.negModifier();
26096  }
26097 
26098  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26099  if (wf->execMask(lane)) {
26100  vdst[lane] = std::floor(src[lane]);
26101  }
26102  }
26103 
26104  vdst.write();
26105  }
26106 
26108  : Inst_VOP3(iFmt, "v_fract_f32", false)
26109  {
26110  setFlag(ALU);
26111  setFlag(F32);
26112  } // Inst_VOP3__V_FRACT_F32
26113 
26115  {
26116  } // ~Inst_VOP3__V_FRACT_F32
26117 
26118  // D.f = modf(S0.f).
26119  void
26121  {
26122  Wavefront *wf = gpuDynInst->wavefront();
26123  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26124  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26125 
26126  src.readSrc();
26127 
26128  if (instData.ABS & 0x1) {
26129  src.absModifier();
26130  }
26131 
26132  if (extData.NEG & 0x1) {
26133  src.negModifier();
26134  }
26135 
26136  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26137  if (wf->execMask(lane)) {
26138  VecElemF32 int_part(0.0);
26139  vdst[lane] = std::modf(src[lane], &int_part);
26140  }
26141  }
26142 
26143  vdst.write();
26144  }
26145 
26147  : Inst_VOP3(iFmt, "v_trunc_f32", false)
26148  {
26149  setFlag(ALU);
26150  setFlag(F32);
26151  } // Inst_VOP3__V_TRUNC_F32
26152 
26154  {
26155  } // ~Inst_VOP3__V_TRUNC_F32
26156 
26157  // D.f = trunc(S0.f), return integer part of S0.f.
26158  void
26160  {
26161  Wavefront *wf = gpuDynInst->wavefront();
26162  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26163  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26164 
26165  src.readSrc();
26166 
26167  if (instData.ABS & 0x1) {
26168  src.absModifier();
26169  }
26170 
26171  if (extData.NEG & 0x1) {
26172  src.negModifier();
26173  }
26174 
26175  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26176  if (wf->execMask(lane)) {
26177  vdst[lane] = std::trunc(src[lane]);
26178  }
26179  }
26180 
26181  vdst.write();
26182  }
26183 
26185  : Inst_VOP3(iFmt, "v_ceil_f32", false)
26186  {
26187  setFlag(ALU);
26188  setFlag(F32);
26189  } // Inst_VOP3__V_CEIL_F32
26190 
26192  {
26193  } // ~Inst_VOP3__V_CEIL_F32
26194 
26195  // D.f = ceil(S0.f);
26196  void
26198  {
26199  Wavefront *wf = gpuDynInst->wavefront();
26200  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26201  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26202 
26203  src.readSrc();
26204 
26205  if (instData.ABS & 0x1) {
26206  src.absModifier();
26207  }
26208 
26209  if (extData.NEG & 0x1) {
26210  src.negModifier();
26211  }
26212 
26213  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26214  if (wf->execMask(lane)) {
26215  vdst[lane] = std::ceil(src[lane]);
26216  }
26217  }
26218 
26219  vdst.write();
26220  }
26221 
26223  : Inst_VOP3(iFmt, "v_rndne_f32", false)
26224  {
26225  setFlag(ALU);
26226  setFlag(F32);
26227  } // Inst_VOP3__V_RNDNE_F32
26228 
26230  {
26231  } // ~Inst_VOP3__V_RNDNE_F32
26232 
26233  // D.f = round_nearest_even(S0.f).
26234  void
26236  {
26237  Wavefront *wf = gpuDynInst->wavefront();
26238  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26239  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26240 
26241  src.readSrc();
26242 
26243  if (instData.ABS & 0x1) {
26244  src.absModifier();
26245  }
26246 
26247  if (extData.NEG & 0x1) {
26248  src.negModifier();
26249  }
26250 
26251  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26252  if (wf->execMask(lane)) {
26253  vdst[lane] = roundNearestEven(src[lane]);
26254  }
26255  }
26256 
26257  vdst.write();
26258  }
26259 
26261  : Inst_VOP3(iFmt, "v_floor_f32", false)
26262  {
26263  setFlag(ALU);
26264  setFlag(F32);
26265  } // Inst_VOP3__V_FLOOR_F32
26266 
26268  {
26269  } // ~Inst_VOP3__V_FLOOR_F32
26270 
26271  // D.f = floor(S0.f);
26272  void
26274  {
26275  Wavefront *wf = gpuDynInst->wavefront();
26276  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26277  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26278 
26279  src.readSrc();
26280 
26281  if (instData.ABS & 0x1) {
26282  src.absModifier();
26283  }
26284 
26285  if (extData.NEG & 0x1) {
26286  src.negModifier();
26287  }
26288 
26289  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26290  if (wf->execMask(lane)) {
26291  vdst[lane] = std::floor(src[lane]);
26292  }
26293  }
26294 
26295  vdst.write();
26296  }
26297 
26299  : Inst_VOP3(iFmt, "v_exp_f32", false)
26300  {
26301  setFlag(ALU);
26302  setFlag(F32);
26303  } // Inst_VOP3__V_EXP_F32
26304 
26306  {
26307  } // ~Inst_VOP3__V_EXP_F32
26308 
26309  // D.f = pow(2.0, S0.f).
26310  void
26312  {
26313  Wavefront *wf = gpuDynInst->wavefront();
26314  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26315  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26316 
26317  src.readSrc();
26318 
26319  if (instData.ABS & 0x1) {
26320  src.absModifier();
26321  }
26322 
26323  if (extData.NEG & 0x1) {
26324  src.negModifier();
26325  }
26326 
26327  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26328  if (wf->execMask(lane)) {
26329  vdst[lane] = std::pow(2.0, src[lane]);
26330  }
26331  }
26332 
26333  vdst.write();
26334  }
26335 
26337  : Inst_VOP3(iFmt, "v_log_f32", false)
26338  {
26339  setFlag(ALU);
26340  setFlag(F32);
26341  } // Inst_VOP3__V_LOG_F32
26342 
26344  {
26345  } // ~Inst_VOP3__V_LOG_F32
26346 
26347  // D.f = log2(S0.f).
26348  void
26350  {
26351  Wavefront *wf = gpuDynInst->wavefront();
26352  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26353  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26354 
26355  src.readSrc();
26356 
26357  if (instData.ABS & 0x1) {
26358  src.absModifier();
26359  }
26360 
26361  if (extData.NEG & 0x1) {
26362  src.negModifier();
26363  }
26364 
26368  assert(!(instData.ABS & 0x2));
26369  assert(!(instData.ABS & 0x4));
26370  assert(!(extData.NEG & 0x2));
26371  assert(!(extData.NEG & 0x4));
26372 
26373  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26374  if (wf->execMask(lane)) {
26375  vdst[lane] = std::log2(src[lane]);
26376  }
26377  }
26378 
26379  vdst.write();
26380  }
26381 
26383  : Inst_VOP3(iFmt, "v_rcp_f32", false)
26384  {
26385  setFlag(ALU);
26386  setFlag(F32);
26387  } // Inst_VOP3__V_RCP_F32
26388 
26390  {
26391  } // ~Inst_VOP3__V_RCP_F32
26392 
26393  // D.f = 1.0 / S0.f.
26394  void
26396  {
26397  Wavefront *wf = gpuDynInst->wavefront();
26398  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26399  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26400 
26401  src.readSrc();
26402 
26403  if (instData.ABS & 0x1) {
26404  src.absModifier();
26405  }
26406 
26407  if (extData.NEG & 0x1) {
26408  src.negModifier();
26409  }
26410 
26411  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26412  if (wf->execMask(lane)) {
26413  vdst[lane] = 1.0 / src[lane];
26414  }
26415  }
26416 
26417  vdst.write();
26418  }
26419 
26421  : Inst_VOP3(iFmt, "v_rcp_iflag_f32", false)
26422  {
26423  setFlag(ALU);
26424  setFlag(F32);
26425  } // Inst_VOP3__V_RCP_IFLAG_F32
26426 
26428  {
26429  } // ~Inst_VOP3__V_RCP_IFLAG_F32
26430 
26431  // D.f = 1.0 / S0.f.
26432  void
26434  {
26435  Wavefront *wf = gpuDynInst->wavefront();
26436  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26437  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26438 
26439  src.readSrc();
26440 
26441  if (instData.ABS & 0x1) {
26442  src.absModifier();
26443  }
26444 
26445  if (extData.NEG & 0x1) {
26446  src.negModifier();
26447  }
26448 
26449  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26450  if (wf->execMask(lane)) {
26451  vdst[lane] = 1.0 / src[lane];
26452  }
26453  }
26454 
26455  vdst.write();
26456  }
26457 
26459  : Inst_VOP3(iFmt, "v_rsq_f32", false)
26460  {
26461  setFlag(ALU);
26462  setFlag(F32);
26463  } // Inst_VOP3__V_RSQ_F32
26464 
26466  {
26467  } // ~Inst_VOP3__V_RSQ_F32
26468 
26469  // D.f = 1.0 / sqrt(S0.f).
26470  void
26472  {
26473  Wavefront *wf = gpuDynInst->wavefront();
26474  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26475  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26476 
26477  src.readSrc();
26478 
26479  if (instData.ABS & 0x1) {
26480  src.absModifier();
26481  }
26482 
26483  if (extData.NEG & 0x1) {
26484  src.negModifier();
26485  }
26486 
26487  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26488  if (wf->execMask(lane)) {
26489  vdst[lane] = 1.0 / std::sqrt(src[lane]);
26490  }
26491  }
26492 
26493  vdst.write();
26494  }
26495 
26497  : Inst_VOP3(iFmt, "v_rcp_f64", false)
26498  {
26499  setFlag(ALU);
26500  setFlag(F64);
26501  } // Inst_VOP3__V_RCP_F64
26502 
26504  {
26505  } // ~Inst_VOP3__V_RCP_F64
26506 
26507  // D.d = 1.0 / S0.d.
26508  void
26510  {
26511  Wavefront *wf = gpuDynInst->wavefront();
26512  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
26513  VecOperandF64 vdst(gpuDynInst, instData.VDST);
26514 
26515  src.readSrc();
26516 
26517  if (instData.ABS & 0x1) {
26518  src.absModifier();
26519  }
26520 
26521  if (extData.NEG & 0x1) {
26522  src.negModifier();
26523  }
26524 
26525  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26526  if (wf->execMask(lane)) {
26527  if (std::fpclassify(src[lane]) == FP_ZERO) {
26528  vdst[lane] = +INFINITY;
26529  } else if (std::isnan(src[lane])) {
26530  vdst[lane] = NAN;
26531  } else if (std::isinf(src[lane])) {
26532  if (std::signbit(src[lane])) {
26533  vdst[lane] = -0.0;
26534  } else {
26535  vdst[lane] = 0.0;
26536  }
26537  } else {
26538  vdst[lane] = 1.0 / src[lane];
26539  }
26540  }
26541  }
26542 
26543  vdst.write();
26544  }
26545 
26547  : Inst_VOP3(iFmt, "v_rsq_f64", false)
26548  {
26549  setFlag(ALU);
26550  setFlag(F64);
26551  } // Inst_VOP3__V_RSQ_F64
26552 
26554  {
26555  } // ~Inst_VOP3__V_RSQ_F64
26556 
26557  // D.d = 1.0 / sqrt(S0.d).
26558  void
26560  {
26561  Wavefront *wf = gpuDynInst->wavefront();
26562  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
26563  VecOperandF64 vdst(gpuDynInst, instData.VDST);
26564 
26565  src.readSrc();
26566 
26567  if (instData.ABS & 0x1) {
26568  src.absModifier();
26569  }
26570 
26571  if (extData.NEG & 0x1) {
26572  src.negModifier();
26573  }
26574 
26575  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26576  if (wf->execMask(lane)) {
26577  if (std::fpclassify(src[lane]) == FP_ZERO) {
26578  vdst[lane] = +INFINITY;
26579  } else if (std::isnan(src[lane])) {
26580  vdst[lane] = NAN;
26581  } else if (std::isinf(src[lane]) && !std::signbit(src[lane])) {
26582  vdst[lane] = 0.0;
26583  } else if (std::signbit(src[lane])) {
26584  vdst[lane] = NAN;
26585  } else {
26586  vdst[lane] = 1.0 / std::sqrt(src[lane]);
26587  }
26588  }
26589  }
26590 
26591  vdst.write();
26592  }
26593 
26595  : Inst_VOP3(iFmt, "v_sqrt_f32", false)
26596  {
26597  setFlag(ALU);
26598  setFlag(F32);
26599  } // Inst_VOP3__V_SQRT_F32
26600 
26602  {
26603  } // ~Inst_VOP3__V_SQRT_F32
26604 
26605  // D.f = sqrt(S0.f).
26606  void
26608  {
26609  Wavefront *wf = gpuDynInst->wavefront();
26610  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26611  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26612 
26613  src.readSrc();
26614 
26615  if (instData.ABS & 0x1) {
26616  src.absModifier();
26617  }
26618 
26619  if (extData.NEG & 0x1) {
26620  src.negModifier();
26621  }
26622 
26623  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26624  if (wf->execMask(lane)) {
26625  vdst[lane] = std::sqrt(src[lane]);
26626  }
26627  }
26628 
26629  vdst.write();
26630  }
26631 
26633  : Inst_VOP3(iFmt, "v_sqrt_f64", false)
26634  {
26635  setFlag(ALU);
26636  setFlag(F64);
26637  } // Inst_VOP3__V_SQRT_F64
26638 
26640  {
26641  } // ~Inst_VOP3__V_SQRT_F64
26642 
26643  // D.d = sqrt(S0.d).
26644  void
26646  {
26647  Wavefront *wf = gpuDynInst->wavefront();
26648  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
26649  VecOperandF64 vdst(gpuDynInst, instData.VDST);
26650 
26651  src.readSrc();
26652 
26653  if (instData.ABS & 0x1) {
26654  src.absModifier();
26655  }
26656 
26657  if (extData.NEG & 0x1) {
26658  src.negModifier();
26659  }
26660 
26661  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26662  if (wf->execMask(lane)) {
26663  vdst[lane] = std::sqrt(src[lane]);
26664  }
26665  }
26666 
26667  vdst.write();
26668  }
26669 
26671  : Inst_VOP3(iFmt, "v_sin_f32", false)
26672  {
26673  setFlag(ALU);
26674  setFlag(F32);
26675  } // Inst_VOP3__V_SIN_F32
26676 
26678  {
26679  } // ~Inst_VOP3__V_SIN_F32
26680 
26681  // D.f = sin(S0.f * 2 * PI).
26682  void
26684  {
26685  Wavefront *wf = gpuDynInst->wavefront();
26686  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26687  ConstScalarOperandF32 pi(gpuDynInst, REG_PI);
26688  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26689 
26690  src.readSrc();
26691  pi.read();
26692 
26693  if (instData.ABS & 0x1) {
26694  src.absModifier();
26695  }
26696 
26697  if (extData.NEG & 0x1) {
26698  src.negModifier();
26699  }
26700 
26701  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26702  if (wf->execMask(lane)) {
26703  vdst[lane] = std::sin(src[lane] * 2 * pi.rawData());
26704  }
26705  }
26706 
26707  vdst.write();
26708  }
26709 
26711  : Inst_VOP3(iFmt, "v_cos_f32", false)
26712  {
26713  setFlag(ALU);
26714  setFlag(F32);
26715  } // Inst_VOP3__V_COS_F32
26716 
26718  {
26719  } // ~Inst_VOP3__V_COS_F32
26720 
26721  // D.f = cos(S0.f * 2 * PI).
26722  void
26724  {
26725  Wavefront *wf = gpuDynInst->wavefront();
26726  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
26727  ConstScalarOperandF32 pi(gpuDynInst, REG_PI);
26728  VecOperandF32 vdst(gpuDynInst, instData.VDST);
26729 
26730  src.readSrc();
26731  pi.read();
26732 
26733  if (instData.ABS & 0x1) {
26734  src.absModifier();
26735  }
26736 
26737  if (extData.NEG & 0x1) {
26738  src.negModifier();
26739  }
26740 
26741  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26742  if (wf->execMask(lane)) {
26743  vdst[lane] = std::cos(src[lane] * 2 * pi.rawData());
26744  }
26745  }
26746 
26747  vdst.write();
26748  }
26749 
26751  : Inst_VOP3(iFmt, "v_not_b32", false)
26752  {
26753  setFlag(ALU);
26754  } // Inst_VOP3__V_NOT_B32
26755 
26757  {
26758  } // ~Inst_VOP3__V_NOT_B32
26759 
26760  // D.u = ~S0.u.
26761  // Input and output modifiers not supported.
26762  void
26764  {
26765  Wavefront *wf = gpuDynInst->wavefront();
26766  ConstVecOperandU32 src(gpuDynInst, extData.SRC0);
26767  VecOperandU32 vdst(gpuDynInst, instData.VDST);
26768 
26769  src.readSrc();
26770 
26771  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26772  if (wf->execMask(lane)) {
26773  vdst[lane] = ~src[lane];
26774  }
26775  }
26776 
26777  vdst.write();
26778  }
26779 
26781  : Inst_VOP3(iFmt, "v_bfrev_b32", false)
26782  {
26783  setFlag(ALU);
26784  } // Inst_VOP3__V_BFREV_B32
26785 
26787  {
26788  } // ~Inst_VOP3__V_BFREV_B32
26789 
26790  // D.u[31:0] = S0.u[0:31], bitfield reverse.
26791  // Input and output modifiers not supported.
26792  void
26794  {
26795  Wavefront *wf = gpuDynInst->wavefront();
26796  ConstVecOperandU32 src(gpuDynInst, extData.SRC0);
26797  VecOperandU32 vdst(gpuDynInst, instData.VDST);
26798 
26799  src.readSrc();
26800 
26801  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26802  if (wf->execMask(lane)) {
26803  vdst[lane] = reverseBits(src[lane]);
26804  }
26805  }
26806 
26807  vdst.write();
26808  }
26809 
26811  : Inst_VOP3(iFmt, "v_ffbh_u32", false)
26812  {
26813  setFlag(ALU);
26814  } // Inst_VOP3__V_FFBH_U32
26815 
26817  {
26818  } // ~Inst_VOP3__V_FFBH_U32
26819 
26820  // D.u = position of first 1 in S0.u from MSB;
26821  // D.u = 0xffffffff if S0.u == 0.
26822  void
26824  {
26825  Wavefront *wf = gpuDynInst->wavefront();
26826  ConstVecOperandU32 src(gpuDynInst, extData.SRC0);
26827  VecOperandU32 vdst(gpuDynInst, instData.VDST);
26828 
26829  src.readSrc();
26830 
26831  if (instData.ABS & 0x1) {
26832  src.absModifier();
26833  }
26834 
26835  if (extData.NEG & 0x1) {
26836  src.negModifier();
26837  }
26838 
26839  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26840  if (wf->execMask(lane)) {
26841  vdst[lane] = findFirstOneMsb(src[lane]);
26842  }
26843  }
26844 
26845  vdst.write();
26846  }
26847 
26849  : Inst_VOP3(iFmt, "v_ffbl_b32", false)
26850  {
26851  setFlag(ALU);
26852  } // Inst_VOP3__V_FFBL_B32
26853 
26855  {
26856  } // ~Inst_VOP3__V_FFBL_B32
26857 
26858  // D.u = position of first 1 in S0.u from LSB;
26859  // D.u = 0xffffffff if S0.u == 0.
26860  void
26862  {
26863  Wavefront *wf = gpuDynInst->wavefront();
26864  ConstVecOperandU32 src(gpuDynInst, extData.SRC0);
26865  VecOperandU32 vdst(gpuDynInst, instData.VDST);
26866 
26867  src.readSrc();
26868 
26869  if (instData.ABS & 0x1) {
26870  src.absModifier();
26871  }
26872 
26873  if (extData.NEG & 0x1) {
26874  src.negModifier();
26875  }
26876 
26877  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26878  if (wf->execMask(lane)) {
26879  vdst[lane] = findFirstOne(src[lane]);
26880  }
26881  }
26882 
26883  vdst.write();
26884  }
26885 
26887  : Inst_VOP3(iFmt, "v_ffbh_i32", false)
26888  {
26889  setFlag(ALU);
26890  } // Inst_VOP3__V_FFBH_I32
26891 
26893  {
26894  } // ~Inst_VOP3__V_FFBH_I32
26895 
26896  // D.u = position of first bit different from sign bit in S0.i from MSB;
26897  // D.u = 0xffffffff if S0.i == 0 or S0.i == 0xffffffff.
26898  void
26900  {
26901  Wavefront *wf = gpuDynInst->wavefront();
26902  ConstVecOperandI32 src(gpuDynInst, extData.SRC0);
26903  VecOperandU32 vdst(gpuDynInst, instData.VDST);
26904 
26905  src.readSrc();
26906 
26907  if (instData.ABS & 0x1) {
26908  src.absModifier();
26909  }
26910 
26911  if (extData.NEG & 0x1) {
26912  src.negModifier();
26913  }
26914 
26915  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26916  if (wf->execMask(lane)) {
26917  vdst[lane] = firstOppositeSignBit(src[lane]);
26918  }
26919  }
26920 
26921  vdst.write();
26922  }
26923 
26925  InFmt_VOP3 *iFmt)
26926  : Inst_VOP3(iFmt, "v_frexp_exp_i32_f64", false)
26927  {
26928  setFlag(ALU);
26929  setFlag(F64);
26930  } // Inst_VOP3__V_FREXP_EXP_I32_F64
26931 
26933  {
26934  } // ~Inst_VOP3__V_FREXP_EXP_I32_F64
26935 
26936  // See V_FREXP_EXP_I32_F32.
26937  void
26939  {
26940  Wavefront *wf = gpuDynInst->wavefront();
26941  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
26942  VecOperandI32 vdst(gpuDynInst, instData.VDST);
26943 
26944  src.readSrc();
26945 
26946  if (instData.ABS & 0x1) {
26947  src.absModifier();
26948  }
26949 
26950  if (extData.NEG & 0x1) {
26951  src.negModifier();
26952  }
26953 
26954  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26955  if (wf->execMask(lane)) {
26956  if (std::isinf(src[lane]) || std::isnan(src[lane])) {
26957  vdst[lane] = 0;
26958  } else {
26959  VecElemI32 exp(0);
26960  std::frexp(src[lane], &exp);
26961  vdst[lane] = exp;
26962  }
26963  }
26964  }
26965 
26966  vdst.write();
26967  }
26968 
26970  : Inst_VOP3(iFmt, "v_frexp_mant_f64", false)
26971  {
26972  setFlag(ALU);
26973  setFlag(F64);
26974  } // Inst_VOP3__V_FREXP_MANT_F64
26975 
26977  {
26978  } // ~Inst_VOP3__V_FREXP_MANT_F64
26979 
26980  void
26982  {
26983  Wavefront *wf = gpuDynInst->wavefront();
26984  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
26985  VecOperandF64 vdst(gpuDynInst, instData.VDST);
26986 
26987  src.readSrc();
26988 
26989  if (instData.ABS & 0x1) {
26990  src.absModifier();
26991  }
26992 
26993  if (extData.NEG & 0x1) {
26994  src.negModifier();
26995  }
26996 
26997  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
26998  if (wf->execMask(lane)) {
26999  VecElemI32 exp(0);
27000  vdst[lane] = std::frexp(src[lane], &exp);
27001  }
27002  }
27003 
27004  vdst.write();
27005  }
27006 
27008  : Inst_VOP3(iFmt, "v_fract_f64", false)
27009  {
27010  setFlag(ALU);
27011  setFlag(F64);
27012  } // Inst_VOP3__V_FRACT_F64
27013 
27015  {
27016  } // ~Inst_VOP3__V_FRACT_F64
27017 
27018  void
27020  {
27021  Wavefront *wf = gpuDynInst->wavefront();
27022  ConstVecOperandF64 src(gpuDynInst, extData.SRC0);
27023  VecOperandF64 vdst(gpuDynInst, instData.VDST);
27024 
27025  src.readSrc();
27026 
27027  if (instData.ABS & 0x1) {
27028  src.absModifier();
27029  }
27030 
27031  if (extData.NEG & 0x1) {
27032  src.negModifier();
27033  }
27034 
27035  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27036  if (wf->execMask(lane)) {
27037  VecElemF32 int_part(0.0);
27038  vdst[lane] = std::modf(src[lane], &int_part);
27039  }
27040  }
27041 
27042  vdst.write();
27043  }
27044 
27046  InFmt_VOP3 *iFmt)
27047  : Inst_VOP3(iFmt, "v_frexp_exp_i32_f32", false)
27048  {
27049  setFlag(ALU);
27050  setFlag(F32);
27051  } // Inst_VOP3__V_FREXP_EXP_I32_F32
27052 
27054  {
27055  } // ~Inst_VOP3__V_FREXP_EXP_I32_F32
27056 
27057  // frexp(S0.f, Exponenti(S0.f))
27058  // if (S0.f == INF || S0.f == NAN) then D.i = 0;
27059  // else D.i = Exponent(S0.f)
27060  void
27062  {
27063  Wavefront *wf = gpuDynInst->wavefront();
27064  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
27065  VecOperandI32 vdst(gpuDynInst, instData.VDST);
27066 
27067  src.readSrc();
27068 
27069  if (instData.ABS & 0x1) {
27070  src.absModifier();
27071  }
27072 
27073  if (extData.NEG & 0x1) {
27074  src.negModifier();
27075  }
27076 
27077  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27078  if (wf->execMask(lane)) {
27079  if (std::isinf(src[lane])|| std::isnan(src[lane])) {
27080  vdst[lane] = 0;
27081  } else {
27082  VecElemI32 exp(0);
27083  std::frexp(src[lane], &exp);
27084  vdst[lane] = exp;
27085  }
27086  }
27087  }
27088 
27089  vdst.write();
27090  }
27091 
27093  : Inst_VOP3(iFmt, "v_frexp_mant_f32", false)
27094  {
27095  setFlag(ALU);
27096  setFlag(F32);
27097  } // Inst_VOP3__V_FREXP_MANT_F32
27098 
27100  {
27101  } // ~Inst_VOP3__V_FREXP_MANT_F32
27102 
27103  // if (S0.f == INF || S0.f == NAN) then D.f = S0.f;
27104  // else D.f = Mantissa(S0.f).
27105  void
27107  {
27108  Wavefront *wf = gpuDynInst->wavefront();
27109  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
27110  VecOperandF32 vdst(gpuDynInst, instData.VDST);
27111 
27112  src.readSrc();
27113 
27114  if (instData.ABS & 0x1) {
27115  src.absModifier();
27116  }
27117 
27118  if (extData.NEG & 0x1) {
27119  src.negModifier();
27120  }
27121 
27122  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27123  if (wf->execMask(lane)) {
27124  if (std::isinf(src[lane]) || std::isnan(src[lane])) {
27125  vdst[lane] = src[lane];
27126  } else {
27127  VecElemI32 exp(0);
27128  vdst[lane] = std::frexp(src[lane], &exp);
27129  }
27130  }
27131  }
27132 
27133  vdst.write();
27134  }
27135 
27137  : Inst_VOP3(iFmt, "v_clrexcp", false)
27138  {
27139  } // Inst_VOP3__V_CLREXCP
27140 
27142  {
27143  } // ~Inst_VOP3__V_CLREXCP
27144 
27145  void
27147  {
27149  }
27150 
27152  : Inst_VOP3(iFmt, "v_cvt_f16_u16", false)
27153  {
27154  setFlag(ALU);
27155  setFlag(F16);
27156  } // Inst_VOP3__V_CVT_F16_U16
27157 
27159  {
27160  } // ~Inst_VOP3__V_CVT_F16_U16
27161 
27162  // D.f16 = uint16_to_flt16(S.u16).
27163  void
27165  {
27167  }
27168 
27170  : Inst_VOP3(iFmt, "v_cvt_f16_i16", false)
27171  {
27172  setFlag(ALU);
27173  setFlag(F16);
27174  } // Inst_VOP3__V_CVT_F16_I16
27175 
27177  {
27178  } // ~Inst_VOP3__V_CVT_F16_I16
27179 
27180  // D.f16 = int16_to_flt16(S.i16).
27181  void
27183  {
27185  }
27186 
27188  : Inst_VOP3(iFmt, "v_cvt_u16_f16", false)
27189  {
27190  setFlag(ALU);
27191  setFlag(F16);
27192  } // Inst_VOP3__V_CVT_U16_F16
27193 
27195  {
27196  } // ~Inst_VOP3__V_CVT_U16_F16
27197 
27198  // D.u16 = flt16_to_uint16(S.f16).
27199  void
27201  {
27203  }
27204 
27206  : Inst_VOP3(iFmt, "v_cvt_i16_f16", false)
27207  {
27208  setFlag(ALU);
27209  setFlag(F16);
27210  } // Inst_VOP3__V_CVT_I16_F16
27211 
27213  {
27214  } // ~Inst_VOP3__V_CVT_I16_F16
27215 
27216  // D.i16 = flt16_to_int16(S.f16).
27217  void
27219  {
27221  }
27222 
27224  : Inst_VOP3(iFmt, "v_rcp_f16", false)
27225  {
27226  setFlag(ALU);
27227  setFlag(F16);
27228  } // Inst_VOP3__V_RCP_F16
27229 
27231  {
27232  } // ~Inst_VOP3__V_RCP_F16
27233 
27234  // if (S0.f16 == 1.0f)
27235  // D.f16 = 1.0f;
27236  // else
27237  // D.f16 = 1 / S0.f16.
27238  void
27240  {
27242  }
27243 
27245  : Inst_VOP3(iFmt, "v_sqrt_f16", false)
27246  {
27247  setFlag(ALU);
27248  setFlag(F16);
27249  } // Inst_VOP3__V_SQRT_F16
27250 
27252  {
27253  } // ~Inst_VOP3__V_SQRT_F16
27254 
27255  // if (S0.f16 == 1.0f)
27256  // D.f16 = 1.0f;
27257  // else
27258  // D.f16 = sqrt(S0.f16).
27259  void
27261  {
27263  }
27264 
27266  : Inst_VOP3(iFmt, "v_rsq_f16", false)
27267  {
27268  setFlag(ALU);
27269  setFlag(F16);
27270  } // Inst_VOP3__V_RSQ_F16
27271 
27273  {
27274  } // ~Inst_VOP3__V_RSQ_F16
27275 
27276  // if (S0.f16 == 1.0f)
27277  // D.f16 = 1.0f;
27278  // else
27279  // D.f16 = 1 / sqrt(S0.f16).
27280  void
27282  {
27284  }
27285 
27287  : Inst_VOP3(iFmt, "v_log_f16", false)
27288  {
27289  setFlag(ALU);
27290  setFlag(F16);
27291  } // Inst_VOP3__V_LOG_F16
27292 
27294  {
27295  } // ~Inst_VOP3__V_LOG_F16
27296 
27297  // if (S0.f16 == 1.0f)
27298  // D.f16 = 0.0f;
27299  // else
27300  // D.f16 = log2(S0.f16).
27301  void
27303  {
27305  }
27306 
27308  : Inst_VOP3(iFmt, "v_exp_f16", false)
27309  {
27310  setFlag(ALU);
27311  setFlag(F16);
27312  } // Inst_VOP3__V_EXP_F16
27313 
27315  {
27316  } // ~Inst_VOP3__V_EXP_F16
27317 
27318  // if (S0.f16 == 0.0f)
27319  // D.f16 = 1.0f;
27320  // else
27321  // D.f16 = pow(2.0, S0.f16).
27322  void
27324  {
27326  }
27327 
27329  : Inst_VOP3(iFmt, "v_frexp_mant_f16", false)
27330  {
27331  setFlag(ALU);
27332  setFlag(F16);
27333  } // Inst_VOP3__V_FREXP_MANT_F16
27334 
27336  {
27337  } // ~Inst_VOP3__V_FREXP_MANT_F16
27338 
27339  // if (S0.f16 == +-INF || S0.f16 == NAN)
27340  // D.f16 = S0.f16;
27341  // else
27342  // D.f16 = mantissa(S0.f16).
27343  void
27345  {
27347  }
27348 
27350  InFmt_VOP3 *iFmt)
27351  : Inst_VOP3(iFmt, "v_frexp_exp_i16_f16", false)
27352  {
27353  setFlag(ALU);
27354  setFlag(F16);
27355  } // Inst_VOP3__V_FREXP_EXP_I16_F16
27356 
27358  {
27359  } // ~Inst_VOP3__V_FREXP_EXP_I16_F16
27360 
27361  void
27363  {
27365  }
27366 
27368  : Inst_VOP3(iFmt, "v_floor_f16", false)
27369  {
27370  setFlag(ALU);
27371  setFlag(F16);
27372  } // Inst_VOP3__V_FLOOR_F16
27373 
27375  {
27376  } // ~Inst_VOP3__V_FLOOR_F16
27377 
27378  // D.f16 = floor(S0.f16);
27379  void
27381  {
27383  }
27384 
27386  : Inst_VOP3(iFmt, "v_ceil_f16", false)
27387  {
27388  setFlag(ALU);
27389  setFlag(F16);
27390  } // Inst_VOP3__V_CEIL_F16
27391 
27393  {
27394  } // ~Inst_VOP3__V_CEIL_F16
27395 
27396  // D.f16 = ceil(S0.f16);
27397  void
27399  {
27401  }
27402 
27404  : Inst_VOP3(iFmt, "v_trunc_f16", false)
27405  {
27406  setFlag(ALU);
27407  setFlag(F16);
27408  } // Inst_VOP3__V_TRUNC_F16
27409 
27411  {
27412  } // ~Inst_VOP3__V_TRUNC_F16
27413 
27414  // D.f16 = trunc(S0.f16).
27415  void
27417  {
27419  }
27420 
27422  : Inst_VOP3(iFmt, "v_rndne_f16", false)
27423  {
27424  setFlag(ALU);
27425  setFlag(F16);
27426  } // Inst_VOP3__V_RNDNE_F16
27427 
27429  {
27430  } // ~Inst_VOP3__V_RNDNE_F16
27431 
27432  // D.f16 = roundNearestEven(S0.f16);
27433  void
27435  {
27437  }
27438 
27440  : Inst_VOP3(iFmt, "v_fract_f16", false)
27441  {
27442  setFlag(ALU);
27443  setFlag(F16);
27444  } // Inst_VOP3__V_FRACT_F16
27445 
27447  {
27448  } // ~Inst_VOP3__V_FRACT_F16
27449 
27450  // D.f16 = S0.f16 + -floor(S0.f16).
27451  void
27453  {
27455  }
27456 
27458  : Inst_VOP3(iFmt, "v_sin_f16", false)
27459  {
27460  setFlag(ALU);
27461  setFlag(F16);
27462  } // Inst_VOP3__V_SIN_F16
27463 
27465  {
27466  } // ~Inst_VOP3__V_SIN_F16
27467 
27468  // D.f16 = sin(S0.f16 * 2 * PI).
27469  void
27471  {
27473  }
27474 
27476  : Inst_VOP3(iFmt, "v_cos_f16", false)
27477  {
27478  setFlag(ALU);
27479  setFlag(F16);
27480  } // Inst_VOP3__V_COS_F16
27481 
27483  {
27484  } // ~Inst_VOP3__V_COS_F16
27485 
27486  // D.f16 = cos(S0.f16 * 2 * PI).
27487  void
27489  {
27491  }
27492 
27494  : Inst_VOP3(iFmt, "v_exp_legacy_f32", false)
27495  {
27496  setFlag(ALU);
27497  setFlag(F32);
27498  } // Inst_VOP3__V_EXP_LEGACY_F32
27499 
27501  {
27502  } // ~Inst_VOP3__V_EXP_LEGACY_F32
27503 
27504  // D.f = pow(2.0, S0.f)
27505  void
27507  {
27508  Wavefront *wf = gpuDynInst->wavefront();
27509  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
27510  VecOperandF32 vdst(gpuDynInst, instData.VDST);
27511 
27512  src.readSrc();
27513 
27514  if (instData.ABS & 0x1) {
27515  src.absModifier();
27516  }
27517 
27518  if (extData.NEG & 0x1) {
27519  src.negModifier();
27520  }
27521 
27525  assert(!(instData.ABS & 0x2));
27526  assert(!(instData.ABS & 0x4));
27527  assert(!(extData.NEG & 0x2));
27528  assert(!(extData.NEG & 0x4));
27529 
27530  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27531  if (wf->execMask(lane)) {
27532  vdst[lane] = std::pow(2.0, src[lane]);
27533  }
27534  }
27535 
27536  vdst.write();
27537  }
27538 
27540  : Inst_VOP3(iFmt, "v_log_legacy_f32", false)
27541  {
27542  setFlag(ALU);
27543  setFlag(F32);
27544  } // Inst_VOP3__V_LOG_LEGACY_F32
27545 
27547  {
27548  } // ~Inst_VOP3__V_LOG_LEGACY_F32
27549 
27550  // D.f = log2(S0.f).
27551  void
27553  {
27554  Wavefront *wf = gpuDynInst->wavefront();
27555  ConstVecOperandF32 src(gpuDynInst, extData.SRC0);
27556  VecOperandF32 vdst(gpuDynInst, instData.VDST);
27557 
27558  src.readSrc();
27559 
27560  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27561  if (wf->execMask(lane)) {
27562  vdst[lane] = std::log2(src[lane]);
27563  }
27564  }
27565 
27566  vdst.write();
27567  }
27568 
27570  : Inst_VOP3(iFmt, "v_mad_legacy_f32", false)
27571  {
27572  setFlag(ALU);
27573  setFlag(F32);
27574  setFlag(MAD);
27575  } // Inst_VOP3__V_MAD_LEGACY_F32
27576 
27578  {
27579  } // ~Inst_VOP3__V_MAD_LEGACY_F32
27580 
27581  // D.f = S0.f * S1.f + S2.f
27582  void
27584  {
27585  Wavefront *wf = gpuDynInst->wavefront();
27586  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
27587  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
27588  ConstVecOperandF32 src2(gpuDynInst, extData.SRC2);
27589  VecOperandF32 vdst(gpuDynInst, instData.VDST);
27590 
27591  src0.readSrc();
27592  src1.readSrc();
27593  src2.readSrc();
27594 
27595  if (instData.ABS & 0x1) {
27596  src0.absModifier();
27597  }
27598 
27599  if (instData.ABS & 0x2) {
27600  src1.absModifier();
27601  }
27602 
27603  if (instData.ABS & 0x4) {
27604  src2.absModifier();
27605  }
27606 
27607  if (extData.NEG & 0x1) {
27608  src0.negModifier();
27609  }
27610 
27611  if (extData.NEG & 0x2) {
27612  src1.negModifier();
27613  }
27614 
27615  if (extData.NEG & 0x4) {
27616  src2.negModifier();
27617  }
27618 
27619  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27620  if (wf->execMask(lane)) {
27621  vdst[lane] = std::fma(src0[lane], src1[lane], src2[lane]);
27622  }
27623  }
27624 
27625  vdst.write();
27626  }
27627 
27629  : Inst_VOP3(iFmt, "v_mad_f32", false)
27630  {
27631  setFlag(ALU);
27632  setFlag(F32);
27633  setFlag(MAD);
27634  } // Inst_VOP3__V_MAD_F32
27635 
27637  {
27638  } // ~Inst_VOP3__V_MAD_F32
27639 
27640  // D.f = S0.f * S1.f + S2.f.
27641  void
27643  {
27644  Wavefront *wf = gpuDynInst->wavefront();
27645  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
27646  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
27647  ConstVecOperandF32 src2(gpuDynInst, extData.SRC2);
27648  VecOperandF32 vdst(gpuDynInst, instData.VDST);
27649 
27650  src0.readSrc();
27651  src1.readSrc();
27652  src2.readSrc();
27653 
27654  if (instData.ABS & 0x1) {
27655  src0.absModifier();
27656  }
27657 
27658  if (instData.ABS & 0x2) {
27659  src1.absModifier();
27660  }
27661 
27662  if (instData.ABS & 0x4) {
27663  src2.absModifier();
27664  }
27665 
27666  if (extData.NEG & 0x1) {
27667  src0.negModifier();
27668  }
27669 
27670  if (extData.NEG & 0x2) {
27671  src1.negModifier();
27672  }
27673 
27674  if (extData.NEG & 0x4) {
27675  src2.negModifier();
27676  }
27677 
27678  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27679  if (wf->execMask(lane)) {
27680  vdst[lane] = std::fma(src0[lane], src1[lane], src2[lane]);
27681  }
27682  }
27683 
27684  vdst.write();
27685  }
27686 
27688  : Inst_VOP3(iFmt, "v_mad_i32_i24", false)
27689  {
27690  setFlag(ALU);
27691  setFlag(MAD);
27692  } // Inst_VOP3__V_MAD_I32_I24
27693 
27695  {
27696  } // ~Inst_VOP3__V_MAD_I32_I24
27697 
27698  // D.i = S0.i[23:0] * S1.i[23:0] + S2.i.
27699  void
27701  {
27702  Wavefront *wf = gpuDynInst->wavefront();
27703  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
27704  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
27705  ConstVecOperandI32 src2(gpuDynInst, extData.SRC2);
27706  VecOperandI32 vdst(gpuDynInst, instData.VDST);
27707 
27708  src0.readSrc();
27709  src1.readSrc();
27710  src2.readSrc();
27711 
27715  assert(!(instData.ABS & 0x1));
27716  assert(!(instData.ABS & 0x2));
27717  assert(!(instData.ABS & 0x4));
27718  assert(!(extData.NEG & 0x1));
27719  assert(!(extData.NEG & 0x2));
27720  assert(!(extData.NEG & 0x4));
27721 
27722  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27723  if (wf->execMask(lane)) {
27724  vdst[lane] = szext<24>(src0[lane])
27725  * szext<24>(src1[lane]) + src2[lane];
27726  }
27727  }
27728 
27729  vdst.write();
27730  }
27731 
27733  : Inst_VOP3(iFmt, "v_mad_u32_u24", false)
27734  {
27735  setFlag(ALU);
27736  setFlag(MAD);
27737  } // Inst_VOP3__V_MAD_U32_U24
27738 
27740  {
27741  } // ~Inst_VOP3__V_MAD_U32_U24
27742 
27743  // D.u = S0.u[23:0] * S1.u[23:0] + S2.u.
27744  void
27746  {
27747  Wavefront *wf = gpuDynInst->wavefront();
27748  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
27749  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
27750  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
27751  VecOperandU32 vdst(gpuDynInst, instData.VDST);
27752 
27753  src0.readSrc();
27754  src1.readSrc();
27755  src2.readSrc();
27756 
27760  assert(!(instData.ABS & 0x1));
27761  assert(!(instData.ABS & 0x2));
27762  assert(!(instData.ABS & 0x4));
27763  assert(!(extData.NEG & 0x1));
27764  assert(!(extData.NEG & 0x2));
27765  assert(!(extData.NEG & 0x4));
27766 
27767  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27768  if (wf->execMask(lane)) {
27769  vdst[lane] = bits(src0[lane], 23, 0) * bits(src1[lane], 23, 0)
27770  + src2[lane];
27771  }
27772  }
27773 
27774  vdst.write();
27775  }
27776 
27778  : Inst_VOP3(iFmt, "v_cubeid_f32", false)
27779  {
27780  setFlag(ALU);
27781  setFlag(F32);
27782  } // Inst_VOP3__V_CUBEID_F32
27783 
27785  {
27786  } // ~Inst_VOP3__V_CUBEID_F32
27787 
27788  void
27790  {
27792  }
27793 
27795  : Inst_VOP3(iFmt, "v_cubesc_f32", false)
27796  {
27797  setFlag(ALU);
27798  setFlag(F32);
27799  } // Inst_VOP3__V_CUBESC_F32
27800 
27802  {
27803  } // ~Inst_VOP3__V_CUBESC_F32
27804 
27805  void
27807  {
27809  }
27810 
27812  : Inst_VOP3(iFmt, "v_cubetc_f32", false)
27813  {
27814  setFlag(ALU);
27815  setFlag(F32);
27816  } // Inst_VOP3__V_CUBETC_F32
27817 
27819  {
27820  } // ~Inst_VOP3__V_CUBETC_F32
27821 
27822  void
27824  {
27826  }
27827 
27829  : Inst_VOP3(iFmt, "v_cubema_f32", false)
27830  {
27831  setFlag(ALU);
27832  setFlag(F32);
27833  } // Inst_VOP3__V_CUBEMA_F32
27834 
27836  {
27837  } // ~Inst_VOP3__V_CUBEMA_F32
27838 
27839  void
27841  {
27843  }
27844 
27846  : Inst_VOP3(iFmt, "v_bfe_u32", false)
27847  {
27848  setFlag(ALU);
27849  } // Inst_VOP3__V_BFE_U32
27850 
27852  {
27853  } // ~Inst_VOP3__V_BFE_U32
27854 
27855  // D.u = (S0.u >> S1.u[4:0]) & ((1 << S2.u[4:0]) - 1).
27856  // Bitfield extract with S0 = data, S1 = field_offset, S2 = field_width.
27857  void
27859  {
27860  Wavefront *wf = gpuDynInst->wavefront();
27861  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
27862  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
27863  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
27864  VecOperandU32 vdst(gpuDynInst, instData.VDST);
27865 
27866  src0.readSrc();
27867  src1.readSrc();
27868  src2.readSrc();
27869 
27873  assert(!(instData.ABS & 0x1));
27874  assert(!(instData.ABS & 0x2));
27875  assert(!(instData.ABS & 0x4));
27876  assert(!(extData.NEG & 0x1));
27877  assert(!(extData.NEG & 0x2));
27878  assert(!(extData.NEG & 0x4));
27879 
27880  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27881  if (wf->execMask(lane)) {
27882  vdst[lane] = (src0[lane] >> bits(src1[lane], 4, 0))
27883  & ((1 << bits(src2[lane], 4, 0)) - 1);
27884  }
27885  }
27886 
27887  vdst.write();
27888  }
27889 
27891  : Inst_VOP3(iFmt, "v_bfe_i32", false)
27892  {
27893  setFlag(ALU);
27894  } // Inst_VOP3__V_BFE_I32
27895 
27897  {
27898  } // ~Inst_VOP3__V_BFE_I32
27899 
27900  // D.i = (S0.i >> S1.u[4:0]) & ((1 << S2.u[4:0]) - 1).
27901  // Bitfield extract with S0 = data, S1 = field_offset, S2 = field_width.
27902  void
27904  {
27905  Wavefront *wf = gpuDynInst->wavefront();
27906  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
27907  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
27908  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
27909  VecOperandI32 vdst(gpuDynInst, instData.VDST);
27910 
27911  src0.readSrc();
27912  src1.readSrc();
27913  src2.readSrc();
27914 
27918  assert(!(instData.ABS & 0x1));
27919  assert(!(instData.ABS & 0x2));
27920  assert(!(instData.ABS & 0x4));
27921  assert(!(extData.NEG & 0x1));
27922  assert(!(extData.NEG & 0x2));
27923  assert(!(extData.NEG & 0x4));
27924 
27925  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27926  if (wf->execMask(lane)) {
27927  vdst[lane] = (src0[lane] >> bits(src1[lane], 4, 0))
27928  & ((1 << bits(src2[lane], 4, 0)) - 1);
27929  }
27930  }
27931 
27932  vdst.write();
27933  }
27934 
27936  : Inst_VOP3(iFmt, "v_bfi_b32", false)
27937  {
27938  setFlag(ALU);
27939  } // Inst_VOP3__V_BFI_B32
27940 
27942  {
27943  } // ~Inst_VOP3__V_BFI_B32
27944 
27945  // D.u = (S0.u & S1.u) | (~S0.u & S2.u); bitfield insert.
27946  void
27948  {
27949  Wavefront *wf = gpuDynInst->wavefront();
27950  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
27951  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
27952  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
27953  VecOperandU32 vdst(gpuDynInst, instData.VDST);
27954 
27955  src0.readSrc();
27956  src1.readSrc();
27957  src2.readSrc();
27958 
27962  assert(!(instData.ABS & 0x1));
27963  assert(!(instData.ABS & 0x2));
27964  assert(!(instData.ABS & 0x4));
27965  assert(!(extData.NEG & 0x1));
27966  assert(!(extData.NEG & 0x2));
27967  assert(!(extData.NEG & 0x4));
27968 
27969  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
27970  if (wf->execMask(lane)) {
27971  vdst[lane] = (src0[lane] & src1[lane]) | (~src0[lane]
27972  & src2[lane]);
27973  }
27974  }
27975 
27976  vdst.write();
27977  }
27978 
27980  : Inst_VOP3(iFmt, "v_fma_f32", false)
27981  {
27982  setFlag(ALU);
27983  setFlag(F32);
27984  setFlag(FMA);
27985  } // Inst_VOP3__V_FMA_F32
27986 
27988  {
27989  } // ~Inst_VOP3__V_FMA_F32
27990 
27991  // D.f = S0.f * S1.f + S2.f.
27992  void
27994  {
27995  Wavefront *wf = gpuDynInst->wavefront();
27996  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
27997  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
27998  ConstVecOperandF32 src2(gpuDynInst, extData.SRC2);
27999  VecOperandF32 vdst(gpuDynInst, instData.VDST);
28000 
28001  src0.readSrc();
28002  src1.readSrc();
28003  src2.readSrc();
28004 
28005  if (instData.ABS & 0x1) {
28006  src0.absModifier();
28007  }
28008 
28009  if (instData.ABS & 0x2) {
28010  src1.absModifier();
28011  }
28012 
28013  if (instData.ABS & 0x4) {
28014  src2.absModifier();
28015  }
28016 
28017  if (extData.NEG & 0x1) {
28018  src0.negModifier();
28019  }
28020 
28021  if (extData.NEG & 0x2) {
28022  src1.negModifier();
28023  }
28024 
28025  if (extData.NEG & 0x4) {
28026  src2.negModifier();
28027  }
28028 
28029  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28030  if (wf->execMask(lane)) {
28031  vdst[lane] = std::fma(src0[lane], src1[lane], src2[lane]);
28032  }
28033  }
28034 
28035  vdst.write();
28036  }
28037 
28039  : Inst_VOP3(iFmt, "v_fma_f64", false)
28040  {
28041  setFlag(ALU);
28042  setFlag(F64);
28043  setFlag(FMA);
28044  } // Inst_VOP3__V_FMA_F64
28045 
28047  {
28048  } // ~Inst_VOP3__V_FMA_F64
28049 
28050  // D.d = S0.d * S1.d + S2.d.
28051  void
28053  {
28054  Wavefront *wf = gpuDynInst->wavefront();
28055  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
28056  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
28057  ConstVecOperandF64 src2(gpuDynInst, extData.SRC2);
28058  VecOperandF64 vdst(gpuDynInst, instData.VDST);
28059 
28060  src0.readSrc();
28061  src1.readSrc();
28062  src2.readSrc();
28063 
28064  if (instData.ABS & 0x1) {
28065  src0.absModifier();
28066  }
28067 
28068  if (instData.ABS & 0x2) {
28069  src1.absModifier();
28070  }
28071 
28072  if (instData.ABS & 0x4) {
28073  src2.absModifier();
28074  }
28075 
28076  if (extData.NEG & 0x1) {
28077  src0.negModifier();
28078  }
28079 
28080  if (extData.NEG & 0x2) {
28081  src1.negModifier();
28082  }
28083 
28084  if (extData.NEG & 0x4) {
28085  src2.negModifier();
28086  }
28087 
28088  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28089  if (wf->execMask(lane)) {
28090  vdst[lane] = std::fma(src0[lane], src1[lane], src2[lane]);
28091  }
28092  }
28093 
28094  vdst.write();
28095  }
28096 
28098  : Inst_VOP3(iFmt, "v_lerp_u8", false)
28099  {
28100  setFlag(ALU);
28101  } // Inst_VOP3__V_LERP_U8
28102 
28104  {
28105  } // ~Inst_VOP3__V_LERP_U8
28106 
28107  // D.u = ((S0.u[31:24] + S1.u[31:24] + S2.u[24]) >> 1) << 24
28108  // D.u += ((S0.u[23:16] + S1.u[23:16] + S2.u[16]) >> 1) << 16;
28109  // D.u += ((S0.u[15:8] + S1.u[15:8] + S2.u[8]) >> 1) << 8;
28110  // D.u += ((S0.u[7:0] + S1.u[7:0] + S2.u[0]) >> 1).
28111  void
28113  {
28114  Wavefront *wf = gpuDynInst->wavefront();
28115  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
28116  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
28117  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
28118  VecOperandU32 vdst(gpuDynInst, instData.VDST);
28119 
28120  src0.readSrc();
28121  src1.readSrc();
28122  src2.readSrc();
28123 
28127  assert(!(instData.ABS & 0x1));
28128  assert(!(instData.ABS & 0x2));
28129  assert(!(instData.ABS & 0x4));
28130  assert(!(extData.NEG & 0x1));
28131  assert(!(extData.NEG & 0x2));
28132  assert(!(extData.NEG & 0x4));
28133 
28134  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28135  if (wf->execMask(lane)) {
28136  vdst[lane] = ((bits(src0[lane], 31, 24)
28137  + bits(src1[lane], 31, 24) + bits(src2[lane], 24)) >> 1)
28138  << 24;
28139  vdst[lane] += ((bits(src0[lane], 23, 16)
28140  + bits(src1[lane], 23, 16) + bits(src2[lane], 16)) >> 1)
28141  << 16;
28142  vdst[lane] += ((bits(src0[lane], 15, 8)
28143  + bits(src1[lane], 15, 8) + bits(src2[lane], 8)) >> 1)
28144  << 8;
28145  vdst[lane] += ((bits(src0[lane], 7, 0) + bits(src1[lane], 7, 0)
28146  + bits(src2[lane], 0)) >> 1);
28147  }
28148  }
28149 
28150  vdst.write();
28151  }
28152 
28154  : Inst_VOP3(iFmt, "v_alignbit_b32", false)
28155  {
28156  setFlag(ALU);
28157  } // Inst_VOP3__V_ALIGNBIT_B32
28158 
28160  {
28161  } // ~Inst_VOP3__V_ALIGNBIT_B32
28162 
28163  // D.u = ({S0, S1} >> S2.u[4:0]) & 0xffffffff.
28164  void
28166  {
28167  Wavefront *wf = gpuDynInst->wavefront();
28168  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
28169  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
28170  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
28171  VecOperandU32 vdst(gpuDynInst, instData.VDST);
28172 
28173  src0.readSrc();
28174  src1.readSrc();
28175  src2.readSrc();
28176 
28180  assert(!(instData.ABS & 0x1));
28181  assert(!(instData.ABS & 0x2));
28182  assert(!(instData.ABS & 0x4));
28183  assert(!(extData.NEG & 0x1));
28184  assert(!(extData.NEG & 0x2));
28185  assert(!(extData.NEG & 0x4));
28186 
28187  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28188  if (wf->execMask(lane)) {
28189  VecElemU64 src_0_1 = (((VecElemU64)src0[lane] << 32)
28190  | (VecElemU64)src1[lane]);
28191  vdst[lane] = (VecElemU32)((src_0_1
28192  >> (VecElemU64)bits(src2[lane], 4, 0)) & 0xffffffff);
28193  }
28194  }
28195 
28196  vdst.write();
28197  }
28198 
28200  : Inst_VOP3(iFmt, "v_alignbyte_b32", false)
28201  {
28202  setFlag(ALU);
28203  } // Inst_VOP3__V_ALIGNBYTE_B32
28204 
28206  {
28207  } // ~Inst_VOP3__V_ALIGNBYTE_B32
28208 
28209  // D.u = ({S0, S1} >> (8 * S2.u[4:0])) & 0xffffffff.
28210  void
28212  {
28213  Wavefront *wf = gpuDynInst->wavefront();
28214  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
28215  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
28216  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
28217  VecOperandU32 vdst(gpuDynInst, instData.VDST);
28218 
28219  src0.readSrc();
28220  src1.readSrc();
28221  src2.readSrc();
28222 
28226  assert(!(instData.ABS & 0x1));
28227  assert(!(instData.ABS & 0x2));
28228  assert(!(instData.ABS & 0x4));
28229  assert(!(extData.NEG & 0x1));
28230  assert(!(extData.NEG & 0x2));
28231  assert(!(extData.NEG & 0x4));
28232 
28233  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28234  if (wf->execMask(lane)) {
28235  VecElemU64 src_0_1 = (((VecElemU64)src0[lane] << 32)
28236  | (VecElemU64)src1[lane]);
28237  vdst[lane] = (VecElemU32)((src_0_1
28238  >> (8ULL * (VecElemU64)bits(src2[lane], 4, 0)))
28239  & 0xffffffff);
28240  }
28241  }
28242 
28243  vdst.write();
28244  }
28245 
28247  : Inst_VOP3(iFmt, "v_min3_f32", false)
28248  {
28249  setFlag(ALU);
28250  setFlag(F32);
28251  } // Inst_VOP3__V_MIN3_F32
28252 
28254  {
28255  } // ~Inst_VOP3__V_MIN3_F32
28256 
28257  // D.f = min(S0.f, S1.f, S2.f).
28258  void
28260  {
28261  Wavefront *wf = gpuDynInst->wavefront();
28262  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
28263  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
28264  ConstVecOperandF32 src2(gpuDynInst, extData.SRC2);
28265  VecOperandF32 vdst(gpuDynInst, instData.VDST);
28266 
28267  src0.readSrc();
28268  src1.readSrc();
28269  src2.readSrc();
28270 
28271  if (instData.ABS & 0x1) {
28272  src0.absModifier();
28273  }
28274 
28275  if (instData.ABS & 0x2) {
28276  src1.absModifier();
28277  }
28278 
28279  if (instData.ABS & 0x4) {
28280  src2.absModifier();
28281  }
28282 
28283  if (extData.NEG & 0x1) {
28284  src0.negModifier();
28285  }
28286 
28287  if (extData.NEG & 0x2) {
28288  src1.negModifier();
28289  }
28290 
28291  if (extData.NEG & 0x4) {
28292  src2.negModifier();
28293  }
28294 
28295  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28296  if (wf->execMask(lane)) {
28297  VecElemF32 min_0_1 = std::fmin(src0[lane], src1[lane]);
28298  vdst[lane] = std::fmin(min_0_1, src2[lane]);
28299  }
28300  }
28301 
28302  vdst.write();
28303  }
28304 
28306  : Inst_VOP3(iFmt, "v_min3_i32", false)
28307  {
28308  setFlag(ALU);
28309  } // Inst_VOP3__V_MIN3_I32
28310 
28312  {
28313  } // ~Inst_VOP3__V_MIN3_I32
28314 
28315  // D.i = min(S0.i, S1.i, S2.i).
28316  void
28318  {
28319  Wavefront *wf = gpuDynInst->wavefront();
28320  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
28321  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
28322  ConstVecOperandI32 src2(gpuDynInst, extData.SRC2);
28323  VecOperandI32 vdst(gpuDynInst, instData.VDST);
28324 
28325  src0.readSrc();
28326  src1.readSrc();
28327  src2.readSrc();
28328 
28332  assert(!(instData.ABS & 0x1));
28333  assert(!(instData.ABS & 0x2));
28334  assert(!(instData.ABS & 0x4));
28335  assert(!(extData.NEG & 0x1));
28336  assert(!(extData.NEG & 0x2));
28337  assert(!(extData.NEG & 0x4));
28338 
28339  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28340  if (wf->execMask(lane)) {
28341  VecElemI32 min_0_1 = std::min(src0[lane], src1[lane]);
28342  vdst[lane] = std::min(min_0_1, src2[lane]);
28343  }
28344  }
28345 
28346  vdst.write();
28347  }
28348 
28350  : Inst_VOP3(iFmt, "v_min3_u32", false)
28351  {
28352  setFlag(ALU);
28353  } // Inst_VOP3__V_MIN3_U32
28354 
28356  {
28357  } // ~Inst_VOP3__V_MIN3_U32
28358 
28359  // D.u = min(S0.u, S1.u, S2.u).
28360  void
28362  {
28363  Wavefront *wf = gpuDynInst->wavefront();
28364  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
28365  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
28366  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
28367  VecOperandU32 vdst(gpuDynInst, instData.VDST);
28368 
28369  src0.readSrc();
28370  src1.readSrc();
28371  src2.readSrc();
28372 
28376  assert(!(instData.ABS & 0x1));
28377  assert(!(instData.ABS & 0x2));
28378  assert(!(instData.ABS & 0x4));
28379  assert(!(extData.NEG & 0x1));
28380  assert(!(extData.NEG & 0x2));
28381  assert(!(extData.NEG & 0x4));
28382 
28383  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28384  if (wf->execMask(lane)) {
28385  VecElemU32 min_0_1 = std::min(src0[lane], src1[lane]);
28386  vdst[lane] = std::min(min_0_1, src2[lane]);
28387  }
28388  }
28389 
28390  vdst.write();
28391  }
28392 
28394  : Inst_VOP3(iFmt, "v_max3_f32", false)
28395  {
28396  setFlag(ALU);
28397  setFlag(F32);
28398  } // Inst_VOP3__V_MAX3_F32
28399 
28401  {
28402  } // ~Inst_VOP3__V_MAX3_F32
28403 
28404  // D.f = max(S0.f, S1.f, S2.f).
28405  void
28407  {
28408  Wavefront *wf = gpuDynInst->wavefront();
28409  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
28410  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
28411  ConstVecOperandF32 src2(gpuDynInst, extData.SRC2);
28412  VecOperandF32 vdst(gpuDynInst, instData.VDST);
28413 
28414  src0.readSrc();
28415  src1.readSrc();
28416  src2.readSrc();
28417 
28418  if (instData.ABS & 0x1) {
28419  src0.absModifier();
28420  }
28421 
28422  if (instData.ABS & 0x2) {
28423  src1.absModifier();
28424  }
28425 
28426  if (instData.ABS & 0x4) {
28427  src2.absModifier();
28428  }
28429 
28430  if (extData.NEG & 0x1) {
28431  src0.negModifier();
28432  }
28433 
28434  if (extData.NEG & 0x2) {
28435  src1.negModifier();
28436  }
28437 
28438  if (extData.NEG & 0x4) {
28439  src2.negModifier();
28440  }
28441 
28442  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28443  if (wf->execMask(lane)) {
28444  VecElemF32 max_0_1 = std::fmax(src0[lane], src1[lane]);
28445  vdst[lane] = std::fmax(max_0_1, src2[lane]);
28446  }
28447  }
28448 
28449  vdst.write();
28450  }
28451 
28453  : Inst_VOP3(iFmt, "v_max3_i32", false)
28454  {
28455  setFlag(ALU);
28456  } // Inst_VOP3__V_MAX3_I32
28457 
28459  {
28460  } // ~Inst_VOP3__V_MAX3_I32
28461 
28462  // D.i = max(S0.i, S1.i, S2.i).
28463  void
28465  {
28466  Wavefront *wf = gpuDynInst->wavefront();
28467  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
28468  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
28469  ConstVecOperandI32 src2(gpuDynInst, extData.SRC2);
28470  VecOperandI32 vdst(gpuDynInst, instData.VDST);
28471 
28472  src0.readSrc();
28473  src1.readSrc();
28474  src2.readSrc();
28475 
28479  assert(!(instData.ABS & 0x1));
28480  assert(!(instData.ABS & 0x2));
28481  assert(!(instData.ABS & 0x4));
28482  assert(!(extData.NEG & 0x1));
28483  assert(!(extData.NEG & 0x2));
28484  assert(!(extData.NEG & 0x4));
28485 
28486  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28487  if (wf->execMask(lane)) {
28488  VecElemI32 max_0_1 = std::max(src0[lane], src1[lane]);
28489  vdst[lane] = std::max(max_0_1, src2[lane]);
28490  }
28491  }
28492 
28493  vdst.write();
28494  }
28495 
28497  : Inst_VOP3(iFmt, "v_max3_u32", false)
28498  {
28499  setFlag(ALU);
28500  } // Inst_VOP3__V_MAX3_U32
28501 
28503  {
28504  } // ~Inst_VOP3__V_MAX3_U32
28505 
28506  // D.u = max(S0.u, S1.u, S2.u).
28507  void
28509  {
28510  Wavefront *wf = gpuDynInst->wavefront();
28511  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
28512  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
28513  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
28514  VecOperandU32 vdst(gpuDynInst, instData.VDST);
28515 
28516  src0.readSrc();
28517  src1.readSrc();
28518  src2.readSrc();
28519 
28523  assert(!(instData.ABS & 0x1));
28524  assert(!(instData.ABS & 0x2));
28525  assert(!(instData.ABS & 0x4));
28526  assert(!(extData.NEG & 0x1));
28527  assert(!(extData.NEG & 0x2));
28528  assert(!(extData.NEG & 0x4));
28529 
28530  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28531  if (wf->execMask(lane)) {
28532  VecElemU32 max_0_1 = std::max(src0[lane], src1[lane]);
28533  vdst[lane] = std::max(max_0_1, src2[lane]);
28534  }
28535  }
28536 
28537  vdst.write();
28538  }
28539 
28541  : Inst_VOP3(iFmt, "v_med3_f32", false)
28542  {
28543  setFlag(ALU);
28544  setFlag(F32);
28545  } // Inst_VOP3__V_MED3_F32
28546 
28548  {
28549  } // ~Inst_VOP3__V_MED3_F32
28550 
28551  // D.f = median(S0.f, S1.f, S2.f).
28552  void
28554  {
28555  Wavefront *wf = gpuDynInst->wavefront();
28556  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
28557  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
28558  ConstVecOperandF32 src2(gpuDynInst, extData.SRC2);
28559  VecOperandF32 vdst(gpuDynInst, instData.VDST);
28560 
28561  src0.readSrc();
28562  src1.readSrc();
28563  src2.readSrc();
28564 
28565  if (instData.ABS & 0x1) {
28566  src0.absModifier();
28567  }
28568 
28569  if (instData.ABS & 0x2) {
28570  src1.absModifier();
28571  }
28572 
28573  if (instData.ABS & 0x4) {
28574  src2.absModifier();
28575  }
28576 
28577  if (extData.NEG & 0x1) {
28578  src0.negModifier();
28579  }
28580 
28581  if (extData.NEG & 0x2) {
28582  src1.negModifier();
28583  }
28584 
28585  if (extData.NEG & 0x4) {
28586  src2.negModifier();
28587  }
28588 
28589  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28590  if (wf->execMask(lane)) {
28591  vdst[lane] = median(src0[lane], src1[lane], src2[lane]);
28592  }
28593  }
28594 
28595  vdst.write();
28596  }
28597 
28599  : Inst_VOP3(iFmt, "v_med3_i32", false)
28600  {
28601  setFlag(ALU);
28602  } // Inst_VOP3__V_MED3_I32
28603 
28605  {
28606  } // ~Inst_VOP3__V_MED3_I32
28607 
28608  // D.i = median(S0.i, S1.i, S2.i).
28609  void
28611  {
28612  Wavefront *wf = gpuDynInst->wavefront();
28613  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
28614  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
28615  ConstVecOperandI32 src2(gpuDynInst, extData.SRC2);
28616  VecOperandI32 vdst(gpuDynInst, instData.VDST);
28617 
28618  src0.readSrc();
28619  src1.readSrc();
28620  src2.readSrc();
28621 
28625  assert(!(instData.ABS & 0x1));
28626  assert(!(instData.ABS & 0x2));
28627  assert(!(instData.ABS & 0x4));
28628  assert(!(extData.NEG & 0x1));
28629  assert(!(extData.NEG & 0x2));
28630  assert(!(extData.NEG & 0x4));
28631 
28632  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28633  if (wf->execMask(lane)) {
28634  vdst[lane] = median(src0[lane], src1[lane], src2[lane]);
28635  }
28636  }
28637 
28638  vdst.write();
28639  }
28640 
28642  : Inst_VOP3(iFmt, "v_med3_u32", false)
28643  {
28644  setFlag(ALU);
28645  } // Inst_VOP3__V_MED3_U32
28646 
28648  {
28649  } // ~Inst_VOP3__V_MED3_U32
28650 
28651  // D.u = median(S0.u, S1.u, S2.u).
28652  void
28654  {
28655  Wavefront *wf = gpuDynInst->wavefront();
28656  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
28657  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
28658  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
28659  VecOperandU32 vdst(gpuDynInst, instData.VDST);
28660 
28661  src0.readSrc();
28662  src1.readSrc();
28663  src2.readSrc();
28664 
28668  assert(!(instData.ABS & 0x1));
28669  assert(!(instData.ABS & 0x2));
28670  assert(!(instData.ABS & 0x4));
28671  assert(!(extData.NEG & 0x1));
28672  assert(!(extData.NEG & 0x2));
28673  assert(!(extData.NEG & 0x4));
28674 
28675  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28676  if (wf->execMask(lane)) {
28677  vdst[lane] = median(src0[lane], src1[lane], src2[lane]);
28678  }
28679  }
28680 
28681  vdst.write();
28682  }
28683 
28685  : Inst_VOP3(iFmt, "v_sad_u8", false)
28686  {
28687  setFlag(ALU);
28688  } // Inst_VOP3__V_SAD_U8
28689 
28691  {
28692  } // ~Inst_VOP3__V_SAD_U8
28693 
28694  // D.u = abs(S0.i[31:24] - S1.i[31:24]) + abs(S0.i[23:16] - S1.i[23:16]) +
28695  // abs(S0.i[15:8] - S1.i[15:8]) + abs(S0.i[7:0] - S1.i[7:0]) + S2.u.
28696  // Sum of absolute differences with accumulation, overflow into upper bits
28697  // is allowed.
28698  void
28700  {
28701  Wavefront *wf = gpuDynInst->wavefront();
28702  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
28703  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
28704  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
28705  VecOperandU32 vdst(gpuDynInst, instData.VDST);
28706 
28707  src0.readSrc();
28708  src1.readSrc();
28709  src2.readSrc();
28710 
28714  assert(!(instData.ABS & 0x1));
28715  assert(!(instData.ABS & 0x2));
28716  assert(!(instData.ABS & 0x4));
28717  assert(!(extData.NEG & 0x1));
28718  assert(!(extData.NEG & 0x2));
28719  assert(!(extData.NEG & 0x4));
28720 
28721  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28722  if (wf->execMask(lane)) {
28723  vdst[lane] = std::abs(bits(src0[lane], 31, 24)
28724  - bits(src1[lane], 31, 24))
28725  + std::abs(bits(src0[lane], 23, 16)
28726  - bits(src1[lane], 23, 16))
28727  + std::abs(bits(src0[lane], 15, 8)
28728  - bits(src1[lane], 15, 8))
28729  + std::abs(bits(src0[lane], 7, 0)
28730  - bits(src1[lane], 7, 0)) + src2[lane];
28731  }
28732  }
28733 
28734  vdst.write();
28735  }
28736 
28738  : Inst_VOP3(iFmt, "v_sad_hi_u8", false)
28739  {
28740  setFlag(ALU);
28741  } // Inst_VOP3__V_SAD_HI_U8
28742 
28744  {
28745  } // ~Inst_VOP3__V_SAD_HI_U8
28746 
28747  // D.u = (SAD_U8(S0, S1, 0) << 16) + S2.u.
28748  // Sum of absolute differences with accumulation, overflow is lost.
28749  void
28751  {
28752  Wavefront *wf = gpuDynInst->wavefront();
28753  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
28754  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
28755  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
28756  VecOperandU32 vdst(gpuDynInst, instData.VDST);
28757 
28758  src0.readSrc();
28759  src1.readSrc();
28760  src2.readSrc();
28761 
28765  assert(!(instData.ABS & 0x1));
28766  assert(!(instData.ABS & 0x2));
28767  assert(!(instData.ABS & 0x4));
28768  assert(!(extData.NEG & 0x1));
28769  assert(!(extData.NEG & 0x2));
28770  assert(!(extData.NEG & 0x4));
28771 
28772  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28773  if (wf->execMask(lane)) {
28774  vdst[lane] = (((bits(src0[lane], 31, 24)
28775  - bits(src1[lane], 31, 24)) + (bits(src0[lane], 23, 16)
28776  - bits(src1[lane], 23, 16)) + (bits(src0[lane], 15, 8)
28777  - bits(src1[lane], 15, 8)) + (bits(src0[lane], 7, 0)
28778  - bits(src1[lane], 7, 0))) << 16) + src2[lane];
28779  }
28780  }
28781 
28782  vdst.write();
28783  }
28784 
28786  : Inst_VOP3(iFmt, "v_sad_u16", false)
28787  {
28788  setFlag(ALU);
28789  } // Inst_VOP3__V_SAD_U16
28790 
28792  {
28793  } // ~Inst_VOP3__V_SAD_U16
28794 
28795  // D.u = abs(S0.i[31:16] - S1.i[31:16]) + abs(S0.i[15:0] - S1.i[15:0])
28796  // + S2.u.
28797  // Word SAD with accumulation.
28798  void
28800  {
28801  Wavefront *wf = gpuDynInst->wavefront();
28802  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
28803  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
28804  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
28805  VecOperandU32 vdst(gpuDynInst, instData.VDST);
28806 
28807  src0.readSrc();
28808  src1.readSrc();
28809  src2.readSrc();
28810 
28814  assert(!(instData.ABS & 0x1));
28815  assert(!(instData.ABS & 0x2));
28816  assert(!(instData.ABS & 0x4));
28817  assert(!(extData.NEG & 0x1));
28818  assert(!(extData.NEG & 0x2));
28819  assert(!(extData.NEG & 0x4));
28820 
28821  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28822  if (wf->execMask(lane)) {
28823  vdst[lane] = std::abs(bits(src0[lane], 31, 16)
28824  - bits(src1[lane], 31, 16))
28825  + std::abs(bits(src0[lane], 15, 0)
28826  - bits(src1[lane], 15, 0)) + src2[lane];
28827  }
28828  }
28829 
28830  vdst.write();
28831  }
28832 
28834  : Inst_VOP3(iFmt, "v_sad_u32", false)
28835  {
28836  setFlag(ALU);
28837  } // Inst_VOP3__V_SAD_U32
28838 
28840  {
28841  } // ~Inst_VOP3__V_SAD_U32
28842 
28843  // D.u = abs(S0.i - S1.i) + S2.u.
28844  // Dword SAD with accumulation.
28845  void
28847  {
28848  Wavefront *wf = gpuDynInst->wavefront();
28849  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
28850  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
28851  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
28852  VecOperandU32 vdst(gpuDynInst, instData.VDST);
28853 
28854  src0.readSrc();
28855  src1.readSrc();
28856  src2.readSrc();
28857 
28861  assert(!(instData.ABS & 0x1));
28862  assert(!(instData.ABS & 0x2));
28863  assert(!(instData.ABS & 0x4));
28864  assert(!(extData.NEG & 0x1));
28865  assert(!(extData.NEG & 0x2));
28866  assert(!(extData.NEG & 0x4));
28867 
28868  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28869  if (wf->execMask(lane)) {
28870  vdst[lane] = std::abs(src0[lane] - src1[lane]) + src2[lane];
28871  }
28872  }
28873 
28874  vdst.write();
28875  }
28876 
28878  : Inst_VOP3(iFmt, "v_cvt_pk_u8_f32", false)
28879  {
28880  setFlag(ALU);
28881  setFlag(F32);
28882  } // Inst_VOP3__V_CVT_PK_U8_F32
28883 
28885  {
28886  } // ~Inst_VOP3__V_CVT_PK_U8_F32
28887 
28888  // D.u = ((flt32_to_uint8(S0.f) & 0xff) << (8 * S1.u[1:0]))
28889  // | (S2.u & ~(0xff << (8 * S1.u[1:0]))).
28890  // Convert floating point value S0 to 8-bit unsigned integer and pack the
28891  // result into byte S1 of dword S2.
28892  void
28894  {
28895  Wavefront *wf = gpuDynInst->wavefront();
28896  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
28897  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
28898  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
28899  VecOperandU32 vdst(gpuDynInst, instData.VDST);
28900 
28901  src0.readSrc();
28902  src1.readSrc();
28903  src2.readSrc();
28904 
28905  if (instData.ABS & 0x1) {
28906  src0.absModifier();
28907  }
28908 
28909 
28910  if (extData.NEG & 0x1) {
28911  src0.negModifier();
28912  }
28913 
28917  assert(!(instData.ABS & 0x2));
28918  assert(!(instData.ABS & 0x4));
28919  assert(!(extData.NEG & 0x2));
28920  assert(!(extData.NEG & 0x4));
28921 
28922  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28923  if (wf->execMask(lane)) {
28924  vdst[lane] = (((VecElemU8)src0[lane] & 0xff)
28925  << (8 * bits(src1[lane], 1, 0)))
28926  | (src2[lane] & ~(0xff << (8 * bits(src1[lane], 1, 0))));
28927  }
28928  }
28929 
28930  vdst.write();
28931  }
28932 
28934  : Inst_VOP3(iFmt, "v_div_fixup_f32", false)
28935  {
28936  setFlag(ALU);
28937  setFlag(F32);
28938  } // Inst_VOP3__V_DIV_FIXUP_F32
28939 
28941  {
28942  } // ~Inst_VOP3__V_DIV_FIXUP_F32
28943 
28944  // D.f = Divide fixup and flags -- s0.f = Quotient, s1.f = Denominator,
28945  // s2.f = Numerator.
28946  void
28948  {
28949  Wavefront *wf = gpuDynInst->wavefront();
28950  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
28951  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
28952  ConstVecOperandF32 src2(gpuDynInst, extData.SRC2);
28953  VecOperandF32 vdst(gpuDynInst, instData.VDST);
28954 
28955  src0.readSrc();
28956  src1.readSrc();
28957  src2.readSrc();
28958 
28959  if (instData.ABS & 0x1) {
28960  src0.absModifier();
28961  }
28962 
28963  if (instData.ABS & 0x2) {
28964  src1.absModifier();
28965  }
28966 
28967  if (instData.ABS & 0x4) {
28968  src2.absModifier();
28969  }
28970 
28971  if (extData.NEG & 0x1) {
28972  src0.negModifier();
28973  }
28974 
28975  if (extData.NEG & 0x2) {
28976  src1.negModifier();
28977  }
28978 
28979  if (extData.NEG & 0x4) {
28980  src2.negModifier();
28981  }
28982 
28983  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
28984  if (wf->execMask(lane)) {
28985  if (std::fpclassify(src1[lane]) == FP_ZERO) {
28986  if (std::signbit(src1[lane])) {
28987  vdst[lane] = -INFINITY;
28988  } else {
28989  vdst[lane] = +INFINITY;
28990  }
28991  } else if (std::isnan(src2[lane]) || std::isnan(src1[lane])) {
28992  vdst[lane] = NAN;
28993  } else if (std::isinf(src1[lane])) {
28994  if (std::signbit(src1[lane])) {
28995  vdst[lane] = -INFINITY;
28996  } else {
28997  vdst[lane] = +INFINITY;
28998  }
28999  } else {
29000  vdst[lane] = src2[lane] / src1[lane];
29001  }
29002  }
29003  }
29004 
29005  vdst.write();
29006  } // execute
29007  // --- Inst_VOP3__V_DIV_FIXUP_F64 class methods ---
29008 
29010  : Inst_VOP3(iFmt, "v_div_fixup_f64", false)
29011  {
29012  setFlag(ALU);
29013  setFlag(F64);
29014  } // Inst_VOP3__V_DIV_FIXUP_F64
29015 
29017  {
29018  } // ~Inst_VOP3__V_DIV_FIXUP_F64
29019 
29020  // D.d = Divide fixup and flags -- s0.d = Quotient, s1.d = Denominator,
29021  // s2.d = Numerator.
29022  void
29024  {
29025  Wavefront *wf = gpuDynInst->wavefront();
29026  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
29027  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
29028  ConstVecOperandF64 src2(gpuDynInst, extData.SRC2);
29029  VecOperandF64 vdst(gpuDynInst, instData.VDST);
29030 
29031  src0.readSrc();
29032  src1.readSrc();
29033  src2.readSrc();
29034 
29035  if (instData.ABS & 0x1) {
29036  src0.absModifier();
29037  }
29038 
29039  if (instData.ABS & 0x2) {
29040  src1.absModifier();
29041  }
29042 
29043  if (instData.ABS & 0x4) {
29044  src2.absModifier();
29045  }
29046 
29047  if (extData.NEG & 0x1) {
29048  src0.negModifier();
29049  }
29050 
29051  if (extData.NEG & 0x2) {
29052  src1.negModifier();
29053  }
29054 
29055  if (extData.NEG & 0x4) {
29056  src2.negModifier();
29057  }
29058 
29059  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
29060  if (wf->execMask(lane)) {
29061  int sign_out = std::signbit(src1[lane])
29062  ^ std::signbit(src2[lane]);
29063  int exp1(0);
29064  int exp2(0);
29065  std::frexp(src1[lane], &exp1);
29066  std::frexp(src2[lane], &exp2);
29067 
29068  if (std::isnan(src1[lane]) || std::isnan(src2[lane])) {
29069  vdst[lane] = std::numeric_limits<VecElemF64>::quiet_NaN();
29070  } else if (std::fpclassify(src1[lane]) == FP_ZERO
29071  && std::fpclassify(src2[lane]) == FP_ZERO) {
29072  vdst[lane]
29073  = std::numeric_limits<VecElemF64>::signaling_NaN();
29074  } else if (std::isinf(src1[lane]) && std::isinf(src2[lane])) {
29075  vdst[lane]
29076  = std::numeric_limits<VecElemF64>::signaling_NaN();
29077  } else if (std::fpclassify(src1[lane]) == FP_ZERO
29078  || std::isinf(src2[lane])) {
29079  vdst[lane] = sign_out ? -INFINITY : +INFINITY;
29080  } else if (std::isinf(src1[lane])
29081  || std::fpclassify(src2[lane]) == FP_ZERO) {
29082  vdst[lane] = sign_out ? -0.0 : +0.0;
29083  } else if (exp2 - exp1 < -1075) {
29084  vdst[lane] = src0[lane];
29085  } else if (exp1 == 2047) {
29086  vdst[lane] = src0[lane];
29087  } else {
29088  vdst[lane] = sign_out ? -std::fabs(src0[lane])
29089  : std::fabs(src0[lane]);
29090  }
29091  }
29092  }
29093 
29094  vdst.write();
29095  }
29096 
29098  InFmt_VOP3_SDST_ENC *iFmt)
29099  : Inst_VOP3_SDST_ENC(iFmt, "v_div_scale_f32")
29100  {
29101  setFlag(ALU);
29102  setFlag(WritesVCC);
29103  setFlag(F32);
29104  } // Inst_VOP3__V_DIV_SCALE_F32
29105 
29107  {
29108  } // ~Inst_VOP3__V_DIV_SCALE_F32
29109 
29110  // {vcc,D.f} = Divide preop and flags -- s0.f = Quotient, s1.f =
29111  // Denominator, s2.f = Numerator -- s0 must equal s1 or s2. Given a
29112  // numerator and denominator, this opcode will appropriately scale inputs
29113  // for division to avoid subnormal terms during Newton-Raphson correction
29114  // algorithm. This opcode producses a VCC flag for post-scale of quotient.
29115  void
29117  {
29118  Wavefront *wf = gpuDynInst->wavefront();
29119  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
29120  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
29121  ConstVecOperandF32 src2(gpuDynInst, extData.SRC2);
29122  ScalarOperandU64 vcc(gpuDynInst, instData.SDST);
29123  VecOperandF32 vdst(gpuDynInst, instData.VDST);
29124 
29125  src0.readSrc();
29126  src1.readSrc();
29127  src2.readSrc();
29128 
29129  if (extData.NEG & 0x1) {
29130  src0.negModifier();
29131  }
29132 
29133  if (extData.NEG & 0x2) {
29134  src1.negModifier();
29135  }
29136 
29137  if (extData.NEG & 0x4) {
29138  src2.negModifier();
29139  }
29140 
29141  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
29142  if (wf->execMask(lane)) {
29143  vdst[lane] = src0[lane];
29144  vcc.setBit(lane, 0);
29145  }
29146  }
29147 
29148  vcc.write();
29149  vdst.write();
29150  } // execute
29151  // --- Inst_VOP3__V_DIV_SCALE_F64 class methods ---
29152 
29154  InFmt_VOP3_SDST_ENC *iFmt)
29155  : Inst_VOP3_SDST_ENC(iFmt, "v_div_scale_f64")
29156  {
29157  setFlag(ALU);
29158  setFlag(WritesVCC);
29159  setFlag(F64);
29160  } // Inst_VOP3__V_DIV_SCALE_F64
29161 
29163  {
29164  } // ~Inst_VOP3__V_DIV_SCALE_F64
29165 
29166  // {vcc,D.d} = Divide preop and flags -- s0.d = Quotient, s1.d =
29167  // Denominator, s2.d = Numerator -- s0 must equal s1 or s2. Given a
29168  // numerator and denominator, this opcode will appropriately scale inputs
29169  // for division to avoid subnormal terms during Newton-Raphson correction
29170  // algorithm. This opcode producses a VCC flag for post-scale of quotient.
29171  void
29173  {
29174  Wavefront *wf = gpuDynInst->wavefront();
29175  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
29176  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
29177  ConstVecOperandF64 src2(gpuDynInst, extData.SRC2);
29178  ScalarOperandU64 vcc(gpuDynInst, instData.SDST);
29179  VecOperandF64 vdst(gpuDynInst, instData.VDST);
29180 
29181  src0.readSrc();
29182  src1.readSrc();
29183  src2.readSrc();
29184 
29185  if (extData.NEG & 0x1) {
29186  src0.negModifier();
29187  }
29188 
29189  if (extData.NEG & 0x2) {
29190  src1.negModifier();
29191  }
29192 
29193  if (extData.NEG & 0x4) {
29194  src2.negModifier();
29195  }
29196 
29197  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
29198  if (wf->execMask(lane)) {
29199  int exp1(0);
29200  int exp2(0);
29201  std::frexp(src1[lane], &exp1);
29202  std::frexp(src2[lane], &exp2);
29203  vcc.setBit(lane, 0);
29204 
29205  if (std::fpclassify(src1[lane]) == FP_ZERO
29206  || std::fpclassify(src2[lane]) == FP_ZERO) {
29207  vdst[lane] = NAN;
29208  } else if (exp2 - exp1 >= 768) {
29209  vcc.setBit(lane, 1);
29210  if (src0[lane] == src1[lane]) {
29211  vdst[lane] = std::ldexp(src0[lane], 128);
29212  }
29213  } else if (std::fpclassify(src1[lane]) == FP_SUBNORMAL) {
29214  vdst[lane] = std::ldexp(src0[lane], 128);
29215  } else if (std::fpclassify(1.0 / src1[lane]) == FP_SUBNORMAL
29216  && std::fpclassify(src2[lane] / src1[lane])
29217  == FP_SUBNORMAL) {
29218  vcc.setBit(lane, 1);
29219  if (src0[lane] == src1[lane]) {
29220  vdst[lane] = std::ldexp(src0[lane], 128);
29221  }
29222  } else if (std::fpclassify(1.0 / src1[lane]) == FP_SUBNORMAL) {
29223  vdst[lane] = std::ldexp(src0[lane], -128);
29224  } else if (std::fpclassify(src2[lane] / src1[lane])
29225  == FP_SUBNORMAL) {
29226  vcc.setBit(lane, 1);
29227  if (src0[lane] == src2[lane]) {
29228  vdst[lane] = std::ldexp(src0[lane], 128);
29229  }
29230  } else if (exp2 <= 53) {
29231  vdst[lane] = std::ldexp(src0[lane], 128);
29232  }
29233  }
29234  }
29235 
29236  vcc.write();
29237  vdst.write();
29238  }
29239 
29241  : Inst_VOP3(iFmt, "v_div_fmas_f32", false)
29242  {
29243  setFlag(ALU);
29244  setFlag(ReadsVCC);
29245  setFlag(F32);
29246  setFlag(FMA);
29247  } // Inst_VOP3__V_DIV_FMAS_F32
29248 
29250  {
29251  } // ~Inst_VOP3__V_DIV_FMAS_F32
29252 
29253  // D.f = Special case divide FMA with scale and flags(s0.f = Quotient,
29254  // s1.f = Denominator, s2.f = Numerator)
29255  void
29257  {
29258  Wavefront *wf = gpuDynInst->wavefront();
29259  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
29260  ConstVecOperandF32 src1(gpuDynInst, extData.SRC1);
29261  ConstVecOperandF32 src2(gpuDynInst, extData.SRC2);
29262  VecOperandF64 vdst(gpuDynInst, instData.VDST);
29263 
29264  src0.readSrc();
29265  src1.readSrc();
29266  src2.readSrc();
29267 
29268  if (instData.ABS & 0x1) {
29269  src0.absModifier();
29270  }
29271 
29272  if (instData.ABS & 0x2) {
29273  src1.absModifier();
29274  }
29275 
29276  if (instData.ABS & 0x4) {
29277  src2.absModifier();
29278  }
29279 
29280  if (extData.NEG & 0x1) {
29281  src0.negModifier();
29282  }
29283 
29284  if (extData.NEG & 0x2) {
29285  src1.negModifier();
29286  }
29287 
29288  if (extData.NEG & 0x4) {
29289  src2.negModifier();
29290  }
29291 
29292  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
29293  if (wf->execMask(lane)) {
29294  vdst[lane] = std::fma(src0[lane], src1[lane], src2[lane]);
29295  }
29296  }
29297 
29298  //vdst.write();
29299  } // execute
29300  // --- Inst_VOP3__V_DIV_FMAS_F64 class methods ---
29301 
29303  : Inst_VOP3(iFmt, "v_div_fmas_f64", false)
29304  {
29305  setFlag(ALU);
29306  setFlag(ReadsVCC);
29307  setFlag(F64);
29308  setFlag(FMA);
29309  } // Inst_VOP3__V_DIV_FMAS_F64
29310 
29312  {
29313  } // ~Inst_VOP3__V_DIV_FMAS_F64
29314 
29315  // D.d = Special case divide FMA with scale and flags(s0.d = Quotient,
29316  // s1.d = Denominator, s2.d = Numerator)
29317  void
29319  {
29320  Wavefront *wf = gpuDynInst->wavefront();
29321  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
29322  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
29323  ConstVecOperandF64 src2(gpuDynInst, extData.SRC2);
29324  VecOperandF64 vdst(gpuDynInst, instData.VDST);
29325  ConstScalarOperandU64 vcc(gpuDynInst, REG_VCC_LO);
29326 
29327  src0.readSrc();
29328  src1.readSrc();
29329  src2.readSrc();
29330  vcc.read();
29331 
29332  if (instData.ABS & 0x1) {
29333  src0.absModifier();
29334  }
29335 
29336  if (instData.ABS & 0x2) {
29337  src1.absModifier();
29338  }
29339 
29340  if (instData.ABS & 0x4) {
29341  src2.absModifier();
29342  }
29343 
29344  if (extData.NEG & 0x1) {
29345  src0.negModifier();
29346  }
29347 
29348  if (extData.NEG & 0x2) {
29349  src1.negModifier();
29350  }
29351 
29352  if (extData.NEG & 0x4) {
29353  src2.negModifier();
29354  }
29355 
29356  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
29357  if (wf->execMask(lane)) {
29358  if (bits(vcc.rawData(), lane)) {
29359  vdst[lane] = std::pow(2, 64)
29360  * std::fma(src0[lane], src1[lane], src2[lane]);
29361  } else {
29362  vdst[lane] = std::fma(src0[lane], src1[lane], src2[lane]);
29363  }
29364  }
29365  }
29366 
29367  vdst.write();
29368  }
29369 
29371  : Inst_VOP3(iFmt, "v_msad_u8", false)
29372  {
29373  setFlag(ALU);
29374  } // Inst_VOP3__V_MSAD_U8
29375 
29377  {
29378  } // ~Inst_VOP3__V_MSAD_U8
29379 
29380  // D.u = Masked Byte SAD with accum_lo(S0.u, S1.u, S2.u).
29381  void
29383  {
29385  }
29386 
29388  : Inst_VOP3(iFmt, "v_qsad_pk_u16_u8", false)
29389  {
29390  setFlag(ALU);
29391  } // Inst_VOP3__V_QSAD_PK_U16_U8
29392 
29394  {
29395  } // ~Inst_VOP3__V_QSAD_PK_U16_U8
29396 
29397  // D.u = Quad-Byte SAD with 16-bit packed accum_lo/hi(S0.u[63:0],
29398  // S1.u[31:0], S2.u[63:0])
29399  void
29401  {
29403  }
29404 
29406  InFmt_VOP3 *iFmt)
29407  : Inst_VOP3(iFmt, "v_mqsad_pk_u16_u8", false)
29408  {
29409  setFlag(ALU);
29410  } // Inst_VOP3__V_MQSAD_PK_U16_U8
29411 
29413  {
29414  } // ~Inst_VOP3__V_MQSAD_PK_U16_U8
29415 
29416  // D.u = Masked Quad-Byte SAD with 16-bit packed accum_lo/hi(S0.u[63:0],
29417  // S1.u[31:0], S2.u[63:0])
29418  void
29420  {
29422  }
29423 
29425  : Inst_VOP3(iFmt, "v_mqsad_u32_u8", false)
29426  {
29427  setFlag(ALU);
29428  } // Inst_VOP3__V_MQSAD_U32_U8
29429 
29431  {
29432  } // ~Inst_VOP3__V_MQSAD_U32_U8
29433 
29434  // D.u128 = Masked Quad-Byte SAD with 32-bit accum_lo/hi(S0.u[63:0],
29435  // S1.u[31:0], S2.u[127:0])
29436  void
29438  {
29440  }
29441 
29443  InFmt_VOP3_SDST_ENC *iFmt)
29444  : Inst_VOP3_SDST_ENC(iFmt, "v_mad_u64_u32")
29445  {
29446  setFlag(ALU);
29447  setFlag(WritesVCC);
29448  setFlag(MAD);
29449  } // Inst_VOP3__V_MAD_U64_U32
29450 
29452  {
29453  } // ~Inst_VOP3__V_MAD_U64_U32
29454 
29455  // {vcc_out, D.u64} = S0.u32 * S1.u32 + S2.u64.
29456  void
29458  {
29459  Wavefront *wf = gpuDynInst->wavefront();
29460  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
29461  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
29462  ConstVecOperandU64 src2(gpuDynInst, extData.SRC2);
29463  ScalarOperandU64 vcc(gpuDynInst, instData.SDST);
29464  VecOperandU64 vdst(gpuDynInst, instData.VDST);
29465 
29466  src0.readSrc();
29467  src1.readSrc();
29468  src2.readSrc();
29469  vdst.read();
29470 
29474  assert(!(extData.NEG & 0x1));
29475  assert(!(extData.NEG & 0x2));
29476  assert(!(extData.NEG & 0x4));
29477 
29478  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
29479  if (wf->execMask(lane)) {
29480  vcc.setBit(lane, muladd(vdst[lane], src0[lane], src1[lane],
29481  src2[lane]));
29482  }
29483  }
29484 
29485  vcc.write();
29486  vdst.write();
29487  }
29488 
29490  InFmt_VOP3_SDST_ENC *iFmt)
29491  : Inst_VOP3_SDST_ENC(iFmt, "v_mad_i64_i32")
29492  {
29493  setFlag(ALU);
29494  setFlag(WritesVCC);
29495  setFlag(MAD);
29496  } // Inst_VOP3__V_MAD_I64_I32
29497 
29499  {
29500  } // ~Inst_VOP3__V_MAD_I64_I32
29501 
29502  // {vcc_out,D.i64} = S0.i32 * S1.i32 + S2.i64.
29503  void
29505  {
29506  Wavefront *wf = gpuDynInst->wavefront();
29507  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
29508  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
29509  ConstVecOperandI64 src2(gpuDynInst, extData.SRC2);
29510  ScalarOperandU64 vcc(gpuDynInst, instData.SDST);
29511  VecOperandI64 vdst(gpuDynInst, instData.VDST);
29512 
29513  src0.readSrc();
29514  src1.readSrc();
29515  src2.readSrc();
29516 
29520  assert(!(extData.NEG & 0x1));
29521  assert(!(extData.NEG & 0x2));
29522  assert(!(extData.NEG & 0x4));
29523 
29524  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
29525  if (wf->execMask(lane)) {
29526  vcc.setBit(lane, muladd(vdst[lane], src0[lane], src1[lane],
29527  src2[lane]));
29528  }
29529  }
29530 
29531  vcc.write();
29532  vdst.write();
29533  }
29534 
29536  : Inst_VOP3(iFmt, "v_mad_f16", false)
29537  {
29538  setFlag(ALU);
29539  setFlag(F16);
29540  setFlag(MAD);
29541  } // Inst_VOP3__V_MAD_F16
29542 
29544  {
29545  } // ~Inst_VOP3__V_MAD_F16
29546 
29547  // D.f16 = S0.f16 * S1.f16 + S2.f16.
29548  // Supports round mode, exception flags, saturation.
29549  void
29551  {
29553  }
29554 
29556  : Inst_VOP3(iFmt, "v_mad_u16", false)
29557  {
29558  setFlag(ALU);
29559  setFlag(MAD);
29560  } // Inst_VOP3__V_MAD_U16
29561 
29563  {
29564  } // ~Inst_VOP3__V_MAD_U16
29565 
29566  // D.u16 = S0.u16 * S1.u16 + S2.u16.
29567  // Supports saturation (unsigned 16-bit integer domain).
29568  void
29570  {
29571  Wavefront *wf = gpuDynInst->wavefront();
29572  ConstVecOperandU16 src0(gpuDynInst, extData.SRC0);
29573  ConstVecOperandU16 src1(gpuDynInst, extData.SRC1);
29574  ConstVecOperandU16 src2(gpuDynInst, extData.SRC2);
29575  VecOperandU16 vdst(gpuDynInst, instData.VDST);
29576 
29577  src0.readSrc();
29578  src1.readSrc();
29579  src2.readSrc();
29580 
29584  assert(!(instData.ABS & 0x1));
29585  assert(!(instData.ABS & 0x2));
29586  assert(!(instData.ABS & 0x4));
29587  assert(!(extData.NEG & 0x1));
29588  assert(!(extData.NEG & 0x2));
29589  assert(!(extData.NEG & 0x4));
29590 
29591  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
29592  if (wf->execMask(lane)) {
29593  vdst[lane] = src0[lane] * src1[lane] + src2[lane];
29594  }
29595  }
29596 
29597  vdst.write();
29598  }
29599 
29601  : Inst_VOP3(iFmt, "v_mad_i16", false)
29602  {
29603  setFlag(ALU);
29604  setFlag(MAD);
29605  } // Inst_VOP3__V_MAD_I16
29606 
29608  {
29609  } // ~Inst_VOP3__V_MAD_I16
29610 
29611  // D.i16 = S0.i16 * S1.i16 + S2.i16.
29612  // Supports saturation (signed 16-bit integer domain).
29613  void
29615  {
29616  Wavefront *wf = gpuDynInst->wavefront();
29617  ConstVecOperandI16 src0(gpuDynInst, extData.SRC0);
29618  ConstVecOperandI16 src1(gpuDynInst, extData.SRC1);
29619  ConstVecOperandI16 src2(gpuDynInst, extData.SRC2);
29620  VecOperandI16 vdst(gpuDynInst, instData.VDST);
29621 
29622  src0.readSrc();
29623  src1.readSrc();
29624  src2.readSrc();
29625 
29629  assert(!(instData.ABS & 0x1));
29630  assert(!(instData.ABS & 0x2));
29631  assert(!(instData.ABS & 0x4));
29632  assert(!(extData.NEG & 0x1));
29633  assert(!(extData.NEG & 0x2));
29634  assert(!(extData.NEG & 0x4));
29635 
29636  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
29637  if (wf->execMask(lane)) {
29638  vdst[lane] = src0[lane] * src1[lane] + src2[lane];
29639  }
29640  }
29641 
29642  vdst.write();
29643  }
29644 
29646  : Inst_VOP3(iFmt, "v_perm_b32", false)
29647  {
29648  setFlag(ALU);
29649  } // Inst_VOP3__V_PERM_B32
29650 
29652  {
29653  } // ~Inst_VOP3__V_PERM_B32
29654 
29655  // D.u[31:24] = permute({S0.u, S1.u}, S2.u[31:24]);
29656  // D.u[23:16] = permute({S0.u, S1.u}, S2.u[23:16]);
29657  // D.u[15:8] = permute({S0.u, S1.u}, S2.u[15:8]);
29658  // D.u[7:0] = permute({S0.u, S1.u}, S2.u[7:0]);
29659  // byte permute(byte in[8], byte sel) {
29660  // if(sel>=13) then return 0xff;
29661  // elsif(sel==12) then return 0x00;
29662  // elsif(sel==11) then return in[7][7] * 0xff;
29663  // elsif(sel==10) then return in[5][7] * 0xff;
29664  // elsif(sel==9) then return in[3][7] * 0xff;
29665  // elsif(sel==8) then return in[1][7] * 0xff;
29666  // else return in[sel];
29667  // }
29668  void
29670  {
29671  Wavefront *wf = gpuDynInst->wavefront();
29672  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
29673  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
29674  ConstVecOperandU32 src2(gpuDynInst, extData.SRC2);
29675  VecOperandU32 vdst(gpuDynInst, instData.VDST);
29676 
29677  src0.readSrc();
29678  src1.readSrc();
29679  src2.readSrc();
29680 
29681  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
29682  if (wf->execMask(lane)) {
29683  VecElemU64 selector = (VecElemU64)src0[lane];
29684  selector = (selector << 32) | (VecElemU64)src1[lane];
29685  vdst[lane] = 0;
29686 
29687  DPRINTF(GCN3, "Executing v_perm_b32 src_0 0x%08x, src_1 "
29688  "0x%08x, src_2 0x%08x, vdst 0x%08x\n", src0[lane],
29689  src1[lane], src2[lane], vdst[lane]);
29690  DPRINTF(GCN3, "Selector: 0x%08x \n", selector);
29691 
29692  for (int i = 0; i < 4 ; ++i) {
29693  VecElemU32 permuted_val = permute(selector, 0xFF
29694  & ((VecElemU32)src2[lane] >> (8 * i)));
29695  vdst[lane] |= (permuted_val << i);
29696  }
29697 
29698  DPRINTF(GCN3, "v_perm result: 0x%08x\n", vdst[lane]);
29699  }
29700  }
29701 
29702  vdst.write();
29703  }
29704 
29706  : Inst_VOP3(iFmt, "v_fma_f16", false)
29707  {
29708  setFlag(ALU);
29709  setFlag(F16);
29710  setFlag(FMA);
29711  } // Inst_VOP3__V_FMA_F16
29712 
29714  {
29715  } // ~Inst_VOP3__V_FMA_F16
29716 
29717  // D.f16 = S0.f16 * S1.f16 + S2.f16.
29718  // Fused half precision multiply add.
29719  void
29721  {
29723  }
29724 
29726  : Inst_VOP3(iFmt, "v_div_fixup_f16", false)
29727  {
29728  setFlag(ALU);
29729  setFlag(F16);
29730  } // Inst_VOP3__V_DIV_FIXUP_F16
29731 
29733  {
29734  } // ~Inst_VOP3__V_DIV_FIXUP_F16
29735 
29736  // sign_out = sign(S1.f16)^sign(S2.f16);
29737  // if (S2.f16 == NAN)
29738  // D.f16 = Quiet(S2.f16);
29739  // else if (S1.f16 == NAN)
29740  // D.f16 = Quiet(S1.f16);
29741  // else if (S1.f16 == S2.f16 == 0)
29742  // # 0/0
29743  // D.f16 = pele_nan(0xfe00);
29744  // else if (abs(S1.f16) == abs(S2.f16) == +-INF)
29745  // # inf/inf
29746  // D.f16 = pele_nan(0xfe00);
29747  // else if (S1.f16 ==0 || abs(S2.f16) == +-INF)
29748  // # x/0, or inf/y
29749  // D.f16 = sign_out ? -INF : INF;
29750  // else if (abs(S1.f16) == +-INF || S2.f16 == 0)
29751  // # x/inf, 0/y
29752  // D.f16 = sign_out ? -0 : 0;
29753  // else if ((exp(S2.f16) - exp(S1.f16)) < -150)
29754  // D.f16 = sign_out ? -underflow : underflow;
29755  // else if (exp(S1.f16) == 255)
29756  // D.f16 = sign_out ? -overflow : overflow;
29757  // else
29758  // D.f16 = sign_out ? -abs(S0.f16) : abs(S0.f16).
29759  // Half precision division fixup.
29760  // S0 = Quotient, S1 = Denominator, S3 = Numerator.
29761  // Given a numerator, denominator, and quotient from a divide, this opcode
29762  // will detect and apply special case numerics, touching up the quotient if
29763  // necessary. This opcode also generates invalid, denorm and divide by
29764  // zero exceptions caused by the division.
29765  void
29767  {
29769  }
29770 
29772  InFmt_VOP3 *iFmt)
29773  : Inst_VOP3(iFmt, "v_cvt_pkaccum_u8_f32", false)
29774  {
29775  setFlag(ALU);
29776  setFlag(F32);
29777  } // Inst_VOP3__V_CVT_PKACCUM_U8_F32
29778 
29780  {
29781  } // ~Inst_VOP3__V_CVT_PKACCUM_U8_F32
29782 
29783  // byte = S1.u[1:0]; bit = byte * 8;
29784  // D.u[bit + 7:bit] = flt32_to_uint8(S0.f);
29785  // Pack converted value of S0.f into byte S1 of the destination.
29786  // SQ translates to V_CVT_PK_U8_F32.
29787  // Note: this opcode uses src_c to pass destination in as a source.
29788  void
29790  {
29792  }
29793 
29795  : Inst_VOP3(iFmt, "v_interp_p1_f32", false)
29796  {
29797  setFlag(ALU);
29798  setFlag(F32);
29799  } // Inst_VOP3__V_INTERP_P1_F32
29800 
29802  {
29803  } // ~Inst_VOP3__V_INTERP_P1_F32
29804 
29805  // D.f = P10 * S.f + P0;
29806  void
29808  {
29810  }
29811 
29813  : Inst_VOP3(iFmt, "v_interp_p2_f32", false)
29814  {
29815  setFlag(ALU);
29816  setFlag(F32);
29817  } // Inst_VOP3__V_INTERP_P2_F32
29818 
29820  {
29821  } // ~Inst_VOP3__V_INTERP_P2_F32
29822 
29823  // D.f = P20 * S.f + D.f;
29824  void
29826  {
29828  }
29829 
29831  : Inst_VOP3(iFmt, "v_interp_mov_f32", false)
29832  {
29833  setFlag(ALU);
29834  setFlag(F32);
29835  } // Inst_VOP3__V_INTERP_MOV_F32
29836 
29838  {
29839  } // ~Inst_VOP3__V_INTERP_MOV_F32
29840 
29841  // D.f = {P10,P20,P0}[S.u]; parameter load.
29842  void
29844  {
29846  }
29847 
29849  InFmt_VOP3 *iFmt)
29850  : Inst_VOP3(iFmt, "v_interp_p1ll_f16", false)
29851  {
29852  setFlag(ALU);
29853  setFlag(F16);
29854  } // Inst_VOP3__V_INTERP_P1LL_F16
29855 
29857  {
29858  } // ~Inst_VOP3__V_INTERP_P1LL_F16
29859 
29860  // D.f32 = P10.f16 * S0.f32 + P0.f16.
29861  void
29863  {
29865  }
29866 
29868  InFmt_VOP3 *iFmt)
29869  : Inst_VOP3(iFmt, "v_interp_p1lv_f16", false)
29870  {
29871  setFlag(ALU);
29872  setFlag(F16);
29873  } // Inst_VOP3__V_INTERP_P1LV_F16
29874 
29876  {
29877  } // ~Inst_VOP3__V_INTERP_P1LV_F16
29878 
29879  void
29881  {
29883  }
29884 
29886  : Inst_VOP3(iFmt, "v_interp_p2_f16", false)
29887  {
29888  setFlag(ALU);
29889  setFlag(F16);
29890  } // Inst_VOP3__V_INTERP_P2_F16
29891 
29893  {
29894  } // ~Inst_VOP3__V_INTERP_P2_F16
29895 
29896  // D.f16 = P20.f16 * S0.f32 + S2.f32.
29897  void
29899  {
29901  }
29902 
29904  : Inst_VOP3(iFmt, "v_add_f64", false)
29905  {
29906  setFlag(ALU);
29907  setFlag(F64);
29908  } // Inst_VOP3__V_ADD_F64
29909 
29911  {
29912  } // ~Inst_VOP3__V_ADD_F64
29913 
29914  // D.d = S0.d + S1.d.
29915  void
29917  {
29918  Wavefront *wf = gpuDynInst->wavefront();
29919  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
29920  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
29921  VecOperandF64 vdst(gpuDynInst, instData.VDST);
29922 
29923  src0.readSrc();
29924  src1.readSrc();
29925 
29926  if (instData.ABS & 0x1) {
29927  src0.absModifier();
29928  }
29929 
29930  if (instData.ABS & 0x2) {
29931  src1.absModifier();
29932  }
29933 
29934  if (extData.NEG & 0x1) {
29935  src0.negModifier();
29936  }
29937 
29938  if (extData.NEG & 0x2) {
29939  src1.negModifier();
29940  }
29941 
29945  assert(!(instData.ABS & 0x4));
29946  assert(!(extData.NEG & 0x4));
29947 
29948  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
29949  if (wf->execMask(lane)) {
29950  if (std::isnan(src0[lane]) ||
29951  std::isnan(src1[lane]) ) {
29952  vdst[lane] = NAN;
29953  } else if (std::isinf(src0[lane]) &&
29954  std::isinf(src1[lane])) {
29955  if (std::signbit(src0[lane]) !=
29956  std::signbit(src1[lane])) {
29957  vdst[lane] = NAN;
29958  } else {
29959  vdst[lane] = src0[lane];
29960  }
29961  } else if (std::isinf(src0[lane])) {
29962  vdst[lane] = src0[lane];
29963  } else if (std::isinf(src1[lane])) {
29964  vdst[lane] = src1[lane];
29965  } else if (std::fpclassify(src0[lane]) == FP_SUBNORMAL ||
29966  std::fpclassify(src0[lane]) == FP_ZERO) {
29967  if (std::fpclassify(src1[lane]) == FP_SUBNORMAL ||
29968  std::fpclassify(src1[lane]) == FP_ZERO) {
29969  if (std::signbit(src0[lane]) &&
29970  std::signbit(src1[lane])) {
29971  vdst[lane] = -0.0;
29972  } else {
29973  vdst[lane] = 0.0;
29974  }
29975  } else {
29976  vdst[lane] = src1[lane];
29977  }
29978  } else if (std::fpclassify(src1[lane]) == FP_SUBNORMAL ||
29979  std::fpclassify(src1[lane]) == FP_ZERO) {
29980  if (std::fpclassify(src0[lane]) == FP_SUBNORMAL ||
29981  std::fpclassify(src0[lane]) == FP_ZERO) {
29982  if (std::signbit(src0[lane]) &&
29983  std::signbit(src1[lane])) {
29984  vdst[lane] = -0.0;
29985  } else {
29986  vdst[lane] = 0.0;
29987  }
29988  } else {
29989  vdst[lane] = src0[lane];
29990  }
29991  } else {
29992  vdst[lane] = src0[lane] + src1[lane];
29993  }
29994  }
29995  }
29996 
29997  vdst.write();
29998  }
29999 
30001  : Inst_VOP3(iFmt, "v_mul_f64", false)
30002  {
30003  setFlag(ALU);
30004  setFlag(F64);
30005  } // Inst_VOP3__V_MUL_F64
30006 
30008  {
30009  } // ~Inst_VOP3__V_MUL_F64
30010 
30011  // D.d = S0.d * S1.d.
30012  void
30014  {
30015  Wavefront *wf = gpuDynInst->wavefront();
30016  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
30017  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
30018  VecOperandF64 vdst(gpuDynInst, instData.VDST);
30019 
30020  src0.readSrc();
30021  src1.readSrc();
30022 
30023  if (instData.ABS & 0x1) {
30024  src0.absModifier();
30025  }
30026 
30027  if (instData.ABS & 0x2) {
30028  src1.absModifier();
30029  }
30030 
30031  if (extData.NEG & 0x1) {
30032  src0.negModifier();
30033  }
30034 
30035  if (extData.NEG & 0x2) {
30036  src1.negModifier();
30037  }
30038 
30042  assert(!(instData.ABS & 0x4));
30043  assert(!(extData.NEG & 0x4));
30044 
30045  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30046  if (wf->execMask(lane)) {
30047  if (std::isnan(src0[lane]) ||
30048  std::isnan(src1[lane])) {
30049  vdst[lane] = NAN;
30050  } else if ((std::fpclassify(src0[lane]) == FP_SUBNORMAL ||
30051  std::fpclassify(src0[lane]) == FP_ZERO) &&
30052  !std::signbit(src0[lane])) {
30053  if (std::isinf(src1[lane])) {
30054  vdst[lane] = NAN;
30055  } else if (!std::signbit(src1[lane])) {
30056  vdst[lane] = +0.0;
30057  } else {
30058  vdst[lane] = -0.0;
30059  }
30060  } else if ((std::fpclassify(src0[lane]) == FP_SUBNORMAL ||
30061  std::fpclassify(src0[lane]) == FP_ZERO) &&
30062  std::signbit(src0[lane])) {
30063  if (std::isinf(src1[lane])) {
30064  vdst[lane] = NAN;
30065  } else if (std::signbit(src1[lane])) {
30066  vdst[lane] = +0.0;
30067  } else {
30068  vdst[lane] = -0.0;
30069  }
30070  } else if (std::isinf(src0[lane]) &&
30071  !std::signbit(src0[lane])) {
30072  if (std::fpclassify(src1[lane]) == FP_SUBNORMAL ||
30073  std::fpclassify(src1[lane]) == FP_ZERO) {
30074  vdst[lane] = NAN;
30075  } else if (!std::signbit(src1[lane])) {
30076  vdst[lane] = +INFINITY;
30077  } else {
30078  vdst[lane] = -INFINITY;
30079  }
30080  } else if (std::isinf(src0[lane]) &&
30081  std::signbit(src0[lane])) {
30082  if (std::fpclassify(src1[lane]) == FP_SUBNORMAL ||
30083  std::fpclassify(src1[lane]) == FP_ZERO) {
30084  vdst[lane] = NAN;
30085  } else if (std::signbit(src1[lane])) {
30086  vdst[lane] = +INFINITY;
30087  } else {
30088  vdst[lane] = -INFINITY;
30089  }
30090  } else {
30091  vdst[lane] = src0[lane] * src1[lane];
30092  }
30093  }
30094  }
30095 
30096  vdst.write();
30097  }
30098 
30100  : Inst_VOP3(iFmt, "v_min_f64", false)
30101  {
30102  setFlag(ALU);
30103  setFlag(F64);
30104  } // Inst_VOP3__V_MIN_F64
30105 
30107  {
30108  } // ~Inst_VOP3__V_MIN_F64
30109 
30110  // D.d = min(S0.d, S1.d).
30111  void
30113  {
30114  Wavefront *wf = gpuDynInst->wavefront();
30115  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
30116  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
30117  VecOperandF64 vdst(gpuDynInst, instData.VDST);
30118 
30119  src0.readSrc();
30120  src1.readSrc();
30121 
30122  if (instData.ABS & 0x1) {
30123  src0.absModifier();
30124  }
30125 
30126  if (instData.ABS & 0x2) {
30127  src1.absModifier();
30128  }
30129 
30130  if (extData.NEG & 0x1) {
30131  src0.negModifier();
30132  }
30133 
30134  if (extData.NEG & 0x2) {
30135  src1.negModifier();
30136  }
30137 
30141  assert(!(instData.ABS & 0x4));
30142  assert(!(extData.NEG & 0x4));
30143 
30144  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30145  if (wf->execMask(lane)) {
30146  vdst[lane] = std::fmin(src0[lane], src1[lane]);
30147  }
30148  }
30149 
30150  vdst.write();
30151  }
30152 
30154  : Inst_VOP3(iFmt, "v_max_f64", false)
30155  {
30156  setFlag(ALU);
30157  setFlag(F64);
30158  } // Inst_VOP3__V_MAX_F64
30159 
30161  {
30162  } // ~Inst_VOP3__V_MAX_F64
30163 
30164  // D.d = max(S0.d, S1.d).
30165  void
30167  {
30168  Wavefront *wf = gpuDynInst->wavefront();
30169  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
30170  ConstVecOperandF64 src1(gpuDynInst, extData.SRC1);
30171  VecOperandF64 vdst(gpuDynInst, instData.VDST);
30172 
30173  src0.readSrc();
30174  src1.readSrc();
30175 
30176  if (instData.ABS & 0x1) {
30177  src0.absModifier();
30178  }
30179 
30180  if (instData.ABS & 0x2) {
30181  src1.absModifier();
30182  }
30183 
30184  if (extData.NEG & 0x1) {
30185  src0.negModifier();
30186  }
30187 
30188  if (extData.NEG & 0x2) {
30189  src1.negModifier();
30190  }
30191 
30195  assert(!(instData.ABS & 0x4));
30196  assert(!(extData.NEG & 0x4));
30197 
30198  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30199  if (wf->execMask(lane)) {
30200  vdst[lane] = std::fmax(src0[lane], src1[lane]);
30201  }
30202  }
30203 
30204  vdst.write();
30205  }
30206 
30208  : Inst_VOP3(iFmt, "v_ldexp_f64", false)
30209  {
30210  setFlag(ALU);
30211  setFlag(F64);
30212  } // Inst_VOP3__V_LDEXP_F64
30213 
30215  {
30216  } // ~Inst_VOP3__V_LDEXP_F64
30217 
30218  // D.d = pow(S0.d, S1.i[31:0]).
30219  void
30221  {
30222  Wavefront *wf = gpuDynInst->wavefront();
30223  ConstVecOperandF64 src0(gpuDynInst, extData.SRC0);
30224  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
30225  VecOperandF64 vdst(gpuDynInst, instData.VDST);
30226 
30227  src0.readSrc();
30228  src1.readSrc();
30229 
30230  if (instData.ABS & 0x1) {
30231  src0.absModifier();
30232  }
30233 
30234  if (extData.NEG & 0x1) {
30235  src0.negModifier();
30236  }
30237 
30241  assert(!(instData.ABS & 0x2));
30242  assert(!(instData.ABS & 0x4));
30243  assert(!(extData.NEG & 0x2));
30244  assert(!(extData.NEG & 0x4));
30245 
30246  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30247  if (wf->execMask(lane)) {
30248  if (std::isnan(src0[lane]) || std::isinf(src0[lane])) {
30249  vdst[lane] = src0[lane];
30250  } else if (std::fpclassify(src0[lane]) == FP_SUBNORMAL
30251  || std::fpclassify(src0[lane]) == FP_ZERO) {
30252  if (std::signbit(src0[lane])) {
30253  vdst[lane] = -0.0;
30254  } else {
30255  vdst[lane] = +0.0;
30256  }
30257  } else {
30258  vdst[lane] = std::ldexp(src0[lane], src1[lane]);
30259  }
30260  }
30261  }
30262 
30263  vdst.write();
30264  }
30265 
30267  : Inst_VOP3(iFmt, "v_mul_lo_u32", false)
30268  {
30269  setFlag(ALU);
30270  } // Inst_VOP3__V_MUL_LO_U32
30271 
30273  {
30274  } // ~Inst_VOP3__V_MUL_LO_U32
30275 
30276  // D.u = S0.u * S1.u.
30277  void
30279  {
30280  Wavefront *wf = gpuDynInst->wavefront();
30281  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
30282  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
30283  VecOperandU32 vdst(gpuDynInst, instData.VDST);
30284 
30285  src0.readSrc();
30286  src1.readSrc();
30287 
30291  assert(!(instData.ABS & 0x1));
30292  assert(!(instData.ABS & 0x2));
30293  assert(!(instData.ABS & 0x4));
30294  assert(!(extData.NEG & 0x1));
30295  assert(!(extData.NEG & 0x2));
30296  assert(!(extData.NEG & 0x4));
30297 
30298  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30299  if (wf->execMask(lane)) {
30300  VecElemI64 s0 = (VecElemI64)src0[lane];
30301  VecElemI64 s1 = (VecElemI64)src1[lane];
30302  vdst[lane] = (VecElemU32)((s0 * s1) & 0xffffffffLL);
30303  }
30304  }
30305 
30306  vdst.write();
30307  }
30308 
30310  : Inst_VOP3(iFmt, "v_mul_hi_u32", false)
30311  {
30312  setFlag(ALU);
30313  } // Inst_VOP3__V_MUL_HI_U32
30314 
30316  {
30317  } // ~Inst_VOP3__V_MUL_HI_U32
30318 
30319  // D.u = (S0.u * S1.u) >> 32.
30320  void
30322  {
30323  Wavefront *wf = gpuDynInst->wavefront();
30324  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
30325  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
30326  VecOperandU32 vdst(gpuDynInst, instData.VDST);
30327 
30328  src0.readSrc();
30329  src1.readSrc();
30330 
30334  assert(!(instData.ABS & 0x1));
30335  assert(!(instData.ABS & 0x2));
30336  assert(!(instData.ABS & 0x4));
30337  assert(!(extData.NEG & 0x1));
30338  assert(!(extData.NEG & 0x2));
30339  assert(!(extData.NEG & 0x4));
30340 
30341  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30342  if (wf->execMask(lane)) {
30343  VecElemI64 s0 = (VecElemI64)src0[lane];
30344  VecElemI64 s1 = (VecElemI64)src1[lane];
30345  vdst[lane]
30346  = (VecElemU32)(((s0 * s1) >> 32) & 0xffffffffLL);
30347  }
30348  }
30349 
30350  vdst.write();
30351  }
30352 
30354  : Inst_VOP3(iFmt, "v_mul_hi_i32", false)
30355  {
30356  setFlag(ALU);
30357  } // Inst_VOP3__V_MUL_HI_I32
30358 
30360  {
30361  } // ~Inst_VOP3__V_MUL_HI_I32
30362 
30363  // D.i = (S0.i * S1.i) >> 32.
30364  void
30366  {
30367  Wavefront *wf = gpuDynInst->wavefront();
30368  ConstVecOperandI32 src0(gpuDynInst, extData.SRC0);
30369  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
30370  VecOperandI32 vdst(gpuDynInst, instData.VDST);
30371 
30372  src0.readSrc();
30373  src1.readSrc();
30374 
30378  assert(!(instData.ABS & 0x1));
30379  assert(!(instData.ABS & 0x2));
30380  assert(!(instData.ABS & 0x4));
30381  assert(!(extData.NEG & 0x1));
30382  assert(!(extData.NEG & 0x2));
30383  assert(!(extData.NEG & 0x4));
30384 
30385  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30386  if (wf->execMask(lane)) {
30387  VecElemI64 s0 = (VecElemI64)src0[lane];
30388  VecElemI64 s1 = (VecElemI64)src1[lane];
30389  vdst[lane]
30390  = (VecElemI32)(((s0 * s1) >> 32LL) & 0xffffffffLL);
30391  }
30392  }
30393 
30394  vdst.write();
30395  }
30396 
30398  : Inst_VOP3(iFmt, "v_ldexp_f32", false)
30399  {
30400  setFlag(ALU);
30401  setFlag(F32);
30402  } // Inst_VOP3__V_LDEXP_F32
30403 
30405  {
30406  } // ~Inst_VOP3__V_LDEXP_F32
30407 
30408  // D.f = pow(S0.f, S1.i)
30409  void
30411  {
30412  Wavefront *wf = gpuDynInst->wavefront();
30413  ConstVecOperandF32 src0(gpuDynInst, extData.SRC0);
30414  ConstVecOperandI32 src1(gpuDynInst, extData.SRC1);
30415  VecOperandF32 vdst(gpuDynInst, instData.VDST);
30416 
30417  src0.readSrc();
30418  src1.readSrc();
30419 
30423  assert(!(instData.ABS & 0x2));
30424  assert(!(instData.ABS & 0x4));
30425  assert(!(extData.NEG & 0x2));
30426  assert(!(extData.NEG & 0x4));
30427 
30428  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30429  if (wf->execMask(lane)) {
30430  vdst[lane] = std::ldexp(src0[lane], src1[lane]);
30431  }
30432  }
30433 
30434  vdst.write();
30435  }
30436 
30438  : Inst_VOP3(iFmt, "v_readlane_b32", true)
30439  {
30440  setFlag(ALU);
30441  setFlag(IgnoreExec);
30442  } // Inst_VOP3__V_READLANE_B32
30443 
30445  {
30446  } // ~Inst_VOP3__V_READLANE_B32
30447 
30448  // Copy one VGPR value to one SGPR. D = SGPR-dest, S0 = Source Data (VGPR#
30449  // or M0(lds-direct)), S1 = Lane Select (SGPR or M0). Ignores exec mask.
30450  // Input and output modifiers not supported; this is an untyped operation.
30451  void
30453  {
30454  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
30455  ConstScalarOperandU32 src1(gpuDynInst, extData.SRC1);
30456  ScalarOperandU32 sdst(gpuDynInst, instData.VDST);
30457 
30458  src0.readSrc();
30459  src1.read();
30460 
30464  assert(!(instData.ABS & 0x1));
30465  assert(!(instData.ABS & 0x2));
30466  assert(!(instData.ABS & 0x4));
30467  assert(!(extData.NEG & 0x1));
30468  assert(!(extData.NEG & 0x2));
30469  assert(!(extData.NEG & 0x4));
30470 
30471  sdst = src0[src1.rawData() & 0x3f];
30472 
30473  sdst.write();
30474  }
30475 
30477  : Inst_VOP3(iFmt, "v_writelane_b32", false)
30478  {
30479  setFlag(ALU);
30480  setFlag(IgnoreExec);
30481  } // Inst_VOP3__V_WRITELANE_B32
30482 
30484  {
30485  } // ~Inst_VOP3__V_WRITELANE_B32
30486 
30487  // Write value into one VGPR in one lane. D = VGPR-dest, S0 = Source Data
30488  // (sgpr, m0, exec or constants), S1 = Lane Select (SGPR or M0). Ignores
30489  // exec mask. Input and output modifiers not supported; this is an untyped
30490  // operation.
30491  void
30493  {
30494  ConstScalarOperandU32 src0(gpuDynInst, extData.SRC0);
30495  ConstScalarOperandU32 src1(gpuDynInst, extData.SRC1);
30496  VecOperandU32 vdst(gpuDynInst, instData.VDST);
30497 
30498  src0.read();
30499  src1.read();
30500  vdst.read();
30501 
30505  assert(!(instData.ABS & 0x1));
30506  assert(!(instData.ABS & 0x2));
30507  assert(!(instData.ABS & 0x4));
30508  assert(!(extData.NEG & 0x1));
30509  assert(!(extData.NEG & 0x2));
30510  assert(!(extData.NEG & 0x4));
30511 
30512  vdst[src1.rawData() & 0x3f] = src0.rawData();
30513 
30514  vdst.write();
30515  }
30516 
30518  : Inst_VOP3(iFmt, "v_bcnt_u32_b32", false)
30519  {
30520  setFlag(ALU);
30521  } // Inst_VOP3__V_BCNT_U32_B32
30522 
30524  {
30525  } // ~Inst_VOP3__V_BCNT_U32_B32
30526 
30527  // D.u = CountOneBits(S0.u) + S1.u. Bit count.
30528  void
30530  {
30531  Wavefront *wf = gpuDynInst->wavefront();
30532  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
30533  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
30534  VecOperandU32 vdst(gpuDynInst, instData.VDST);
30535 
30536  src0.readSrc();
30537  src1.readSrc();
30538 
30542  assert(!(instData.ABS & 0x1));
30543  assert(!(instData.ABS & 0x2));
30544  assert(!(instData.ABS & 0x4));
30545  assert(!(extData.NEG & 0x1));
30546  assert(!(extData.NEG & 0x2));
30547  assert(!(extData.NEG & 0x4));
30548 
30549  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30550  if (wf->execMask(lane)) {
30551  vdst[lane] = popCount(src0[lane]) + src1[lane];
30552  }
30553  }
30554 
30555  vdst.write();
30556  }
30557 
30559  InFmt_VOP3 *iFmt)
30560  : Inst_VOP3(iFmt, "v_mbcnt_lo_u32_b32", false)
30561  {
30562  setFlag(ALU);
30563  } // Inst_VOP3__V_MBCNT_LO_U32_B32
30564 
30566  {
30567  } // ~Inst_VOP3__V_MBCNT_LO_U32_B32
30568 
30569  // Masked bit count, ThreadPosition is the position of this thread in the
30570  // wavefront (in 0..63).
30571  void
30573  {
30574  Wavefront *wf = gpuDynInst->wavefront();
30575  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
30576  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
30577  VecOperandU32 vdst(gpuDynInst, instData.VDST);
30578  uint64_t threadMask = 0;
30579 
30580  src0.readSrc();
30581  src1.readSrc();
30582 
30586  assert(!(instData.ABS & 0x1));
30587  assert(!(instData.ABS & 0x2));
30588  assert(!(instData.ABS & 0x4));
30589  assert(!(extData.NEG & 0x1));
30590  assert(!(extData.NEG & 0x2));
30591  assert(!(extData.NEG & 0x4));
30592 
30593  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30594  if (wf->execMask(lane)) {
30595  threadMask = ((1LL << lane) - 1LL);
30596  vdst[lane] = popCount(src0[lane] & bits(threadMask, 31, 0)) +
30597  src1[lane];
30598  }
30599  }
30600 
30601  vdst.write();
30602  } // execute
30603  // --- Inst_VOP3__V_MBCNT_HI_U32_B32 class methods ---
30604 
30606  InFmt_VOP3 *iFmt)
30607  : Inst_VOP3(iFmt, "v_mbcnt_hi_u32_b32", false)
30608  {
30609  setFlag(ALU);
30610  } // Inst_VOP3__V_MBCNT_HI_U32_B32
30611 
30613  {
30614  } // ~Inst_VOP3__V_MBCNT_HI_U32_B32
30615 
30616  // ThreadMask = (1 << ThreadPosition) - 1;
30617  // D.u = CountOneBits(S0.u & ThreadMask[63:32]) + S1.u.
30618  // Masked bit count, ThreadPosition is the position of this thread in the
30619  // wavefront (in 0..63).
30620  void
30622  {
30623  Wavefront *wf = gpuDynInst->wavefront();
30624  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
30625  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
30626  VecOperandU32 vdst(gpuDynInst, instData.VDST);
30627  uint64_t threadMask = 0;
30628 
30629  src0.readSrc();
30630  src1.readSrc();
30631 
30635  assert(!(instData.ABS & 0x1));
30636  assert(!(instData.ABS & 0x2));
30637  assert(!(instData.ABS & 0x4));
30638  assert(!(extData.NEG & 0x1));
30639  assert(!(extData.NEG & 0x2));
30640  assert(!(extData.NEG & 0x4));
30641 
30642  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30643  if (wf->execMask(lane)) {
30644  threadMask = ((1LL << lane) - 1LL);
30645  vdst[lane] = popCount(src0[lane] & bits(threadMask, 63, 32)) +
30646  src1[lane];
30647  }
30648  }
30649 
30650  vdst.write();
30651  } // execute
30652  // --- Inst_VOP3__V_LSHLREV_B64 class methods ---
30653 
30655  : Inst_VOP3(iFmt, "v_lshlrev_b64", false)
30656  {
30657  setFlag(ALU);
30658  } // Inst_VOP3__V_LSHLREV_B64
30659 
30661  {
30662  } // ~Inst_VOP3__V_LSHLREV_B64
30663 
30664  // D.u64 = S1.u64 << S0.u[5:0].
30665  void
30667  {
30668  Wavefront *wf = gpuDynInst->wavefront();
30669  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
30670  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
30671  VecOperandU64 vdst(gpuDynInst, instData.VDST);
30672 
30673  src0.readSrc();
30674  src1.readSrc();
30675 
30679  assert(!(instData.ABS & 0x1));
30680  assert(!(instData.ABS & 0x2));
30681  assert(!(instData.ABS & 0x4));
30682  assert(!(extData.NEG & 0x1));
30683  assert(!(extData.NEG & 0x2));
30684  assert(!(extData.NEG & 0x4));
30685 
30686  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30687  if (wf->execMask(lane)) {
30688  vdst[lane] = src1[lane] << bits(src0[lane], 5, 0);
30689  }
30690  }
30691 
30692  vdst.write();
30693  }
30694 
30696  : Inst_VOP3(iFmt, "v_lshrrev_b64", false)
30697  {
30698  setFlag(ALU);
30699  } // Inst_VOP3__V_LSHRREV_B64
30700 
30702  {
30703  } // ~Inst_VOP3__V_LSHRREV_B64
30704 
30705  // D.u64 = S1.u64 >> S0.u[5:0].
30706  // The vacated bits are set to zero.
30707  void
30709  {
30710  Wavefront *wf = gpuDynInst->wavefront();
30711  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
30712  ConstVecOperandU64 src1(gpuDynInst, extData.SRC1);
30713  VecOperandU64 vdst(gpuDynInst, instData.VDST);
30714 
30715  src0.readSrc();
30716  src1.readSrc();
30717 
30721  assert(!(instData.ABS & 0x1));
30722  assert(!(instData.ABS & 0x2));
30723  assert(!(instData.ABS & 0x4));
30724  assert(!(extData.NEG & 0x1));
30725  assert(!(extData.NEG & 0x2));
30726  assert(!(extData.NEG & 0x4));
30727 
30728  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30729  if (wf->execMask(lane)) {
30730  vdst[lane] = src1[lane] >> bits(src0[lane], 5, 0);
30731  }
30732  }
30733 
30734  vdst.write();
30735  }
30736 
30738  : Inst_VOP3(iFmt, "v_ashrrev_i64", false)
30739  {
30740  setFlag(ALU);
30741  } // Inst_VOP3__V_ASHRREV_I64
30742 
30744  {
30745  } // ~Inst_VOP3__V_ASHRREV_I64
30746 
30747  // D.u64 = signext(S1.u64) >> S0.u[5:0].
30748  // The vacated bits are set to the sign bit of the input value.
30749  void
30751  {
30752  Wavefront *wf = gpuDynInst->wavefront();
30753  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
30754  ConstVecOperandI64 src1(gpuDynInst, extData.SRC1);
30755  VecOperandU64 vdst(gpuDynInst, instData.VDST);
30756 
30757  src0.readSrc();
30758  src1.readSrc();
30759 
30763  assert(!(instData.ABS & 0x1));
30764  assert(!(instData.ABS & 0x2));
30765  assert(!(instData.ABS & 0x4));
30766  assert(!(extData.NEG & 0x1));
30767  assert(!(extData.NEG & 0x2));
30768  assert(!(extData.NEG & 0x4));
30769 
30770  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30771  if (wf->execMask(lane)) {
30772  vdst[lane]
30773  = src1[lane] >> bits(src0[lane], 5, 0);
30774  }
30775  }
30776 
30777  vdst.write();
30778  }
30779 
30781  : Inst_VOP3(iFmt, "v_trig_preop_f64", false)
30782  {
30783  setFlag(ALU);
30784  setFlag(F64);
30785  } // Inst_VOP3__V_TRIG_PREOP_F64
30786 
30788  {
30789  } // ~Inst_VOP3__V_TRIG_PREOP_F64
30790 
30791  void
30793  {
30795  }
30796 
30798  : Inst_VOP3(iFmt, "v_bfm_b32", false)
30799  {
30800  setFlag(ALU);
30801  } // Inst_VOP3__V_BFM_B32
30802 
30804  {
30805  } // ~Inst_VOP3__V_BFM_B32
30806 
30807  // D.u = ((1 << S0.u[4:0]) - 1) << S1.u[4:0];
30808  void
30810  {
30811  Wavefront *wf = gpuDynInst->wavefront();
30812  ConstVecOperandU32 src0(gpuDynInst, extData.SRC0);
30813  ConstVecOperandU32 src1(gpuDynInst, extData.SRC1);
30814  VecOperandU32 vdst(gpuDynInst, instData.VDST);
30815 
30816  src0.readSrc();
30817  src1.readSrc();
30818 
30822  assert(!(instData.ABS & 0x1));
30823  assert(!(instData.ABS & 0x2));
30824  assert(!(instData.ABS & 0x4));
30825  assert(!(extData.NEG & 0x1));
30826  assert(!(extData.NEG & 0x2));
30827  assert(!(extData.NEG & 0x4));
30828 
30829  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
30830  if (wf->execMask(lane)) {
30831  vdst[lane] = ((1 << bits(src0[lane], 4, 0)) - 1)
30832  << bits(src1[lane], 4, 0);
30833  }
30834  }
30835 
30836  vdst.write();
30837  }
30838 
30840  InFmt_VOP3 *iFmt)
30841  : Inst_VOP3(iFmt, "v_cvt_pknorm_i16_f32", false)
30842  {
30843  setFlag(ALU);
30844  setFlag(F32);
30845  } // Inst_VOP3__V_CVT_PKNORM_I16_F32
30846 
30848  {
30849  } // ~Inst_VOP3__V_CVT_PKNORM_I16_F32
30850 
30851  // D = {(snorm)S1.f, (snorm)S0.f}.
30852  void
30854  {
30856  }
30857 
30859  InFmt_VOP3 *iFmt)
30860  : Inst_VOP3(iFmt, "v_cvt_pknorm_u16_f32", false)
30861  {
30862  setFlag(ALU);
30863  setFlag(F32);
30864  } // Inst_VOP3__V_CVT_PKNORM_U16_F32
30865 
30867  {
30868  } // ~Inst_VOP3__V_CVT_PKNORM_U16_F32
30869 
30870  // D = {(unorm)S1.f, (unorm)S0.f}.
30871  void
30873  {
30875  }
30876 
30878  InFmt_VOP3 *iFmt)
30879  : Inst_VOP3(iFmt, "v_cvt_pkrtz_f16_f32", false)
30880  {
30881  setFlag(ALU);
30882  setFlag(F32);
30883  } // Inst_VOP3__V_CVT_PKRTZ_F16_F32
30884 
30886  {
30887  } // ~Inst_VOP3__V_CVT_PKRTZ_F16_F32
30888 
30889  void
30891  {
30893  }
30894 
30896  : Inst_VOP3(iFmt, "v_cvt_pk_u16_u32", false)
30897  {
30898  setFlag(ALU);
30899  } // Inst_VOP3__V_CVT_PK_U16_U32
30900 
30902  {
30903  } // ~Inst_VOP3__V_CVT_PK_U16_U32
30904 
30905  // D = {uint32_to_uint16(S1.u), uint32_to_uint16(S0.u)}.
30906  void
30908  {
30910  }
30911 
30913  : Inst_VOP3(iFmt, "v_cvt_pk_i16_i32", false)
30914  {
30915  setFlag(ALU);
30916  } // Inst_VOP3__V_CVT_PK_I16_I32
30917 
30919  {
30920  } // ~Inst_VOP3__V_CVT_PK_I16_I32
30921 
30922  // D = {int32_to_int16(S1.i), int32_to_int16(S0.i)}.
30923  void
30925  {
30927  }
30928 
30930  : Inst_DS(iFmt, "ds_add_u32")
30931  {
30932  } // Inst_DS__DS_ADD_U32
30933 
30935  {
30936  } // ~Inst_DS__DS_ADD_U32
30937 
30938  // tmp = MEM[ADDR];
30939  // MEM[ADDR] += DATA;
30940  // RETURN_DATA = tmp.
30941  void
30943  {
30945  }
30946 
30948  : Inst_DS(iFmt, "ds_sub_u32")
30949  {
30950  } // Inst_DS__DS_SUB_U32
30951 
30953  {
30954  } // ~Inst_DS__DS_SUB_U32
30955 
30956  // tmp = MEM[ADDR];
30957  // MEM[ADDR] -= DATA;
30958  // RETURN_DATA = tmp.
30959  void
30961  {
30963  }
30964 
30966  : Inst_DS(iFmt, "ds_rsub_u32")
30967  {
30968  } // Inst_DS__DS_RSUB_U32
30969 
30971  {
30972  } // ~Inst_DS__DS_RSUB_U32
30973 
30974  // tmp = MEM[ADDR];
30975  // MEM[ADDR] = DATA - MEM[ADDR];
30976  // RETURN_DATA = tmp.
30977  // Subtraction with reversed operands.
30978  void
30980  {
30982  }
30983 
30985  : Inst_DS(iFmt, "ds_inc_u32")
30986  {
30987  } // Inst_DS__DS_INC_U32
30988 
30990  {
30991  } // ~Inst_DS__DS_INC_U32
30992 
30993  // tmp = MEM[ADDR];
30994  // MEM[ADDR] = (tmp >= DATA) ? 0 : tmp + 1 (unsigned compare);
30995  // RETURN_DATA = tmp.
30996  void
30998  {
31000  }
31001 
31003  : Inst_DS(iFmt, "ds_dec_u32")
31004  {
31005  } // Inst_DS__DS_DEC_U32
31006 
31008  {
31009  } // ~Inst_DS__DS_DEC_U32
31010 
31011  // tmp = MEM[ADDR];
31012  // MEM[ADDR] = (tmp == 0 || tmp > DATA) ? DATA : tmp - 1
31013  // (unsigned compare); RETURN_DATA = tmp.
31014  void
31016  {
31018  }
31019 
31021  : Inst_DS(iFmt, "ds_min_i32")
31022  {
31023  } // Inst_DS__DS_MIN_I32
31024 
31026  {
31027  } // ~Inst_DS__DS_MIN_I32
31028 
31029  // tmp = MEM[ADDR];
31030  // MEM[ADDR] = (DATA < tmp) ? DATA : tmp (signed compare);
31031  // RETURN_DATA = tmp.
31032  void
31034  {
31036  }
31037 
31039  : Inst_DS(iFmt, "ds_max_i32")
31040  {
31041  } // Inst_DS__DS_MAX_I32
31042 
31044  {
31045  } // ~Inst_DS__DS_MAX_I32
31046 
31047  // tmp = MEM[ADDR];
31048  // MEM[ADDR] = (DATA > tmp) ? DATA : tmp (signed compare);
31049  // RETURN_DATA = tmp.
31050  void
31052  {
31054  }
31055 
31057  : Inst_DS(iFmt, "ds_min_u32")
31058  {
31059  } // Inst_DS__DS_MIN_U32
31060 
31062  {
31063  } // ~Inst_DS__DS_MIN_U32
31064 
31065  // tmp = MEM[ADDR];
31066  // MEM[ADDR] = (DATA < tmp) ? DATA : tmp (unsigned compare);
31067  // RETURN_DATA = tmp.
31068  void
31070  {
31072  }
31073 
31075  : Inst_DS(iFmt, "ds_max_u32")
31076  {
31077  } // Inst_DS__DS_MAX_U32
31078 
31080  {
31081  } // ~Inst_DS__DS_MAX_U32
31082 
31083  // tmp = MEM[ADDR];
31084  // MEM[ADDR] = (DATA > tmp) ? DATA : tmp (unsigned compare);
31085  // RETURN_DATA = tmp.
31086  void
31088  {
31090  }
31091 
31093  : Inst_DS(iFmt, "ds_and_b32")
31094  {
31095  } // Inst_DS__DS_AND_B32
31096 
31098  {
31099  } // ~Inst_DS__DS_AND_B32
31100 
31101  // tmp = MEM[ADDR];
31102  // MEM[ADDR] &= DATA;
31103  // RETURN_DATA = tmp.
31104  void
31106  {
31108  }
31109 
31111  : Inst_DS(iFmt, "ds_or_b32")
31112  {
31113  } // Inst_DS__DS_OR_B32
31114 
31116  {
31117  } // ~Inst_DS__DS_OR_B32
31118 
31119  // tmp = MEM[ADDR];
31120  // MEM[ADDR] |= DATA;
31121  // RETURN_DATA = tmp.
31122  void
31124  {
31126  }
31127 
31129  : Inst_DS(iFmt, "ds_xor_b32")
31130  {
31131  } // Inst_DS__DS_XOR_B32
31132 
31134  {
31135  } // ~Inst_DS__DS_XOR_B32
31136 
31137  // tmp = MEM[ADDR];
31138  // MEM[ADDR] ^= DATA;
31139  // RETURN_DATA = tmp.
31140  void
31142  {
31144  }
31145 
31147  : Inst_DS(iFmt, "ds_mskor_b32")
31148  {
31149  } // Inst_DS__DS_MSKOR_B32
31150 
31152  {
31153  } // ~Inst_DS__DS_MSKOR_B32
31154 
31155  // tmp = MEM[ADDR];
31156  // MEM[ADDR] = (MEM_ADDR[ADDR] & ~DATA) | DATA2;
31157  // RETURN_DATA = tmp.
31158  void
31160  {
31162  }
31163 
31165  : Inst_DS(iFmt, "ds_write_b32")
31166  {
31167  setFlag(MemoryRef);
31168  setFlag(Store);
31169  } // Inst_DS__DS_WRITE_B32
31170 
31172  {
31173  } // ~Inst_DS__DS_WRITE_B32
31174 
31175  // MEM[ADDR] = DATA.
31176  // Write dword.
31177  void
31179  {
31180  Wavefront *wf = gpuDynInst->wavefront();
31181  gpuDynInst->execUnitId = wf->execUnitId;
31182  gpuDynInst->latency.init(gpuDynInst->computeUnit());
31183  gpuDynInst->latency.set(
31184  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
31185  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
31186  ConstVecOperandU32 data(gpuDynInst, extData.DATA0);
31187 
31188  addr.read();
31189  data.read();
31190 
31191  calcAddr(gpuDynInst, addr);
31192 
31193  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
31194  if (wf->execMask(lane)) {
31195  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane]
31196  = data[lane];
31197  }
31198  }
31199 
31200  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
31201  }
31202 
31203  void
31205  {
31206  Addr offset0 = instData.OFFSET0;
31207  Addr offset1 = instData.OFFSET1;
31208  Addr offset = (offset1 << 8) | offset0;
31209 
31210  initMemWrite<VecElemU32>(gpuDynInst, offset);
31211  } // initiateAcc
31212 
31213  void
31215  {
31216  } // completeAcc
31217 
31219  : Inst_DS(iFmt, "ds_write2_b32")
31220  {
31221  setFlag(MemoryRef);
31222  setFlag(Store);
31223  } // Inst_DS__DS_WRITE2_B32
31224 
31226  {
31227  } // ~Inst_DS__DS_WRITE2_B32
31228 
31229  // MEM[ADDR_BASE + OFFSET0 * 4] = DATA;
31230  // MEM[ADDR_BASE + OFFSET1 * 4] = DATA2.
31231  // Write 2 dwords.
31232  void
31234  {
31235  Wavefront *wf = gpuDynInst->wavefront();
31236  gpuDynInst->execUnitId = wf->execUnitId;
31237  gpuDynInst->latency.init(gpuDynInst->computeUnit());
31238  gpuDynInst->latency.set(
31239  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
31240  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
31241  ConstVecOperandU32 data0(gpuDynInst, extData.DATA0);
31242  ConstVecOperandU32 data1(gpuDynInst, extData.DATA1);
31243 
31244  addr.read();
31245  data0.read();
31246  data1.read();
31247 
31248  calcAddr(gpuDynInst, addr);
31249 
31250  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
31251  if (wf->execMask(lane)) {
31252  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane * 2]
31253  = data0[lane];
31254  (reinterpret_cast<VecElemU32*>(
31255  gpuDynInst->d_data))[lane * 2 + 1] = data1[lane];
31256  }
31257  }
31258 
31259  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
31260  }
31261 
31262  void
31264  {
31265  Addr offset0 = instData.OFFSET0 * 4;
31266  Addr offset1 = instData.OFFSET1 * 4;
31267 
31268  initDualMemWrite<VecElemU32>(gpuDynInst, offset0, offset1);
31269  }
31270 
31271  void
31273  {
31274  }
31275 
31277  : Inst_DS(iFmt, "ds_write2st64_b32")
31278  {
31279  setFlag(MemoryRef);
31280  setFlag(Store);
31281  } // Inst_DS__DS_WRITE2ST64_B32
31282 
31284  {
31285  } // ~Inst_DS__DS_WRITE2ST64_B32
31286 
31287  // MEM[ADDR_BASE + OFFSET0 * 4 * 64] = DATA;
31288  // MEM[ADDR_BASE + OFFSET1 * 4 * 64] = DATA2;
31289  // Write 2 dwords.
31290  void
31292  {
31293  Wavefront *wf = gpuDynInst->wavefront();
31294  gpuDynInst->execUnitId = wf->execUnitId;
31295  gpuDynInst->latency.init(gpuDynInst->computeUnit());
31296  gpuDynInst->latency.set(
31297  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
31298  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
31299  ConstVecOperandU32 data0(gpuDynInst, extData.DATA0);
31300  ConstVecOperandU32 data1(gpuDynInst, extData.DATA1);
31301 
31302  addr.read();
31303  data0.read();
31304  data1.read();
31305 
31306  calcAddr(gpuDynInst, addr);
31307 
31308  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
31309  if (wf->execMask(lane)) {
31310  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane * 2]
31311  = data0[lane];
31312  (reinterpret_cast<VecElemU32*>(
31313  gpuDynInst->d_data))[lane * 2 + 1] = data1[lane];
31314  }
31315  }
31316 
31317  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
31318  } // execute
31319 
31320  void
31322  {
31323  Addr offset0 = instData.OFFSET0 * 4 * 64;
31324  Addr offset1 = instData.OFFSET1 * 4 * 64;
31325 
31326  initDualMemWrite<VecElemU32>(gpuDynInst, offset0, offset1);
31327  }
31328 
31329  void
31331  {
31332  }
31333  // --- Inst_DS__DS_CMPST_B32 class methods ---
31334 
31336  : Inst_DS(iFmt, "ds_cmpst_b32")
31337  {
31338  } // Inst_DS__DS_CMPST_B32
31339 
31341  {
31342  } // ~Inst_DS__DS_CMPST_B32
31343 
31344  // tmp = MEM[ADDR];
31345  // src = DATA2;
31346  // cmp = DATA;
31347  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
31348  // RETURN_DATA[0] = tmp.
31349  // Compare and store.
31350  void
31352  {
31354  }
31355 
31357  : Inst_DS(iFmt, "ds_cmpst_f32")
31358  {
31359  setFlag(F32);
31360  } // Inst_DS__DS_CMPST_F32
31361 
31363  {
31364  } // ~Inst_DS__DS_CMPST_F32
31365 
31366  // tmp = MEM[ADDR];
31367  // src = DATA2;
31368  // cmp = DATA;
31369  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
31370  // RETURN_DATA[0] = tmp.
31371  void
31373  {
31375  }
31376 
31378  : Inst_DS(iFmt, "ds_min_f32")
31379  {
31380  setFlag(F32);
31381  } // Inst_DS__DS_MIN_F32
31382 
31384  {
31385  } // ~Inst_DS__DS_MIN_F32
31386 
31387  // tmp = MEM[ADDR];
31388  // src = DATA;
31389  // cmp = DATA2;
31390  // MEM[ADDR] = (cmp < tmp) ? src : tmp.
31391  void
31393  {
31395  }
31396 
31398  : Inst_DS(iFmt, "ds_max_f32")
31399  {
31400  setFlag(F32);
31401  } // Inst_DS__DS_MAX_F32
31402 
31404  {
31405  } // ~Inst_DS__DS_MAX_F32
31406 
31407  // tmp = MEM[ADDR];
31408  // src = DATA;
31409  // cmp = DATA2;
31410  // MEM[ADDR] = (tmp > cmp) ? src : tmp.
31411  void
31413  {
31415  }
31416 
31418  : Inst_DS(iFmt, "ds_nop")
31419  {
31420  setFlag(Nop);
31421  } // Inst_DS__DS_NOP
31422 
31424  {
31425  } // ~Inst_DS__DS_NOP
31426 
31427  // Do nothing.
31428  void
31430  {
31431  }
31432 
31434  : Inst_DS(iFmt, "ds_add_f32")
31435  {
31436  setFlag(F32);
31437  } // Inst_DS__DS_ADD_F32
31438 
31440  {
31441  } // ~Inst_DS__DS_ADD_F32
31442 
31443  // tmp = MEM[ADDR];
31444  // MEM[ADDR] += DATA;
31445  // RETURN_DATA = tmp.
31446  void
31448  {
31450  }
31451 
31453  : Inst_DS(iFmt, "ds_write_b8")
31454  {
31455  setFlag(MemoryRef);
31456  setFlag(Store);
31457  } // Inst_DS__DS_WRITE_B8
31458 
31460  {
31461  } // ~Inst_DS__DS_WRITE_B8
31462 
31463  // MEM[ADDR] = DATA[7:0].
31464  void
31466  {
31467  Wavefront *wf = gpuDynInst->wavefront();
31468  gpuDynInst->execUnitId = wf->execUnitId;
31469  gpuDynInst->latency.init(gpuDynInst->computeUnit());
31470  gpuDynInst->latency.set(
31471  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
31472  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
31473  ConstVecOperandU8 data(gpuDynInst, extData.DATA0);
31474 
31475  addr.read();
31476  data.read();
31477 
31478  calcAddr(gpuDynInst, addr);
31479 
31480  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
31481  if (wf->execMask(lane)) {
31482  (reinterpret_cast<VecElemU8*>(gpuDynInst->d_data))[lane]
31483  = data[lane];
31484  }
31485  }
31486 
31487  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
31488  } // execute
31489 
31490  void
31492  {
31493  Addr offset0 = instData.OFFSET0;
31494  Addr offset1 = instData.OFFSET1;
31495  Addr offset = (offset1 << 8) | offset0;
31496 
31497  initMemWrite<VecElemU8>(gpuDynInst, offset);
31498  } // initiateAcc
31499 
31500  void
31502  {
31503  } // completeAcc
31504  // --- Inst_DS__DS_WRITE_B16 class methods ---
31505 
31507  : Inst_DS(iFmt, "ds_write_b16")
31508  {
31509  setFlag(MemoryRef);
31510  setFlag(Store);
31511  } // Inst_DS__DS_WRITE_B16
31512 
31514  {
31515  } // ~Inst_DS__DS_WRITE_B16
31516 
31517  // MEM[ADDR] = DATA[15:0]
31518  void
31520  {
31521  Wavefront *wf = gpuDynInst->wavefront();
31522  gpuDynInst->execUnitId = wf->execUnitId;
31523  gpuDynInst->latency.init(gpuDynInst->computeUnit());
31524  gpuDynInst->latency.set(
31525  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
31526  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
31527  ConstVecOperandU16 data(gpuDynInst, extData.DATA0);
31528 
31529  addr.read();
31530  data.read();
31531 
31532  calcAddr(gpuDynInst, addr);
31533 
31534  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
31535  if (wf->execMask(lane)) {
31536  (reinterpret_cast<VecElemU16*>(gpuDynInst->d_data))[lane]
31537  = data[lane];
31538  }
31539  }
31540 
31541  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
31542  } // execute
31543 
31544  void
31546  {
31547  Addr offset0 = instData.OFFSET0;
31548  Addr offset1 = instData.OFFSET1;
31549  Addr offset = (offset1 << 8) | offset0;
31550 
31551  initMemWrite<VecElemU16>(gpuDynInst, offset);
31552  } // initiateAcc
31553 
31554  void
31556  {
31557  } // completeAcc
31558  // --- Inst_DS__DS_ADD_RTN_U32 class methods ---
31559 
31561  : Inst_DS(iFmt, "ds_add_rtn_u32")
31562  {
31563  } // Inst_DS__DS_ADD_RTN_U32
31564 
31566  {
31567  } // ~Inst_DS__DS_ADD_RTN_U32
31568 
31569  // tmp = MEM[ADDR];
31570  // MEM[ADDR] += DATA;
31571  // RETURN_DATA = tmp.
31572  void
31574  {
31576  }
31577 
31579  : Inst_DS(iFmt, "ds_sub_rtn_u32")
31580  {
31581  } // Inst_DS__DS_SUB_RTN_U32
31582 
31584  {
31585  } // ~Inst_DS__DS_SUB_RTN_U32
31586 
31587  // tmp = MEM[ADDR];
31588  // MEM[ADDR] -= DATA;
31589  // RETURN_DATA = tmp.
31590  void
31592  {
31594  }
31595 
31597  : Inst_DS(iFmt, "ds_rsub_rtn_u32")
31598  {
31599  } // Inst_DS__DS_RSUB_RTN_U32
31600 
31602  {
31603  } // ~Inst_DS__DS_RSUB_RTN_U32
31604 
31605  // tmp = MEM[ADDR];
31606  // MEM[ADDR] = DATA - MEM[ADDR];
31607  // RETURN_DATA = tmp.
31608  void
31610  {
31612  }
31613 
31615  : Inst_DS(iFmt, "ds_inc_rtn_u32")
31616  {
31617  } // Inst_DS__DS_INC_RTN_U32
31618 
31620  {
31621  } // ~Inst_DS__DS_INC_RTN_U32
31622 
31623  // tmp = MEM[ADDR];
31624  // MEM[ADDR] = (tmp >= DATA) ? 0 : tmp + 1 (unsigned compare);
31625  // RETURN_DATA = tmp.
31626  void
31628  {
31630  }
31631 
31633  : Inst_DS(iFmt, "ds_dec_rtn_u32")
31634  {
31635  } // Inst_DS__DS_DEC_RTN_U32
31636 
31638  {
31639  } // ~Inst_DS__DS_DEC_RTN_U32
31640 
31641  // tmp = MEM[ADDR];
31642  // MEM[ADDR] = (tmp == 0 || tmp > DATA) ? DATA : tmp - 1
31643  // (unsigned compare); RETURN_DATA = tmp.
31644  void
31646  {
31648  }
31649 
31651  : Inst_DS(iFmt, "ds_min_rtn_i32")
31652  {
31653  } // Inst_DS__DS_MIN_RTN_I32
31654 
31656  {
31657  } // ~Inst_DS__DS_MIN_RTN_I32
31658 
31659  // tmp = MEM[ADDR];
31660  // MEM[ADDR] = (DATA < tmp) ? DATA : tmp (signed compare);
31661  // RETURN_DATA = tmp.
31662  void
31664  {
31666  }
31667 
31669  : Inst_DS(iFmt, "ds_max_rtn_i32")
31670  {
31671  } // Inst_DS__DS_MAX_RTN_I32
31672 
31674  {
31675  } // ~Inst_DS__DS_MAX_RTN_I32
31676 
31677  // tmp = MEM[ADDR];
31678  // MEM[ADDR] = (DATA > tmp) ? DATA : tmp (signed compare);
31679  // RETURN_DATA = tmp.
31680  void
31682  {
31684  }
31685 
31687  : Inst_DS(iFmt, "ds_min_rtn_u32")
31688  {
31689  } // Inst_DS__DS_MIN_RTN_U32
31690 
31692  {
31693  } // ~Inst_DS__DS_MIN_RTN_U32
31694 
31695  // tmp = MEM[ADDR];
31696  // MEM[ADDR] = (DATA < tmp) ? DATA : tmp (unsigned compare);
31697  // RETURN_DATA = tmp.
31698  void
31700  {
31702  }
31703 
31705  : Inst_DS(iFmt, "ds_max_rtn_u32")
31706  {
31707  } // Inst_DS__DS_MAX_RTN_U32
31708 
31710  {
31711  } // ~Inst_DS__DS_MAX_RTN_U32
31712 
31713  // tmp = MEM[ADDR];
31714  // MEM[ADDR] = (DATA > tmp) ? DATA : tmp (unsigned compare);
31715  // RETURN_DATA = tmp.
31716  void
31718  {
31720  }
31721 
31723  : Inst_DS(iFmt, "ds_and_rtn_b32")
31724  {
31725  } // Inst_DS__DS_AND_RTN_B32
31726 
31728  {
31729  } // ~Inst_DS__DS_AND_RTN_B32
31730 
31731  // tmp = MEM[ADDR];
31732  // MEM[ADDR] &= DATA;
31733  // RETURN_DATA = tmp.
31734  void
31736  {
31738  }
31739 
31741  : Inst_DS(iFmt, "ds_or_rtn_b32")
31742  {
31743  } // Inst_DS__DS_OR_RTN_B32
31744 
31746  {
31747  } // ~Inst_DS__DS_OR_RTN_B32
31748 
31749  // tmp = MEM[ADDR];
31750  // MEM[ADDR] |= DATA;
31751  // RETURN_DATA = tmp.
31752  void
31754  {
31756  }
31757 
31759  : Inst_DS(iFmt, "ds_xor_rtn_b32")
31760  {
31761  } // Inst_DS__DS_XOR_RTN_B32
31762 
31764  {
31765  } // ~Inst_DS__DS_XOR_RTN_B32
31766 
31767  // tmp = MEM[ADDR];
31768  // MEM[ADDR] ^= DATA;
31769  // RETURN_DATA = tmp.
31770  void
31772  {
31774  }
31775 
31777  : Inst_DS(iFmt, "ds_mskor_rtn_b32")
31778  {
31779  } // Inst_DS__DS_MSKOR_RTN_B32
31780 
31782  {
31783  } // ~Inst_DS__DS_MSKOR_RTN_B32
31784 
31785  // tmp = MEM[ADDR];
31786  // MEM[ADDR] = (MEM_ADDR[ADDR] & ~DATA) | DATA2;
31787  // RETURN_DATA = tmp.
31788  void
31790  {
31792  }
31793 
31795  : Inst_DS(iFmt, "ds_wrxchg_rtn_b32")
31796  {
31797  } // Inst_DS__DS_WRXCHG_RTN_B32
31798 
31800  {
31801  } // ~Inst_DS__DS_WRXCHG_RTN_B32
31802 
31803  // tmp = MEM[ADDR];
31804  // MEM[ADDR] = DATA;
31805  // RETURN_DATA = tmp.
31806  // Write-exchange operation.
31807  void
31809  {
31811  }
31812 
31814  : Inst_DS(iFmt, "ds_wrxchg2_rtn_b32")
31815  {
31816  } // Inst_DS__DS_WRXCHG2_RTN_B32
31817 
31819  {
31820  } // ~Inst_DS__DS_WRXCHG2_RTN_B32
31821 
31822  // Write-exchange 2 separate dwords.
31823  void
31825  {
31827  }
31828 
31830  InFmt_DS *iFmt)
31831  : Inst_DS(iFmt, "ds_wrxchg2st64_rtn_b32")
31832  {
31833  } // Inst_DS__DS_WRXCHG2ST64_RTN_B32
31834 
31836  {
31837  } // ~Inst_DS__DS_WRXCHG2ST64_RTN_B32
31838 
31839  // Write-exchange 2 separate dwords with a stride of 64 dwords.
31840  void
31842  {
31844  }
31845 
31847  : Inst_DS(iFmt, "ds_cmpst_rtn_b32")
31848  {
31849  } // Inst_DS__DS_CMPST_RTN_B32
31850 
31852  {
31853  } // ~Inst_DS__DS_CMPST_RTN_B32
31854 
31855  // tmp = MEM[ADDR];
31856  // src = DATA2;
31857  // cmp = DATA;
31858  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
31859  // RETURN_DATA[0] = tmp.
31860  // Compare and store.
31861  void
31863  {
31865  }
31866 
31868  : Inst_DS(iFmt, "ds_cmpst_rtn_f32")
31869  {
31870  setFlag(F32);
31871  } // Inst_DS__DS_CMPST_RTN_F32
31872 
31874  {
31875  } // ~Inst_DS__DS_CMPST_RTN_F32
31876 
31877  // tmp = MEM[ADDR];
31878  // src = DATA2;
31879  // cmp = DATA;
31880  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
31881  // RETURN_DATA[0] = tmp.
31882  void
31884  {
31886  }
31887 
31889  : Inst_DS(iFmt, "ds_min_rtn_f32")
31890  {
31891  setFlag(F32);
31892  } // Inst_DS__DS_MIN_RTN_F32
31893 
31895  {
31896  } // ~Inst_DS__DS_MIN_RTN_F32
31897 
31898  // tmp = MEM[ADDR];
31899  // src = DATA;
31900  // cmp = DATA2;
31901  // MEM[ADDR] = (cmp < tmp) ? src : tmp.
31902  void
31904  {
31906  }
31907 
31909  : Inst_DS(iFmt, "ds_max_rtn_f32")
31910  {
31911  setFlag(F32);
31912  } // Inst_DS__DS_MAX_RTN_F32
31913 
31915  {
31916  } // ~Inst_DS__DS_MAX_RTN_F32
31917 
31918  // tmp = MEM[ADDR];
31919  // src = DATA;
31920  // cmp = DATA2;
31921  // MEM[ADDR] = (tmp > cmp) ? src : tmp.
31922  void
31924  {
31926  }
31927 
31929  : Inst_DS(iFmt, "ds_wrap_rtn_b32")
31930  {
31931  } // Inst_DS__DS_WRAP_RTN_B32
31932 
31934  {
31935  } // ~Inst_DS__DS_WRAP_RTN_B32
31936 
31937  // tmp = MEM[ADDR];
31938  // MEM[ADDR] = (tmp >= DATA) ? tmp - DATA : tmp + DATA2;
31939  // RETURN_DATA = tmp.
31940  void
31942  {
31944  }
31945 
31947  : Inst_DS(iFmt, "ds_add_rtn_f32")
31948  {
31949  setFlag(F32);
31950  } // Inst_DS__DS_ADD_RTN_F32
31951 
31953  {
31954  } // ~Inst_DS__DS_ADD_RTN_F32
31955 
31956  // tmp = MEM[ADDR];
31957  // MEM[ADDR] += DATA;
31958  // RETURN_DATA = tmp.
31959  void
31961  {
31962  }
31963 
31965  : Inst_DS(iFmt, "ds_read_b32")
31966  {
31967  setFlag(MemoryRef);
31968  setFlag(Load);
31969  } // Inst_DS__DS_READ_B32
31970 
31972  {
31973  } // ~Inst_DS__DS_READ_B32
31974 
31975  // RETURN_DATA = MEM[ADDR].
31976  // Dword read.
31977  void
31979  {
31980  Wavefront *wf = gpuDynInst->wavefront();
31981  gpuDynInst->execUnitId = wf->execUnitId;
31982  gpuDynInst->latency.init(gpuDynInst->computeUnit());
31983  gpuDynInst->latency.set(
31984  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
31985  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
31986 
31987  addr.read();
31988 
31989  calcAddr(gpuDynInst, addr);
31990 
31991  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
31992  }
31993 
31994  void
31996  {
31997  Addr offset0 = instData.OFFSET0;
31998  Addr offset1 = instData.OFFSET1;
31999  Addr offset = (offset1 << 8) | offset0;
32000 
32001  initMemRead<VecElemU32>(gpuDynInst, offset);
32002  } // initiateAcc
32003 
32004  void
32006  {
32007  VecOperandU32 vdst(gpuDynInst, extData.VDST);
32008 
32009  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
32010  if (gpuDynInst->exec_mask[lane]) {
32011  vdst[lane] = (reinterpret_cast<VecElemU32*>(
32012  gpuDynInst->d_data))[lane];
32013  }
32014  }
32015 
32016  vdst.write();
32017  } // completeAcc
32018 
32020  : Inst_DS(iFmt, "ds_read2_b32")
32021  {
32022  setFlag(MemoryRef);
32023  setFlag(Load);
32024  } // Inst_DS__DS_READ2_B32
32025 
32027  {
32028  } // ~Inst_DS__DS_READ2_B32
32029 
32030  // RETURN_DATA[0] = MEM[ADDR_BASE + OFFSET0 * 4];
32031  // RETURN_DATA[1] = MEM[ADDR_BASE + OFFSET1 * 4].
32032  // Read 2 dwords.
32033  void
32035  {
32036  Wavefront *wf = gpuDynInst->wavefront();
32037  gpuDynInst->execUnitId = wf->execUnitId;
32038  gpuDynInst->latency.init(gpuDynInst->computeUnit());
32039  gpuDynInst->latency.set(
32040  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
32041  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
32042 
32043  addr.read();
32044 
32045  calcAddr(gpuDynInst, addr);
32046 
32047  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
32048  }
32049 
32050  void
32052  {
32053  Addr offset0 = instData.OFFSET0 * 4;
32054  Addr offset1 = instData.OFFSET1 * 4;
32055 
32056  initDualMemRead<VecElemU32>(gpuDynInst, offset0, offset1);
32057  } // initiateAcc
32058 
32059  void
32061  {
32062  VecOperandU32 vdst0(gpuDynInst, extData.VDST);
32063  VecOperandU32 vdst1(gpuDynInst, extData.VDST + 1);
32064 
32065  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
32066  if (gpuDynInst->exec_mask[lane]) {
32067  vdst0[lane] = (reinterpret_cast<VecElemU32*>(
32068  gpuDynInst->d_data))[lane * 2];
32069  vdst1[lane] = (reinterpret_cast<VecElemU32*>(
32070  gpuDynInst->d_data))[lane * 2 + 1];
32071  }
32072  }
32073 
32074  vdst0.write();
32075  vdst1.write();
32076  } // completeAcc
32077 
32079  : Inst_DS(iFmt, "ds_read2st64_b32")
32080  {
32081  setFlag(MemoryRef);
32082  setFlag(Load);
32083  } // Inst_DS__DS_READ2ST64_B32
32084 
32086  {
32087  } // ~Inst_DS__DS_READ2ST64_B32
32088 
32089  // RETURN_DATA[0] = MEM[ADDR_BASE + OFFSET0 * 4 * 64];
32090  // RETURN_DATA[1] = MEM[ADDR_BASE + OFFSET1 * 4 * 64].
32091  // Read 2 dwords.
32092  void
32094  {
32095  Wavefront *wf = gpuDynInst->wavefront();
32096  gpuDynInst->execUnitId = wf->execUnitId;
32097  gpuDynInst->latency.init(gpuDynInst->computeUnit());
32098  gpuDynInst->latency.set(
32099  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
32100  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
32101 
32102  addr.read();
32103 
32104  calcAddr(gpuDynInst, addr);
32105 
32106  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
32107  } // execute
32108 
32109  void
32111  {
32112  Addr offset0 = (instData.OFFSET0 * 4 * 64);
32113  Addr offset1 = (instData.OFFSET1 * 4 * 64);
32114 
32115  initDualMemRead<VecElemU32>(gpuDynInst, offset0, offset1);
32116  }
32117 
32118  void
32120  {
32121  VecOperandU32 vdst0(gpuDynInst, extData.VDST);
32122  VecOperandU32 vdst1(gpuDynInst, extData.VDST + 1);
32123 
32124  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
32125  if (gpuDynInst->exec_mask[lane]) {
32126  vdst0[lane] = (reinterpret_cast<VecElemU64*>(
32127  gpuDynInst->d_data))[lane * 2];
32128  vdst1[lane] = (reinterpret_cast<VecElemU64*>(
32129  gpuDynInst->d_data))[lane * 2 + 1];
32130  }
32131  }
32132 
32133  vdst0.write();
32134  vdst1.write();
32135  }
32136  // --- Inst_DS__DS_READ_I8 class methods ---
32137 
32139  : Inst_DS(iFmt, "ds_read_i8")
32140  {
32141  setFlag(MemoryRef);
32142  setFlag(Load);
32143  } // Inst_DS__DS_READ_I8
32144 
32146  {
32147  } // ~Inst_DS__DS_READ_I8
32148 
32149  // RETURN_DATA = signext(MEM[ADDR][7:0]).
32150  // Signed byte read.
32151  void
32153  {
32155  }
32156 
32158  : Inst_DS(iFmt, "ds_read_u8")
32159  {
32160  setFlag(MemoryRef);
32161  setFlag(Load);
32162  } // Inst_DS__DS_READ_U8
32163 
32165  {
32166  } // ~Inst_DS__DS_READ_U8
32167 
32168  // RETURN_DATA = {24'h0,MEM[ADDR][7:0]}.
32169  // Unsigned byte read.
32170  void
32172  {
32173  Wavefront *wf = gpuDynInst->wavefront();
32174  gpuDynInst->execUnitId = wf->execUnitId;
32175  gpuDynInst->latency.init(gpuDynInst->computeUnit());
32176  gpuDynInst->latency.set(
32177  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
32178  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
32179 
32180  addr.read();
32181 
32182  calcAddr(gpuDynInst, addr);
32183 
32184  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
32185  } // execute
32186 
32187  void
32189  {
32190  Addr offset0 = instData.OFFSET0;
32191  Addr offset1 = instData.OFFSET1;
32192  Addr offset = (offset1 << 8) | offset0;
32193 
32194  initMemRead<VecElemU8>(gpuDynInst, offset);
32195  } // initiateAcc
32196 
32197  void
32199  {
32200  VecOperandU32 vdst(gpuDynInst, extData.VDST);
32201 
32202  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
32203  if (gpuDynInst->exec_mask[lane]) {
32204  vdst[lane] = (VecElemU32)(reinterpret_cast<VecElemU8*>(
32205  gpuDynInst->d_data))[lane];
32206  }
32207  }
32208 
32209  vdst.write();
32210  } // completeAcc
32211  // --- Inst_DS__DS_READ_I16 class methods ---
32212 
32214  : Inst_DS(iFmt, "ds_read_i16")
32215  {
32216  setFlag(MemoryRef);
32217  setFlag(Load);
32218  } // Inst_DS__DS_READ_I16
32219 
32221  {
32222  } // ~Inst_DS__DS_READ_I16
32223 
32224  // RETURN_DATA = signext(MEM[ADDR][15:0]).
32225  // Signed short read.
32226  void
32228  {
32230  }
32231 
32233  : Inst_DS(iFmt, "ds_read_u16")
32234  {
32235  setFlag(MemoryRef);
32236  setFlag(Load);
32237  } // Inst_DS__DS_READ_U16
32238 
32240  {
32241  } // ~Inst_DS__DS_READ_U16
32242 
32243  // RETURN_DATA = {16'h0,MEM[ADDR][15:0]}.
32244  // Unsigned short read.
32245  void
32247  {
32248  Wavefront *wf = gpuDynInst->wavefront();
32249  gpuDynInst->execUnitId = wf->execUnitId;
32250  gpuDynInst->latency.init(gpuDynInst->computeUnit());
32251  gpuDynInst->latency.set(
32252  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
32253  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
32254 
32255  addr.read();
32256 
32257  calcAddr(gpuDynInst, addr);
32258 
32259  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
32260  } // execute
32261  void
32263  {
32264  Addr offset0 = instData.OFFSET0;
32265  Addr offset1 = instData.OFFSET1;
32266  Addr offset = (offset1 << 8) | offset0;
32267 
32268  initMemRead<VecElemU16>(gpuDynInst, offset);
32269  } // initiateAcc
32270 
32271  void
32273  {
32274  VecOperandU32 vdst(gpuDynInst, extData.VDST);
32275 
32276  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
32277  if (gpuDynInst->exec_mask[lane]) {
32278  vdst[lane] = (VecElemU32)(reinterpret_cast<VecElemU16*>(
32279  gpuDynInst->d_data))[lane];
32280  }
32281  }
32282 
32283  vdst.write();
32284  } // completeAcc
32285  // --- Inst_DS__DS_SWIZZLE_B32 class methods ---
32286 
32288  : Inst_DS(iFmt, "ds_swizzle_b32")
32289  {
32290  setFlag(Load);
32291  } // Inst_DS__DS_SWIZZLE_B32
32292 
32294  {
32295  } // ~Inst_DS__DS_SWIZZLE_B32
32296 
32297  // RETURN_DATA = swizzle(vgpr_data, offset1:offset0).
32298  // Dword swizzle, no data is written to LDS memory;
32299  void
32301  {
32302  Wavefront *wf = gpuDynInst->wavefront();
32303  wf->rdLmReqsInPipe--;
32305 
32306  if (gpuDynInst->exec_mask.none()) {
32307  return;
32308  }
32309 
32310  gpuDynInst->execUnitId = wf->execUnitId;
32311  gpuDynInst->latency.init(gpuDynInst->computeUnit());
32312  gpuDynInst->latency.set(gpuDynInst->computeUnit()
32313  ->cyclesToTicks(Cycles(24)));
32314 
32315  ConstVecOperandU32 data(gpuDynInst, extData.DATA0);
32316  VecOperandU32 vdst(gpuDynInst, extData.VDST);
32334  VecElemU16 ds_pattern = ((instData.OFFSET1 << 8) | instData.OFFSET0);
32335 
32336  data.read();
32337 
32338  if (bits(ds_pattern, 15)) {
32339  // QDMode
32340  for (int lane = 0; lane < NumVecElemPerVecReg; lane += 4) {
32346  if (gpuDynInst->exec_mask[lane]) {
32347  int index0 = lane + bits(ds_pattern, 1, 0);
32348  panic_if(index0 >= NumVecElemPerVecReg, "%s: index0 (%d) "
32349  "is out of bounds.\n", gpuDynInst->disassemble(),
32350  index0);
32351  vdst[lane]
32352  = gpuDynInst->exec_mask[index0] ? data[index0]: 0;
32353  }
32354  if (gpuDynInst->exec_mask[lane + 1]) {
32355  int index1 = lane + bits(ds_pattern, 3, 2);
32356  panic_if(index1 >= NumVecElemPerVecReg, "%s: index1 (%d) "
32357  "is out of bounds.\n", gpuDynInst->disassemble(),
32358  index1);
32359  vdst[lane + 1]
32360  = gpuDynInst->exec_mask[index1] ? data[index1]: 0;
32361  }
32362  if (gpuDynInst->exec_mask[lane + 2]) {
32363  int index2 = lane + bits(ds_pattern, 5, 4);
32364  panic_if(index2 >= NumVecElemPerVecReg, "%s: index2 (%d) "
32365  "is out of bounds.\n", gpuDynInst->disassemble(),
32366  index2);
32367  vdst[lane + 2]
32368  = gpuDynInst->exec_mask[index2] ? data[index2]: 0;
32369  }
32370  if (gpuDynInst->exec_mask[lane + 3]) {
32371  int index3 = lane + bits(ds_pattern, 7, 6);
32372  panic_if(index3 >= NumVecElemPerVecReg, "%s: index3 (%d) "
32373  "is out of bounds.\n", gpuDynInst->disassemble(),
32374  index3);
32375  vdst[lane + 3]
32376  = gpuDynInst->exec_mask[index3] ? data[index3]: 0;
32377  }
32378  }
32379  } else {
32380  // Bit Mode
32381  int and_mask = bits(ds_pattern, 4, 0);
32382  int or_mask = bits(ds_pattern, 9, 5);
32383  int xor_mask = bits(ds_pattern, 14, 10);
32384  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
32385  if (gpuDynInst->exec_mask[lane]) {
32386  int index = (((lane & and_mask) | or_mask) ^ xor_mask);
32387  // Adjust for the next 32 lanes.
32388  if (lane > 31) {
32389  index += 32;
32390  }
32391  panic_if(index >= NumVecElemPerVecReg, "%s: index (%d) is "
32392  "out of bounds.\n", gpuDynInst->disassemble(),
32393  index);
32394  vdst[lane]
32395  = gpuDynInst->exec_mask[index] ? data[index] : 0;
32396  }
32397  }
32398  }
32399 
32400  vdst.write();
32401 
32408  wf->computeUnit->vrf[wf->simdId]->
32409  scheduleWriteOperandsFromLoad(wf, gpuDynInst);
32410  } // execute
32411  // --- Inst_DS__DS_PERMUTE_B32 class methods ---
32412 
32414  : Inst_DS(iFmt, "ds_permute_b32")
32415  {
32416  setFlag(MemoryRef);
32422  setFlag(Load);
32423  } // Inst_DS__DS_PERMUTE_B32
32424 
32426  {
32427  } // ~Inst_DS__DS_PERMUTE_B32
32428 
32429  // Forward permute.
32430  void
32432  {
32433  Wavefront *wf = gpuDynInst->wavefront();
32434  gpuDynInst->execUnitId = wf->execUnitId;
32435  gpuDynInst->latency.init(gpuDynInst->computeUnit());
32436  gpuDynInst->latency.set(gpuDynInst->computeUnit()
32437  ->cyclesToTicks(Cycles(24)));
32438  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
32439  ConstVecOperandU32 data(gpuDynInst, extData.DATA0);
32440  VecOperandU32 vdst(gpuDynInst, extData.VDST);
32441 
32442  addr.read();
32443  data.read();
32444 
32445  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
32446  if (wf->execMask(lane)) {
32453  assert(!instData.OFFSET1);
32460  int index = bits(addr[lane] + instData.OFFSET0, 7, 2);
32461  panic_if(index >= NumVecElemPerVecReg, "%s: index (%d) is out "
32462  "of bounds.\n", gpuDynInst->disassemble(), index);
32468  if (wf->execMask(index)) {
32469  vdst[index] = data[lane];
32470  } else {
32471  vdst[index] = 0;
32472  }
32473  }
32474  }
32475 
32476  vdst.write();
32477 
32478  wf->decLGKMInstsIssued();
32479  wf->rdLmReqsInPipe--;
32481 
32488  wf->computeUnit->vrf[wf->simdId]->
32489  scheduleWriteOperandsFromLoad(wf, gpuDynInst);
32490  } // execute
32491  // --- Inst_DS__DS_BPERMUTE_B32 class methods ---
32492 
32494  : Inst_DS(iFmt, "ds_bpermute_b32")
32495  {
32496  setFlag(MemoryRef);
32502  setFlag(Load);
32503  } // Inst_DS__DS_BPERMUTE_B32
32504 
32506  {
32507  } // ~Inst_DS__DS_BPERMUTE_B32
32508 
32509  // Backward permute.
32510  void
32512  {
32513  Wavefront *wf = gpuDynInst->wavefront();
32514  gpuDynInst->execUnitId = wf->execUnitId;
32515  gpuDynInst->latency.init(gpuDynInst->computeUnit());
32516  gpuDynInst->latency.set(gpuDynInst->computeUnit()
32517  ->cyclesToTicks(Cycles(24)));
32518  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
32519  ConstVecOperandU32 data(gpuDynInst, extData.DATA0);
32520  VecOperandU32 vdst(gpuDynInst, extData.VDST);
32521 
32522  addr.read();
32523  data.read();
32524 
32525  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
32526  if (wf->execMask(lane)) {
32533  assert(!instData.OFFSET1);
32540  int index = bits(addr[lane] + instData.OFFSET0, 7, 2);
32541  panic_if(index >= NumVecElemPerVecReg, "%s: index (%d) is out "
32542  "of bounds.\n", gpuDynInst->disassemble(), index);
32548  if (wf->execMask(index)) {
32549  vdst[lane] = data[index];
32550  } else {
32551  vdst[lane] = 0;
32552  }
32553  }
32554  }
32555 
32556  vdst.write();
32557 
32558  wf->decLGKMInstsIssued();
32559  wf->rdLmReqsInPipe--;
32561 
32568  wf->computeUnit->vrf[wf->simdId]->
32569  scheduleWriteOperandsFromLoad(wf, gpuDynInst);
32570  } // execute
32571 
32572  // --- Inst_DS__DS_ADD_U64 class methods ---
32573 
32575  : Inst_DS(iFmt, "ds_add_u64")
32576  {
32577  } // Inst_DS__DS_ADD_U64
32578 
32580  {
32581  } // ~Inst_DS__DS_ADD_U64
32582 
32583  // tmp = MEM[ADDR];
32584  // MEM[ADDR] += DATA[0:1];
32585  // RETURN_DATA[0:1] = tmp.
32586  void
32588  {
32590  }
32591 
32593  : Inst_DS(iFmt, "ds_sub_u64")
32594  {
32595  } // Inst_DS__DS_SUB_U64
32596 
32598  {
32599  } // ~Inst_DS__DS_SUB_U64
32600 
32601  // tmp = MEM[ADDR];
32602  // MEM[ADDR] -= DATA[0:1];
32603  // RETURN_DATA[0:1] = tmp.
32604  void
32606  {
32608  }
32609 
32611  : Inst_DS(iFmt, "ds_rsub_u64")
32612  {
32613  } // Inst_DS__DS_RSUB_U64
32614 
32616  {
32617  } // ~Inst_DS__DS_RSUB_U64
32618 
32619  // tmp = MEM[ADDR];
32620  // MEM[ADDR] = DATA - MEM[ADDR];
32621  // RETURN_DATA = tmp.
32622  // Subtraction with reversed operands.
32623  void
32625  {
32627  }
32628 
32630  : Inst_DS(iFmt, "ds_inc_u64")
32631  {
32632  } // Inst_DS__DS_INC_U64
32633 
32635  {
32636  } // ~Inst_DS__DS_INC_U64
32637 
32638  // tmp = MEM[ADDR];
32639  // MEM[ADDR] = (tmp >= DATA[0:1]) ? 0 : tmp + 1 (unsigned compare);
32640  // RETURN_DATA[0:1] = tmp.
32641  void
32643  {
32645  }
32646 
32648  : Inst_DS(iFmt, "ds_dec_u64")
32649  {
32650  } // Inst_DS__DS_DEC_U64
32651 
32653  {
32654  } // ~Inst_DS__DS_DEC_U64
32655 
32656  // tmp = MEM[ADDR];
32657  // MEM[ADDR] = (tmp == 0 || tmp > DATA[0:1]) ? DATA[0:1] : tmp - 1
32658  // (unsigned compare);
32659  // RETURN_DATA[0:1] = tmp.
32660  void
32662  {
32664  }
32665 
32667  : Inst_DS(iFmt, "ds_min_i64")
32668  {
32669  } // Inst_DS__DS_MIN_I64
32670 
32672  {
32673  } // ~Inst_DS__DS_MIN_I64
32674 
32675  // tmp = MEM[ADDR];
32676  // MEM[ADDR] -= (DATA[0:1] < tmp) ? DATA[0:1] : tmp (signed compare);
32677  // RETURN_DATA[0:1] = tmp.
32678  void
32680  {
32682  }
32683 
32685  : Inst_DS(iFmt, "ds_max_i64")
32686  {
32687  } // Inst_DS__DS_MAX_I64
32688 
32690  {
32691  } // ~Inst_DS__DS_MAX_I64
32692 
32693  // tmp = MEM[ADDR];
32694  // MEM[ADDR] -= (DATA[0:1] > tmp) ? DATA[0:1] : tmp (signed compare);
32695  // RETURN_DATA[0:1] = tmp.
32696  void
32698  {
32700  }
32701 
32703  : Inst_DS(iFmt, "ds_min_u64")
32704  {
32705  } // Inst_DS__DS_MIN_U64
32706 
32708  {
32709  } // ~Inst_DS__DS_MIN_U64
32710 
32711  // tmp = MEM[ADDR];
32712  // MEM[ADDR] -= (DATA[0:1] < tmp) ? DATA[0:1] : tmp (unsigned compare);
32713  // RETURN_DATA[0:1] = tmp.
32714  void
32716  {
32718  }
32719 
32721  : Inst_DS(iFmt, "ds_max_u64")
32722  {
32723  } // Inst_DS__DS_MAX_U64
32724 
32726  {
32727  } // ~Inst_DS__DS_MAX_U64
32728 
32729  // tmp = MEM[ADDR];
32730  // MEM[ADDR] -= (DATA[0:1] > tmp) ? DATA[0:1] : tmp (unsigned compare);
32731  // RETURN_DATA[0:1] = tmp.
32732  void
32734  {
32736  }
32737 
32739  : Inst_DS(iFmt, "ds_and_b64")
32740  {
32741  } // Inst_DS__DS_AND_B64
32742 
32744  {
32745  } // ~Inst_DS__DS_AND_B64
32746 
32747  // tmp = MEM[ADDR];
32748  // MEM[ADDR] &= DATA[0:1];
32749  // RETURN_DATA[0:1] = tmp.
32750  void
32752  {
32754  }
32755 
32757  : Inst_DS(iFmt, "ds_or_b64")
32758  {
32759  } // Inst_DS__DS_OR_B64
32760 
32762  {
32763  } // ~Inst_DS__DS_OR_B64
32764 
32765  // tmp = MEM[ADDR];
32766  // MEM[ADDR] |= DATA[0:1];
32767  // RETURN_DATA[0:1] = tmp.
32768  void
32770  {
32772  }
32773 
32775  : Inst_DS(iFmt, "ds_xor_b64")
32776  {
32777  } // Inst_DS__DS_XOR_B64
32778 
32780  {
32781  } // ~Inst_DS__DS_XOR_B64
32782 
32783  // tmp = MEM[ADDR];
32784  // MEM[ADDR] ^= DATA[0:1];
32785  // RETURN_DATA[0:1] = tmp.
32786  void
32788  {
32790  }
32791 
32793  : Inst_DS(iFmt, "ds_mskor_b64")
32794  {
32795  } // Inst_DS__DS_MSKOR_B64
32796 
32798  {
32799  } // ~Inst_DS__DS_MSKOR_B64
32800 
32801  // tmp = MEM[ADDR];
32802  // MEM[ADDR] = (MEM_ADDR[ADDR] & ~DATA) | DATA2;
32803  // RETURN_DATA = tmp.
32804  void
32806  {
32808  }
32809 
32811  : Inst_DS(iFmt, "ds_write_b64")
32812  {
32813  setFlag(MemoryRef);
32814  setFlag(Store);
32815  } // Inst_DS__DS_WRITE_B64
32816 
32818  {
32819  } // ~Inst_DS__DS_WRITE_B64
32820 
32821  // MEM[ADDR] = DATA.
32822  // Write qword.
32823  void
32825  {
32826  Wavefront *wf = gpuDynInst->wavefront();
32827  gpuDynInst->execUnitId = wf->execUnitId;
32828  gpuDynInst->latency.init(gpuDynInst->computeUnit());
32829  gpuDynInst->latency.set(
32830  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
32831  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
32832  ConstVecOperandU64 data(gpuDynInst, extData.DATA0);
32833 
32834  addr.read();
32835  data.read();
32836 
32837  calcAddr(gpuDynInst, addr);
32838 
32839  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
32840  if (wf->execMask(lane)) {
32841  (reinterpret_cast<VecElemU64*>(gpuDynInst->d_data))[lane]
32842  = data[lane];
32843  }
32844  }
32845 
32846  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
32847  }
32848 
32849  void
32851  {
32852  Addr offset0 = instData.OFFSET0;
32853  Addr offset1 = instData.OFFSET1;
32854  Addr offset = (offset1 << 8) | offset0;
32855 
32856  initMemWrite<VecElemU64>(gpuDynInst, offset);
32857  } // initiateAcc
32858 
32859  void
32861  {
32862  } // completeAcc
32863 
32865  : Inst_DS(iFmt, "ds_write2_b64")
32866  {
32867  setFlag(MemoryRef);
32868  setFlag(Store);
32869  } // Inst_DS__DS_WRITE2_B64
32870 
32872  {
32873  } // ~Inst_DS__DS_WRITE2_B64
32874 
32875  // MEM[ADDR_BASE + OFFSET0 * 8] = DATA;
32876  // MEM[ADDR_BASE + OFFSET1 * 8] = DATA2.
32877  // Write 2 qwords.
32878  void
32880  {
32881  Wavefront *wf = gpuDynInst->wavefront();
32882  gpuDynInst->execUnitId = wf->execUnitId;
32883  gpuDynInst->latency.init(gpuDynInst->computeUnit());
32884  gpuDynInst->latency.set(
32885  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
32886  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
32887  ConstVecOperandU64 data0(gpuDynInst, extData.DATA0);
32888  ConstVecOperandU64 data1(gpuDynInst, extData.DATA1);
32889 
32890  addr.read();
32891  data0.read();
32892  data1.read();
32893 
32894  calcAddr(gpuDynInst, addr);
32895 
32896  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
32897  if (wf->execMask(lane)) {
32898  (reinterpret_cast<VecElemU64*>(
32899  gpuDynInst->d_data))[lane * 2] = data0[lane];
32900  (reinterpret_cast<VecElemU64*>(
32901  gpuDynInst->d_data))[lane * 2 + 1] = data1[lane];
32902  }
32903  }
32904 
32905  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
32906  }
32907 
32908  void
32910  {
32911  Addr offset0 = instData.OFFSET0 * 8;
32912  Addr offset1 = instData.OFFSET1 * 8;
32913 
32914  initDualMemWrite<VecElemU64>(gpuDynInst, offset0, offset1);
32915  }
32916 
32917  void
32919  {
32920  }
32921 
32923  : Inst_DS(iFmt, "ds_write2st64_b64")
32924  {
32925  setFlag(MemoryRef);
32926  setFlag(Store);
32927  } // Inst_DS__DS_WRITE2ST64_B64
32928 
32930  {
32931  } // ~Inst_DS__DS_WRITE2ST64_B64
32932 
32933  // MEM[ADDR_BASE + OFFSET0 * 8 * 64] = DATA;
32934  // MEM[ADDR_BASE + OFFSET1 * 8 * 64] = DATA2;
32935  // Write 2 qwords.
32936  void
32938  {
32940  }
32941 
32943  : Inst_DS(iFmt, "ds_cmpst_b64")
32944  {
32945  } // Inst_DS__DS_CMPST_B64
32946 
32948  {
32949  } // ~Inst_DS__DS_CMPST_B64
32950 
32951  // tmp = MEM[ADDR];
32952  // src = DATA2;
32953  // cmp = DATA;
32954  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
32955  // RETURN_DATA[0] = tmp.
32956  // Compare and store.
32957  void
32959  {
32961  }
32962 
32964  : Inst_DS(iFmt, "ds_cmpst_f64")
32965  {
32966  setFlag(F64);
32967  } // Inst_DS__DS_CMPST_F64
32968 
32970  {
32971  } // ~Inst_DS__DS_CMPST_F64
32972 
32973  // tmp = MEM[ADDR];
32974  // src = DATA2;
32975  // cmp = DATA;
32976  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
32977  // RETURN_DATA[0] = tmp.
32978  void
32980  {
32982  }
32983 
32985  : Inst_DS(iFmt, "ds_min_f64")
32986  {
32987  setFlag(F64);
32988  } // Inst_DS__DS_MIN_F64
32989 
32991  {
32992  } // ~Inst_DS__DS_MIN_F64
32993 
32994  // tmp = MEM[ADDR];
32995  // src = DATA;
32996  // cmp = DATA2;
32997  // MEM[ADDR] = (cmp < tmp) ? src : tmp.
32998  void
33000  {
33002  }
33003 
33005  : Inst_DS(iFmt, "ds_max_f64")
33006  {
33007  setFlag(F64);
33008  } // Inst_DS__DS_MAX_F64
33009 
33011  {
33012  } // ~Inst_DS__DS_MAX_F64
33013 
33014  // tmp = MEM[ADDR];
33015  // src = DATA;
33016  // cmp = DATA2;
33017  // MEM[ADDR] = (tmp > cmp) ? src : tmp.
33018  void
33020  {
33022  }
33023 
33025  : Inst_DS(iFmt, "ds_add_rtn_u64")
33026  {
33027  } // Inst_DS__DS_ADD_RTN_U64
33028 
33030  {
33031  } // ~Inst_DS__DS_ADD_RTN_U64
33032 
33033  // tmp = MEM[ADDR];
33034  // MEM[ADDR] += DATA[0:1];
33035  // RETURN_DATA[0:1] = tmp.
33036  void
33038  {
33040  }
33041 
33043  : Inst_DS(iFmt, "ds_sub_rtn_u64")
33044  {
33045  } // Inst_DS__DS_SUB_RTN_U64
33046 
33048  {
33049  } // ~Inst_DS__DS_SUB_RTN_U64
33050 
33051  // tmp = MEM[ADDR];
33052  // MEM[ADDR] -= DATA[0:1];
33053  // RETURN_DATA[0:1] = tmp.
33054  void
33056  {
33058  }
33059 
33061  : Inst_DS(iFmt, "ds_rsub_rtn_u64")
33062  {
33063  } // Inst_DS__DS_RSUB_RTN_U64
33064 
33066  {
33067  } // ~Inst_DS__DS_RSUB_RTN_U64
33068 
33069  // tmp = MEM[ADDR];
33070  // MEM[ADDR] = DATA - MEM[ADDR];
33071  // RETURN_DATA = tmp.
33072  // Subtraction with reversed operands.
33073  void
33075  {
33077  }
33078 
33080  : Inst_DS(iFmt, "ds_inc_rtn_u64")
33081  {
33082  } // Inst_DS__DS_INC_RTN_U64
33083 
33085  {
33086  } // ~Inst_DS__DS_INC_RTN_U64
33087 
33088  // tmp = MEM[ADDR];
33089  // MEM[ADDR] = (tmp >= DATA[0:1]) ? 0 : tmp + 1 (unsigned compare);
33090  // RETURN_DATA[0:1] = tmp.
33091  void
33093  {
33095  }
33096 
33098  : Inst_DS(iFmt, "ds_dec_rtn_u64")
33099  {
33100  } // Inst_DS__DS_DEC_RTN_U64
33101 
33103  {
33104  } // ~Inst_DS__DS_DEC_RTN_U64
33105 
33106  // tmp = MEM[ADDR];
33107  // MEM[ADDR] = (tmp == 0 || tmp > DATA[0:1]) ? DATA[0:1] : tmp - 1
33108  // (unsigned compare);
33109  // RETURN_DATA[0:1] = tmp.
33110  void
33112  {
33114  }
33115 
33117  : Inst_DS(iFmt, "ds_min_rtn_i64")
33118  {
33119  } // Inst_DS__DS_MIN_RTN_I64
33120 
33122  {
33123  } // ~Inst_DS__DS_MIN_RTN_I64
33124 
33125  // tmp = MEM[ADDR];
33126  // MEM[ADDR] -= (DATA[0:1] < tmp) ? DATA[0:1] : tmp (signed compare);
33127  // RETURN_DATA[0:1] = tmp.
33128  void
33130  {
33132  }
33133 
33135  : Inst_DS(iFmt, "ds_max_rtn_i64")
33136  {
33137  } // Inst_DS__DS_MAX_RTN_I64
33138 
33140  {
33141  } // ~Inst_DS__DS_MAX_RTN_I64
33142 
33143  // tmp = MEM[ADDR];
33144  // MEM[ADDR] -= (DATA[0:1] > tmp) ? DATA[0:1] : tmp (signed compare);
33145  // RETURN_DATA[0:1] = tmp.
33146  void
33148  {
33150  }
33151 
33153  : Inst_DS(iFmt, "ds_min_rtn_u64")
33154  {
33155  } // Inst_DS__DS_MIN_RTN_U64
33156 
33158  {
33159  } // ~Inst_DS__DS_MIN_RTN_U64
33160 
33161  // tmp = MEM[ADDR];
33162  // MEM[ADDR] -= (DATA[0:1] < tmp) ? DATA[0:1] : tmp (unsigned compare);
33163  // RETURN_DATA[0:1] = tmp.
33164  void
33166  {
33168  }
33169 
33171  : Inst_DS(iFmt, "ds_max_rtn_u64")
33172  {
33173  } // Inst_DS__DS_MAX_RTN_U64
33174 
33176  {
33177  } // ~Inst_DS__DS_MAX_RTN_U64
33178 
33179  // tmp = MEM[ADDR];
33180  // MEM[ADDR] -= (DATA[0:1] > tmp) ? DATA[0:1] : tmp (unsigned compare);
33181  // RETURN_DATA[0:1] = tmp.
33182  void
33184  {
33186  }
33187 
33189  : Inst_DS(iFmt, "ds_and_rtn_b64")
33190  {
33191  } // Inst_DS__DS_AND_RTN_B64
33192 
33194  {
33195  } // ~Inst_DS__DS_AND_RTN_B64
33196 
33197  // tmp = MEM[ADDR];
33198  // MEM[ADDR] &= DATA[0:1];
33199  // RETURN_DATA[0:1] = tmp.
33200  void
33202  {
33204  }
33205 
33207  : Inst_DS(iFmt, "ds_or_rtn_b64")
33208  {
33209  } // Inst_DS__DS_OR_RTN_B64
33210 
33212  {
33213  } // ~Inst_DS__DS_OR_RTN_B64
33214 
33215  // tmp = MEM[ADDR];
33216  // MEM[ADDR] |= DATA[0:1];
33217  // RETURN_DATA[0:1] = tmp.
33218  void
33220  {
33222  }
33223 
33225  : Inst_DS(iFmt, "ds_xor_rtn_b64")
33226  {
33227  } // Inst_DS__DS_XOR_RTN_B64
33228 
33230  {
33231  } // ~Inst_DS__DS_XOR_RTN_B64
33232 
33233  // tmp = MEM[ADDR];
33234  // MEM[ADDR] ^= DATA[0:1];
33235  // RETURN_DATA[0:1] = tmp.
33236  void
33238  {
33240  }
33241 
33243  : Inst_DS(iFmt, "ds_mskor_rtn_b64")
33244  {
33245  } // Inst_DS__DS_MSKOR_RTN_B64
33246 
33248  {
33249  } // ~Inst_DS__DS_MSKOR_RTN_B64
33250 
33251  // tmp = MEM[ADDR];
33252  // MEM[ADDR] = (MEM_ADDR[ADDR] & ~DATA) | DATA2;
33253  // RETURN_DATA = tmp.
33254  // Masked dword OR, D0 contains the mask and D1 contains the new value.
33255  void
33257  {
33259  }
33260 
33262  : Inst_DS(iFmt, "ds_wrxchg_rtn_b64")
33263  {
33264  } // Inst_DS__DS_WRXCHG_RTN_B64
33265 
33267  {
33268  } // ~Inst_DS__DS_WRXCHG_RTN_B64
33269 
33270  // tmp = MEM[ADDR];
33271  // MEM[ADDR] = DATA;
33272  // RETURN_DATA = tmp.
33273  // Write-exchange operation.
33274  void
33276  {
33278  }
33279 
33281  : Inst_DS(iFmt, "ds_wrxchg2_rtn_b64")
33282  {
33283  } // Inst_DS__DS_WRXCHG2_RTN_B64
33284 
33286  {
33287  } // ~Inst_DS__DS_WRXCHG2_RTN_B64
33288 
33289  // Write-exchange 2 separate qwords.
33290  void
33292  {
33294  }
33295 
33297  InFmt_DS *iFmt)
33298  : Inst_DS(iFmt, "ds_wrxchg2st64_rtn_b64")
33299  {
33300  } // Inst_DS__DS_WRXCHG2ST64_RTN_B64
33301 
33303  {
33304  } // ~Inst_DS__DS_WRXCHG2ST64_RTN_B64
33305 
33306  // Write-exchange 2 qwords with a stride of 64 qwords.
33307  void
33309  {
33311  }
33312 
33314  : Inst_DS(iFmt, "ds_cmpst_rtn_b64")
33315  {
33316  } // Inst_DS__DS_CMPST_RTN_B64
33317 
33319  {
33320  } // ~Inst_DS__DS_CMPST_RTN_B64
33321 
33322  // tmp = MEM[ADDR];
33323  // src = DATA2;
33324  // cmp = DATA;
33325  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
33326  // RETURN_DATA[0] = tmp.
33327  // Compare and store.
33328  void
33330  {
33332  }
33333 
33335  : Inst_DS(iFmt, "ds_cmpst_rtn_f64")
33336  {
33337  setFlag(F64);
33338  } // Inst_DS__DS_CMPST_RTN_F64
33339 
33341  {
33342  } // ~Inst_DS__DS_CMPST_RTN_F64
33343 
33344  // tmp = MEM[ADDR];
33345  // src = DATA2;
33346  // cmp = DATA;
33347  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
33348  // RETURN_DATA[0] = tmp.
33349  void
33351  {
33353  }
33354 
33356  : Inst_DS(iFmt, "ds_min_rtn_f64")
33357  {
33358  setFlag(F64);
33359  } // Inst_DS__DS_MIN_RTN_F64
33360 
33362  {
33363  } // ~Inst_DS__DS_MIN_RTN_F64
33364 
33365  // tmp = MEM[ADDR];
33366  // src = DATA;
33367  // cmp = DATA2;
33368  // MEM[ADDR] = (cmp < tmp) ? src : tmp.
33369  void
33371  {
33373  }
33374 
33376  : Inst_DS(iFmt, "ds_max_rtn_f64")
33377  {
33378  setFlag(F64);
33379  } // Inst_DS__DS_MAX_RTN_F64
33380 
33382  {
33383  } // ~Inst_DS__DS_MAX_RTN_F64
33384 
33385  // tmp = MEM[ADDR];
33386  // src = DATA;
33387  // cmp = DATA2;
33388  // MEM[ADDR] = (tmp > cmp) ? src : tmp.
33389  void
33391  {
33393  }
33394 
33396  : Inst_DS(iFmt, "ds_read_b64")
33397  {
33398  setFlag(MemoryRef);
33399  setFlag(Load);
33400  } // Inst_DS__DS_READ_B64
33401 
33403  {
33404  } // ~Inst_DS__DS_READ_B64
33405 
33406  // RETURN_DATA = MEM[ADDR].
33407  // Read 1 qword.
33408  void
33410  {
33411  Wavefront *wf = gpuDynInst->wavefront();
33412  gpuDynInst->execUnitId = wf->execUnitId;
33413  gpuDynInst->latency.init(gpuDynInst->computeUnit());
33414  gpuDynInst->latency.set(
33415  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
33416  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
33417 
33418  addr.read();
33419 
33420  calcAddr(gpuDynInst, addr);
33421 
33422  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
33423  }
33424 
33425  void
33427  {
33428  Addr offset0 = instData.OFFSET0;
33429  Addr offset1 = instData.OFFSET1;
33430  Addr offset = (offset1 << 8) | offset0;
33431 
33432  initMemRead<VecElemU64>(gpuDynInst, offset);
33433  } // initiateAcc
33434 
33435  void
33437  {
33438  VecOperandU64 vdst(gpuDynInst, extData.VDST);
33439 
33440  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
33441  if (gpuDynInst->exec_mask[lane]) {
33442  vdst[lane] = (reinterpret_cast<VecElemU64*>(
33443  gpuDynInst->d_data))[lane];
33444  }
33445  }
33446 
33447  vdst.write();
33448  } // completeAcc
33449 
33451  : Inst_DS(iFmt, "ds_read2_b64")
33452  {
33453  setFlag(MemoryRef);
33454  setFlag(Load);
33455  } // Inst_DS__DS_READ2_B64
33456 
33458  {
33459  } // ~Inst_DS__DS_READ2_B64
33460 
33461  // RETURN_DATA[0] = MEM[ADDR_BASE + OFFSET0 * 8];
33462  // RETURN_DATA[1] = MEM[ADDR_BASE + OFFSET1 * 8].
33463  // Read 2 qwords.
33464  void
33466  {
33467  Wavefront *wf = gpuDynInst->wavefront();
33468  gpuDynInst->execUnitId = wf->execUnitId;
33469  gpuDynInst->latency.init(gpuDynInst->computeUnit());
33470  gpuDynInst->latency.set(
33471  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
33472  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
33473 
33474  addr.read();
33475 
33476  calcAddr(gpuDynInst, addr);
33477 
33478  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
33479  }
33480 
33481  void
33483  {
33484  Addr offset0 = instData.OFFSET0 * 8;
33485  Addr offset1 = instData.OFFSET1 * 8;
33486 
33487  initDualMemRead<VecElemU64>(gpuDynInst, offset0, offset1);
33488  } // initiateAcc
33489 
33490  void
33492  {
33493  VecOperandU64 vdst0(gpuDynInst, extData.VDST);
33494  VecOperandU64 vdst1(gpuDynInst, extData.VDST + 2);
33495 
33496  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
33497  if (gpuDynInst->exec_mask[lane]) {
33498  vdst0[lane] = (reinterpret_cast<VecElemU64*>(
33499  gpuDynInst->d_data))[lane * 2];
33500  vdst1[lane] = (reinterpret_cast<VecElemU64*>(
33501  gpuDynInst->d_data))[lane * 2 + 1];
33502  }
33503  }
33504 
33505  vdst0.write();
33506  vdst1.write();
33507  } // completeAcc
33508 
33510  : Inst_DS(iFmt, "ds_read2st64_b64")
33511  {
33512  setFlag(MemoryRef);
33513  setFlag(Load);
33514  } // Inst_DS__DS_READ2ST64_B64
33515 
33517  {
33518  } // ~Inst_DS__DS_READ2ST64_B64
33519 
33520  // RETURN_DATA[0] = MEM[ADDR_BASE + OFFSET0 * 8 * 64];
33521  // RETURN_DATA[1] = MEM[ADDR_BASE + OFFSET1 * 8 * 64].
33522  // Read 2 qwords.
33523  void
33525  {
33526  Wavefront *wf = gpuDynInst->wavefront();
33527  gpuDynInst->execUnitId = wf->execUnitId;
33528  gpuDynInst->latency.init(gpuDynInst->computeUnit());
33529  gpuDynInst->latency.set(
33530  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
33531  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
33532 
33533  addr.read();
33534 
33535  calcAddr(gpuDynInst, addr);
33536 
33537  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
33538  }
33539 
33540  void
33542  {
33543  Addr offset0 = (instData.OFFSET0 * 8 * 64);
33544  Addr offset1 = (instData.OFFSET1 * 8 * 64);
33545 
33546  initDualMemRead<VecElemU64>(gpuDynInst, offset0, offset1);
33547  }
33548 
33549  void
33551  {
33552  VecOperandU64 vdst0(gpuDynInst, extData.VDST);
33553  VecOperandU64 vdst1(gpuDynInst, extData.VDST + 2);
33554 
33555  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
33556  if (gpuDynInst->exec_mask[lane]) {
33557  vdst0[lane] = (reinterpret_cast<VecElemU64*>(
33558  gpuDynInst->d_data))[lane * 2];
33559  vdst1[lane] = (reinterpret_cast<VecElemU64*>(
33560  gpuDynInst->d_data))[lane * 2 + 1];
33561  }
33562  }
33563 
33564  vdst0.write();
33565  vdst1.write();
33566  }
33567 
33569  InFmt_DS *iFmt)
33570  : Inst_DS(iFmt, "ds_condxchg32_rtn_b64")
33571  {
33572  } // Inst_DS__DS_CONDXCHG32_RTN_B64
33573 
33575  {
33576  } // ~Inst_DS__DS_CONDXCHG32_RTN_B64
33577 
33578  // Conditional write exchange.
33579  void
33581  {
33583  }
33584 
33586  : Inst_DS(iFmt, "ds_add_src2_u32")
33587  {
33588  } // Inst_DS__DS_ADD_SRC2_U32
33589 
33591  {
33592  } // ~Inst_DS__DS_ADD_SRC2_U32
33593 
33594  // A = ADDR_BASE;
33595  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33596  // {offset1[6],offset1[6:0],offset0});
33597  // MEM[A] = MEM[A] + MEM[B].
33598  void
33600  {
33602  }
33603 
33605  : Inst_DS(iFmt, "ds_sub_src2_u32")
33606  {
33607  } // Inst_DS__DS_SUB_SRC2_U32
33608 
33610  {
33611  } // ~Inst_DS__DS_SUB_SRC2_U32
33612 
33613  // A = ADDR_BASE;
33614  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33615  // {offset1[6],offset1[6:0],offset0});
33616  // MEM[A] = MEM[A] - MEM[B].
33617  void
33619  {
33621  }
33622 
33624  : Inst_DS(iFmt, "ds_rsub_src2_u32")
33625  {
33626  } // Inst_DS__DS_RSUB_SRC2_U32
33627 
33629  {
33630  } // ~Inst_DS__DS_RSUB_SRC2_U32
33631 
33632  // A = ADDR_BASE;
33633  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33634  // {offset1[6],offset1[6:0],offset0});
33635  // MEM[A] = MEM[B] - MEM[A].
33636  void
33638  {
33640  }
33641 
33643  : Inst_DS(iFmt, "ds_inc_src2_u32")
33644  {
33645  } // Inst_DS__DS_INC_SRC2_U32
33646 
33648  {
33649  } // ~Inst_DS__DS_INC_SRC2_U32
33650 
33651  // A = ADDR_BASE;
33652  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33653  // {offset1[6],offset1[6:0],offset0});
33654  // MEM[A] = (MEM[A] >= MEM[B] ? 0 : MEM[A] + 1).
33655  void
33657  {
33659  }
33660 
33662  : Inst_DS(iFmt, "ds_dec_src2_u32")
33663  {
33664  } // Inst_DS__DS_DEC_SRC2_U32
33665 
33667  {
33668  } // ~Inst_DS__DS_DEC_SRC2_U32
33669 
33670  // A = ADDR_BASE;
33671  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33672  // {offset1[6],offset1[6:0],offset0});
33673  // MEM[A] = (MEM[A] == 0 || MEM[A] > MEM[B] ? MEM[B] : MEM[A] - 1).
33674  // Uint decrement.
33675  void
33677  {
33679  }
33680 
33682  : Inst_DS(iFmt, "ds_min_src2_i32")
33683  {
33684  } // Inst_DS__DS_MIN_SRC2_I32
33685 
33687  {
33688  } // ~Inst_DS__DS_MIN_SRC2_I32
33689 
33690  // A = ADDR_BASE;
33691  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33692  // {offset1[6],offset1[6:0],offset0});
33693  // MEM[A] = min(MEM[A], MEM[B]).
33694  void
33696  {
33698  }
33699 
33701  : Inst_DS(iFmt, "ds_max_src2_i32")
33702  {
33703  } // Inst_DS__DS_MAX_SRC2_I32
33704 
33706  {
33707  } // ~Inst_DS__DS_MAX_SRC2_I32
33708 
33709  // A = ADDR_BASE;
33710  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33711  // {offset1[6],offset1[6:0],offset0});
33712  // MEM[A] = max(MEM[A], MEM[B]).
33713  void
33715  {
33717  }
33718 
33720  : Inst_DS(iFmt, "ds_min_src2_u32")
33721  {
33722  } // Inst_DS__DS_MIN_SRC2_U32
33723 
33725  {
33726  } // ~Inst_DS__DS_MIN_SRC2_U32
33727 
33728  // A = ADDR_BASE;
33729  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33730  // {offset1[6],offset1[6:0],offset0});
33731  // MEM[A] = min(MEM[A], MEM[B]).
33732  void
33734  {
33736  }
33737 
33739  : Inst_DS(iFmt, "ds_max_src2_u32")
33740  {
33741  } // Inst_DS__DS_MAX_SRC2_U32
33742 
33744  {
33745  } // ~Inst_DS__DS_MAX_SRC2_U32
33746 
33747  // A = ADDR_BASE;
33748  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33749  // {offset1[6],offset1[6:0],offset0});
33750  // MEM[A] = max(MEM[A], MEM[B]).
33751  void
33753  {
33755  }
33756 
33758  : Inst_DS(iFmt, "ds_and_src2_b32")
33759  {
33760  } // Inst_DS__DS_AND_SRC2_B32
33761 
33763  {
33764  } // ~Inst_DS__DS_AND_SRC2_B32
33765 
33766  // A = ADDR_BASE;
33767  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33768  // {offset1[6],offset1[6:0],offset0});
33769  // MEM[A] = MEM[A] & MEM[B].
33770  void
33772  {
33774  }
33775 
33777  : Inst_DS(iFmt, "ds_or_src2_b32")
33778  {
33779  } // Inst_DS__DS_OR_SRC2_B32
33780 
33782  {
33783  } // ~Inst_DS__DS_OR_SRC2_B32
33784 
33785  // A = ADDR_BASE;
33786  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33787  // {offset1[6],offset1[6:0],offset0});
33788  // MEM[A] = MEM[A] | MEM[B].
33789  void
33791  {
33793  }
33794 
33796  : Inst_DS(iFmt, "ds_xor_src2_b32")
33797  {
33798  } // Inst_DS__DS_XOR_SRC2_B32
33799 
33801  {
33802  } // ~Inst_DS__DS_XOR_SRC2_B32
33803 
33804  // A = ADDR_BASE;
33805  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33806  // {offset1[6],offset1[6:0],offset0});
33807  // MEM[A] = MEM[A] ^ MEM[B].
33808  void
33810  {
33812  }
33813 
33815  : Inst_DS(iFmt, "ds_write_src2_b32")
33816  {
33817  setFlag(MemoryRef);
33818  setFlag(Store);
33819  } // Inst_DS__DS_WRITE_SRC2_B32
33820 
33822  {
33823  } // ~Inst_DS__DS_WRITE_SRC2_B32
33824 
33825  // A = ADDR_BASE;
33826  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33827  // {offset1[6],offset1[6:0],offset0});
33828  // MEM[A] = MEM[B].
33829  // Write dword.
33830  void
33832  {
33834  }
33835 
33837  : Inst_DS(iFmt, "ds_min_src2_f32")
33838  {
33839  setFlag(F32);
33840  } // Inst_DS__DS_MIN_SRC2_F32
33841 
33843  {
33844  } // ~Inst_DS__DS_MIN_SRC2_F32
33845 
33846  // A = ADDR_BASE;
33847  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33848  // {offset1[6],offset1[6:0],offset0});
33849  // MEM[A] = (MEM[B] < MEM[A]) ? MEM[B] : MEM[A].
33850  void
33852  {
33854  }
33855 
33857  : Inst_DS(iFmt, "ds_max_src2_f32")
33858  {
33859  setFlag(F32);
33860  } // Inst_DS__DS_MAX_SRC2_F32
33861 
33863  {
33864  } // ~Inst_DS__DS_MAX_SRC2_F32
33865 
33866  // A = ADDR_BASE;
33867  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33868  // {offset1[6],offset1[6:0],offset0});
33869  // MEM[A] = (MEM[B] > MEM[A]) ? MEM[B] : MEM[A].
33870  void
33872  {
33874  }
33875 
33877  : Inst_DS(iFmt, "ds_add_src2_f32")
33878  {
33879  setFlag(F32);
33880  } // Inst_DS__DS_ADD_SRC2_F32
33881 
33883  {
33884  } // ~Inst_DS__DS_ADD_SRC2_F32
33885 
33886  // A = ADDR_BASE;
33887  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
33888  // {offset1[6],offset1[6:0],offset0});
33889  // MEM[A] = MEM[B] + MEM[A].
33890  void
33892  {
33894  }
33895 
33897  InFmt_DS *iFmt)
33898  : Inst_DS(iFmt, "ds_gws_sema_release_all")
33899  {
33900  } // Inst_DS__DS_GWS_SEMA_RELEASE_ALL
33901 
33903  {
33904  } // ~Inst_DS__DS_GWS_SEMA_RELEASE_ALL
33905 
33906  void
33908  {
33910  }
33911 
33913  : Inst_DS(iFmt, "ds_gws_init")
33914  {
33915  } // Inst_DS__DS_GWS_INIT
33916 
33918  {
33919  } // ~Inst_DS__DS_GWS_INIT
33920 
33921  void
33923  {
33925  }
33926 
33928  : Inst_DS(iFmt, "ds_gws_sema_v")
33929  {
33930  } // Inst_DS__DS_GWS_SEMA_V
33931 
33933  {
33934  } // ~Inst_DS__DS_GWS_SEMA_V
33935 
33936  void
33938  {
33940  }
33941 
33943  : Inst_DS(iFmt, "ds_gws_sema_br")
33944  {
33945  } // Inst_DS__DS_GWS_SEMA_BR
33946 
33948  {
33949  } // ~Inst_DS__DS_GWS_SEMA_BR
33950 
33951  void
33953  {
33955  }
33956 
33958  : Inst_DS(iFmt, "ds_gws_sema_p")
33959  {
33960  } // Inst_DS__DS_GWS_SEMA_P
33961 
33963  {
33964  } // ~Inst_DS__DS_GWS_SEMA_P
33965 
33966  void
33968  {
33970  }
33971 
33973  : Inst_DS(iFmt, "ds_gws_barrier")
33974  {
33975  } // Inst_DS__DS_GWS_BARRIER
33976 
33978  {
33979  } // ~Inst_DS__DS_GWS_BARRIER
33980 
33981  void
33983  {
33985  }
33986 
33988  : Inst_DS(iFmt, "ds_consume")
33989  {
33990  } // Inst_DS__DS_CONSUME
33991 
33993  {
33994  } // ~Inst_DS__DS_CONSUME
33995 
33996  void
33998  {
34000  }
34001 
34003  : Inst_DS(iFmt, "ds_append")
34004  {
34005  } // Inst_DS__DS_APPEND
34006 
34008  {
34009  } // ~Inst_DS__DS_APPEND
34010 
34011  void
34013  {
34015  }
34016 
34018  : Inst_DS(iFmt, "ds_ordered_count")
34019  {
34020  } // Inst_DS__DS_ORDERED_COUNT
34021 
34023  {
34024  } // ~Inst_DS__DS_ORDERED_COUNT
34025 
34026  void
34028  {
34030  }
34031 
34033  : Inst_DS(iFmt, "ds_add_src2_u64")
34034  {
34035  } // Inst_DS__DS_ADD_SRC2_U64
34036 
34038  {
34039  } // ~Inst_DS__DS_ADD_SRC2_U64
34040 
34041  // A = ADDR_BASE;
34042  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34043  // {offset1[6],offset1[6:0],offset0});
34044  // MEM[A] = MEM[A] + MEM[B].
34045  void
34047  {
34049  }
34050 
34052  : Inst_DS(iFmt, "ds_sub_src2_u64")
34053  {
34054  } // Inst_DS__DS_SUB_SRC2_U64
34055 
34057  {
34058  } // ~Inst_DS__DS_SUB_SRC2_U64
34059 
34060  // A = ADDR_BASE;
34061  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34062  // {offset1[6],offset1[6:0],offset0});
34063  // MEM[A] = MEM[A] - MEM[B].
34064  void
34066  {
34068  }
34069 
34071  : Inst_DS(iFmt, "ds_rsub_src2_u64")
34072  {
34073  } // Inst_DS__DS_RSUB_SRC2_U64
34074 
34076  {
34077  } // ~Inst_DS__DS_RSUB_SRC2_U64
34078 
34079  // A = ADDR_BASE;
34080  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34081  // {offset1[6],offset1[6:0],offset0});
34082  // MEM[A] = MEM[B] - MEM[A].
34083  void
34085  {
34087  }
34088 
34090  : Inst_DS(iFmt, "ds_inc_src2_u64")
34091  {
34092  } // Inst_DS__DS_INC_SRC2_U64
34093 
34095  {
34096  } // ~Inst_DS__DS_INC_SRC2_U64
34097 
34098  // A = ADDR_BASE;
34099  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34100  // {offset1[6],offset1[6:0],offset0});
34101  // MEM[A] = (MEM[A] >= MEM[B] ? 0 : MEM[A] + 1).
34102  void
34104  {
34106  }
34107 
34109  : Inst_DS(iFmt, "ds_dec_src2_u64")
34110  {
34111  } // Inst_DS__DS_DEC_SRC2_U64
34112 
34114  {
34115  } // ~Inst_DS__DS_DEC_SRC2_U64
34116 
34117  // A = ADDR_BASE;
34118  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34119  // {offset1[6],offset1[6:0],offset0});
34120  // MEM[A] = (MEM[A] == 0 || MEM[A] > MEM[B] ? MEM[B] : MEM[A] - 1).
34121  // Uint decrement.
34122  void
34124  {
34126  }
34127 
34129  : Inst_DS(iFmt, "ds_min_src2_i64")
34130  {
34131  } // Inst_DS__DS_MIN_SRC2_I64
34132 
34134  {
34135  } // ~Inst_DS__DS_MIN_SRC2_I64
34136 
34137  // A = ADDR_BASE;
34138  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34139  // {offset1[6],offset1[6:0],offset0});
34140  // MEM[A] = min(MEM[A], MEM[B]).
34141  void
34143  {
34145  }
34146 
34148  : Inst_DS(iFmt, "ds_max_src2_i64")
34149  {
34150  } // Inst_DS__DS_MAX_SRC2_I64
34151 
34153  {
34154  } // ~Inst_DS__DS_MAX_SRC2_I64
34155 
34156  // A = ADDR_BASE;
34157  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34158  // {offset1[6],offset1[6:0],offset0});
34159  // MEM[A] = max(MEM[A], MEM[B]).
34160  void
34162  {
34164  }
34165 
34167  : Inst_DS(iFmt, "ds_min_src2_u64")
34168  {
34169  } // Inst_DS__DS_MIN_SRC2_U64
34170 
34172  {
34173  } // ~Inst_DS__DS_MIN_SRC2_U64
34174 
34175  // A = ADDR_BASE;
34176  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34177  // {offset1[6],offset1[6:0],offset0});
34178  // MEM[A] = min(MEM[A], MEM[B]).
34179  void
34181  {
34183  }
34184 
34186  : Inst_DS(iFmt, "ds_max_src2_u64")
34187  {
34188  } // Inst_DS__DS_MAX_SRC2_U64
34189 
34191  {
34192  } // ~Inst_DS__DS_MAX_SRC2_U64
34193 
34194  // A = ADDR_BASE;
34195  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34196  // {offset1[6],offset1[6:0],offset0});
34197  // MEM[A] = max(MEM[A], MEM[B]).
34198  void
34200  {
34202  }
34203 
34205  : Inst_DS(iFmt, "ds_and_src2_b64")
34206  {
34207  } // Inst_DS__DS_AND_SRC2_B64
34208 
34210  {
34211  } // ~Inst_DS__DS_AND_SRC2_B64
34212 
34213  // A = ADDR_BASE;
34214  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34215  // {offset1[6],offset1[6:0],offset0});
34216  // MEM[A] = MEM[A] & MEM[B].
34217  void
34219  {
34221  }
34222 
34224  : Inst_DS(iFmt, "ds_or_src2_b64")
34225  {
34226  } // Inst_DS__DS_OR_SRC2_B64
34227 
34229  {
34230  } // ~Inst_DS__DS_OR_SRC2_B64
34231 
34232  // A = ADDR_BASE;
34233  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34234  // {offset1[6],offset1[6:0],offset0});
34235  // MEM[A] = MEM[A] | MEM[B].
34236  void
34238  {
34240  }
34241 
34243  : Inst_DS(iFmt, "ds_xor_src2_b64")
34244  {
34245  } // Inst_DS__DS_XOR_SRC2_B64
34246 
34248  {
34249  } // ~Inst_DS__DS_XOR_SRC2_B64
34250 
34251  // A = ADDR_BASE;
34252  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34253  // {offset1[6],offset1[6:0],offset0});
34254  // MEM[A] = MEM[A] ^ MEM[B].
34255  void
34257  {
34259  }
34260 
34262  : Inst_DS(iFmt, "ds_write_src2_b64")
34263  {
34264  setFlag(MemoryRef);
34265  setFlag(Store);
34266  } // Inst_DS__DS_WRITE_SRC2_B64
34267 
34269  {
34270  } // ~Inst_DS__DS_WRITE_SRC2_B64
34271 
34272  // A = ADDR_BASE;
34273  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34274  // {offset1[6],offset1[6:0],offset0});
34275  // MEM[A] = MEM[B].
34276  // Write qword.
34277  void
34279  {
34281  }
34282 
34284  : Inst_DS(iFmt, "ds_min_src2_f64")
34285  {
34286  setFlag(F64);
34287  } // Inst_DS__DS_MIN_SRC2_F64
34288 
34290  {
34291  } // ~Inst_DS__DS_MIN_SRC2_F64
34292 
34293  // A = ADDR_BASE;
34294  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34295  // {offset1[6],offset1[6:0],offset0});
34296  // MEM[A] = (MEM[B] < MEM[A]) ? MEM[B] : MEM[A].
34297  void
34299  {
34301  }
34302 
34304  : Inst_DS(iFmt, "ds_max_src2_f64")
34305  {
34306  setFlag(F64);
34307  } // Inst_DS__DS_MAX_SRC2_F64
34308 
34310  {
34311  } // ~Inst_DS__DS_MAX_SRC2_F64
34312 
34313  // A = ADDR_BASE;
34314  // B = A + 4*(offset1[7] ? {A[31],A[31:17]} :
34315  // {offset1[6],offset1[6:0],offset0});
34316  // MEM[A] = (MEM[B] > MEM[A]) ? MEM[B] : MEM[A].
34317  void
34319  {
34321  }
34322 
34324  : Inst_DS(iFmt, "ds_write_b96")
34325  {
34326  setFlag(MemoryRef);
34327  setFlag(Store);
34328  } // Inst_DS__DS_WRITE_B96
34329 
34331  {
34332  } // ~Inst_DS__DS_WRITE_B96
34333 
34334  // {MEM[ADDR + 8], MEM[ADDR + 4], MEM[ADDR]} = DATA[95:0].
34335  // Tri-dword write.
34336  void
34338  {
34339  Wavefront *wf = gpuDynInst->wavefront();
34340  gpuDynInst->execUnitId = wf->execUnitId;
34341  gpuDynInst->latency.init(gpuDynInst->computeUnit());
34342  gpuDynInst->latency.set(
34343  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
34344  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
34345  ConstVecOperandU32 data0(gpuDynInst, extData.DATA0);
34346  ConstVecOperandU32 data1(gpuDynInst, extData.DATA0 + 1);
34347  ConstVecOperandU32 data2(gpuDynInst, extData.DATA0 + 2);
34348 
34349  addr.read();
34350  data0.read();
34351  data1.read();
34352  data2.read();
34353 
34354  calcAddr(gpuDynInst, addr);
34355 
34356  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
34357  if (gpuDynInst->exec_mask[lane]) {
34358  (reinterpret_cast<VecElemU32*>(
34359  gpuDynInst->d_data))[lane * 4] = data0[lane];
34360  (reinterpret_cast<VecElemU32*>(
34361  gpuDynInst->d_data))[lane * 4 + 1] = data1[lane];
34362  (reinterpret_cast<VecElemU32*>(
34363  gpuDynInst->d_data))[lane * 4 + 2] = data2[lane];
34364  }
34365  }
34366 
34367  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
34368  }
34369 
34370  void
34372  {
34373  Addr offset0 = instData.OFFSET0;
34374  Addr offset1 = instData.OFFSET1;
34375  Addr offset = (offset1 << 8) | offset0;
34376 
34377  initMemWrite<3>(gpuDynInst, offset);
34378  } // initiateAcc
34379 
34380  void
34382  {
34383  } // completeAcc
34384 
34386  : Inst_DS(iFmt, "ds_write_b128")
34387  {
34388  setFlag(MemoryRef);
34389  setFlag(Store);
34390  } // Inst_DS__DS_WRITE_B128
34391 
34393  {
34394  } // ~Inst_DS__DS_WRITE_B128
34395 
34396  // {MEM[ADDR + 12], MEM[ADDR + 8], MEM[ADDR + 4], MEM[ADDR]} = DATA[127:0].
34397  // Qword write.
34398  void
34400  {
34401  Wavefront *wf = gpuDynInst->wavefront();
34402  gpuDynInst->execUnitId = wf->execUnitId;
34403  gpuDynInst->latency.init(gpuDynInst->computeUnit());
34404  gpuDynInst->latency.set(
34405  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
34406  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
34407  ConstVecOperandU32 data0(gpuDynInst, extData.DATA0);
34408  ConstVecOperandU32 data1(gpuDynInst, extData.DATA0 + 1);
34409  ConstVecOperandU32 data2(gpuDynInst, extData.DATA0 + 2);
34410  ConstVecOperandU32 data3(gpuDynInst, extData.DATA0 + 3);
34411 
34412  addr.read();
34413  data0.read();
34414  data1.read();
34415  data2.read();
34416  data3.read();
34417 
34418  calcAddr(gpuDynInst, addr);
34419 
34420  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
34421  if (gpuDynInst->exec_mask[lane]) {
34422  (reinterpret_cast<VecElemU32*>(
34423  gpuDynInst->d_data))[lane * 4] = data0[lane];
34424  (reinterpret_cast<VecElemU32*>(
34425  gpuDynInst->d_data))[lane * 4 + 1] = data1[lane];
34426  (reinterpret_cast<VecElemU32*>(
34427  gpuDynInst->d_data))[lane * 4 + 2] = data2[lane];
34428  (reinterpret_cast<VecElemU32*>(
34429  gpuDynInst->d_data))[lane * 4 + 3] = data3[lane];
34430  }
34431  }
34432 
34433  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
34434  }
34435 
34436  void
34438  {
34439  Addr offset0 = instData.OFFSET0;
34440  Addr offset1 = instData.OFFSET1;
34441  Addr offset = (offset1 << 8) | offset0;
34442 
34443  initMemWrite<4>(gpuDynInst, offset);
34444  } // initiateAcc
34445 
34446  void
34448  {
34449  } // completeAcc
34450 
34452  : Inst_DS(iFmt, "ds_read_b96")
34453  {
34454  setFlag(MemoryRef);
34455  setFlag(Load);
34456  } // Inst_DS__DS_READ_B96
34457 
34459  {
34460  } // ~Inst_DS__DS_READ_B96
34461 
34462  // Tri-dword read.
34463  void
34465  {
34466  Wavefront *wf = gpuDynInst->wavefront();
34467  gpuDynInst->execUnitId = wf->execUnitId;
34468  gpuDynInst->latency.init(gpuDynInst->computeUnit());
34469  gpuDynInst->latency.set(
34470  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
34471  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
34472 
34473  addr.read();
34474 
34475  calcAddr(gpuDynInst, addr);
34476 
34477  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
34478  }
34479 
34480  void
34482  {
34483  Addr offset0 = instData.OFFSET0;
34484  Addr offset1 = instData.OFFSET1;
34485  Addr offset = (offset1 << 8) | offset0;
34486 
34487  initMemRead<3>(gpuDynInst, offset);
34488  }
34489 
34490  void
34492  {
34493  VecOperandU32 vdst0(gpuDynInst, extData.VDST);
34494  VecOperandU32 vdst1(gpuDynInst, extData.VDST + 1);
34495  VecOperandU32 vdst2(gpuDynInst, extData.VDST + 2);
34496 
34497  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
34498  if (gpuDynInst->exec_mask[lane]) {
34499  vdst0[lane] = (reinterpret_cast<VecElemU32*>(
34500  gpuDynInst->d_data))[lane * 4];
34501  vdst1[lane] = (reinterpret_cast<VecElemU32*>(
34502  gpuDynInst->d_data))[lane * 4 + 1];
34503  vdst2[lane] = (reinterpret_cast<VecElemU32*>(
34504  gpuDynInst->d_data))[lane * 4 + 2];
34505  }
34506  }
34507 
34508  vdst0.write();
34509  vdst1.write();
34510  vdst2.write();
34511  }
34512 
34514  : Inst_DS(iFmt, "ds_read_b128")
34515  {
34516  setFlag(MemoryRef);
34517  setFlag(Load);
34518  } // Inst_DS__DS_READ_B128
34519 
34521  {
34522  } // ~Inst_DS__DS_READ_B128
34523 
34524  // Qword read.
34525  void
34527  {
34528  Wavefront *wf = gpuDynInst->wavefront();
34529  gpuDynInst->execUnitId = wf->execUnitId;
34530  gpuDynInst->latency.init(gpuDynInst->computeUnit());
34531  gpuDynInst->latency.set(
34532  gpuDynInst->computeUnit()->cyclesToTicks(Cycles(24)));
34533  ConstVecOperandU32 addr(gpuDynInst, extData.ADDR);
34534 
34535  addr.read();
34536 
34537  calcAddr(gpuDynInst, addr);
34538 
34539  gpuDynInst->computeUnit()->localMemoryPipe.issueRequest(gpuDynInst);
34540  }
34541 
34542  void
34544  {
34545  Addr offset0 = instData.OFFSET0;
34546  Addr offset1 = instData.OFFSET1;
34547  Addr offset = (offset1 << 8) | offset0;
34548 
34549  initMemRead<4>(gpuDynInst, offset);
34550  } // initiateAcc
34551 
34552  void
34554  {
34555  VecOperandU32 vdst0(gpuDynInst, extData.VDST);
34556  VecOperandU32 vdst1(gpuDynInst, extData.VDST + 1);
34557  VecOperandU32 vdst2(gpuDynInst, extData.VDST + 2);
34558  VecOperandU32 vdst3(gpuDynInst, extData.VDST + 3);
34559 
34560  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
34561  if (gpuDynInst->exec_mask[lane]) {
34562  vdst0[lane] = (reinterpret_cast<VecElemU32*>(
34563  gpuDynInst->d_data))[lane * 4];
34564  vdst1[lane] = (reinterpret_cast<VecElemU32*>(
34565  gpuDynInst->d_data))[lane * 4 + 1];
34566  vdst2[lane] = (reinterpret_cast<VecElemU32*>(
34567  gpuDynInst->d_data))[lane * 4 + 2];
34568  vdst3[lane] = (reinterpret_cast<VecElemU32*>(
34569  gpuDynInst->d_data))[lane * 4 + 3];
34570  }
34571  }
34572 
34573  vdst0.write();
34574  vdst1.write();
34575  vdst2.write();
34576  vdst3.write();
34577  } // completeAcc
34578 
34581  : Inst_MUBUF(iFmt, "buffer_load_format_x")
34582  {
34583  setFlag(MemoryRef);
34584  setFlag(Load);
34585  setFlag(GlobalSegment);
34586  } // Inst_MUBUF__BUFFER_LOAD_FORMAT_X
34587 
34589  {
34590  } // ~Inst_MUBUF__BUFFER_LOAD_FORMAT_X
34591 
34592  // Untyped buffer load 1 dword with format conversion.
34593  void
34595  {
34597  }
34598 
34599  void
34601  {
34602  } // initiateAcc
34603 
34604  void
34606  {
34607  }
34608 
34611  : Inst_MUBUF(iFmt, "buffer_load_format_xy")
34612  {
34613  setFlag(MemoryRef);
34614  setFlag(Load);
34615  setFlag(GlobalSegment);
34616  } // Inst_MUBUF__BUFFER_LOAD_FORMAT_XY
34617 
34619  {
34620  } // ~Inst_MUBUF__BUFFER_LOAD_FORMAT_XY
34621 
34622  // Untyped buffer load 2 dwords with format conversion.
34623  void
34625  {
34627  }
34628 
34629  void
34631  {
34632  } // initiateAcc
34633 
34634  void
34636  {
34637  }
34638 
34641  : Inst_MUBUF(iFmt, "buffer_load_format_xyz")
34642  {
34643  setFlag(MemoryRef);
34644  setFlag(Load);
34645  setFlag(GlobalSegment);
34646  } // Inst_MUBUF__BUFFER_LOAD_FORMAT_XYZ
34647 
34649  {
34650  } // ~Inst_MUBUF__BUFFER_LOAD_FORMAT_XYZ
34651 
34652  // Untyped buffer load 3 dwords with format conversion.
34653  void
34655  {
34657  }
34658 
34659  void
34661  {
34662  } // initiateAcc
34663 
34664  void
34666  {
34667  }
34668 
34671  : Inst_MUBUF(iFmt, "buffer_load_format_xyzw")
34672  {
34673  setFlag(MemoryRef);
34674  setFlag(Load);
34675  setFlag(GlobalSegment);
34676  } // Inst_MUBUF__BUFFER_LOAD_FORMAT_XYZW
34677 
34679  {
34680  } // ~Inst_MUBUF__BUFFER_LOAD_FORMAT_XYZW
34681 
34682  // Untyped buffer load 4 dwords with format conversion.
34683  void
34685  {
34687  }
34688 
34689  void
34691  {
34692  } // initiateAcc
34693 
34694  void
34696  {
34697  }
34698 
34701  : Inst_MUBUF(iFmt, "buffer_store_format_x")
34702  {
34703  setFlag(MemoryRef);
34704  setFlag(Store);
34705  setFlag(GlobalSegment);
34706  } // Inst_MUBUF__BUFFER_STORE_FORMAT_X
34707 
34709  {
34710  } // ~Inst_MUBUF__BUFFER_STORE_FORMAT_X
34711 
34712  // Untyped buffer store 1 dword with format conversion.
34713  void
34715  {
34717  }
34718 
34719  void
34721  {
34722  } // initiateAcc
34723 
34724  void
34726  {
34727  }
34728 
34731  : Inst_MUBUF(iFmt, "buffer_store_format_xy")
34732  {
34733  setFlag(MemoryRef);
34734  setFlag(Store);
34735  setFlag(GlobalSegment);
34736  } // Inst_MUBUF__BUFFER_STORE_FORMAT_XY
34737 
34739  {
34740  } // ~Inst_MUBUF__BUFFER_STORE_FORMAT_XY
34741 
34742  // Untyped buffer store 2 dwords with format conversion.
34743  void
34745  {
34747  }
34748 
34749  void
34751  {
34752  } // initiateAcc
34753 
34754  void
34756  {
34757  }
34758 
34761  : Inst_MUBUF(iFmt, "buffer_store_format_xyz")
34762  {
34763  setFlag(MemoryRef);
34764  setFlag(Store);
34765  setFlag(GlobalSegment);
34766  } // Inst_MUBUF__BUFFER_STORE_FORMAT_XYZ
34767 
34769  {
34770  } // ~Inst_MUBUF__BUFFER_STORE_FORMAT_XYZ
34771 
34772  // Untyped buffer store 3 dwords with format conversion.
34773  void
34775  {
34777  }
34778 
34779  void
34781  {
34782  } // initiateAcc
34783 
34784  void
34786  {
34787  }
34788 
34791  : Inst_MUBUF(iFmt, "buffer_store_format_xyzw")
34792  {
34793  setFlag(MemoryRef);
34794  setFlag(Store);
34795  setFlag(GlobalSegment);
34796  } // Inst_MUBUF__BUFFER_STORE_FORMAT_XYZW
34797 
34800  {
34801  } // ~Inst_MUBUF__BUFFER_STORE_FORMAT_XYZW
34802 
34803  // Untyped buffer store 4 dwords with format conversion.
34804  void
34806  {
34808  }
34809 
34810  void
34812  {
34813  } // initiateAcc
34814 
34815  void
34817  {
34818  }
34819 
34822  : Inst_MUBUF(iFmt, "buffer_load_format_d16_x")
34823  {
34824  setFlag(MemoryRef);
34825  setFlag(Load);
34826  setFlag(GlobalSegment);
34827  } // Inst_MUBUF__BUFFER_LOAD_FORMAT_D16_X
34828 
34831  {
34832  } // ~Inst_MUBUF__BUFFER_LOAD_FORMAT_D16_X
34833 
34834  // Untyped buffer load 1 dword with format conversion.
34835  void
34837  {
34839  }
34840 
34841  void
34843  {
34844  } // initiateAcc
34845 
34846  void
34848  {
34849  }
34850 
34853  : Inst_MUBUF(iFmt, "buffer_load_format_d16_xy")
34854  {
34855  setFlag(MemoryRef);
34856  setFlag(Load);
34857  setFlag(GlobalSegment);
34858  } // Inst_MUBUF__BUFFER_LOAD_FORMAT_D16_XY
34859 
34862  {
34863  } // ~Inst_MUBUF__BUFFER_LOAD_FORMAT_D16_XY
34864 
34865  // Untyped buffer load 2 dwords with format conversion.
34866  void
34868  {
34870  }
34871 
34872  void
34874  GPUDynInstPtr gpuDynInst)
34875  {
34876  } // initiateAcc
34877 
34878  void
34880  GPUDynInstPtr gpuDynInst)
34881  {
34882  }
34883 
34886  : Inst_MUBUF(iFmt, "buffer_load_format_d16_xyz")
34887  {
34888  setFlag(MemoryRef);
34889  setFlag(Load);
34890  setFlag(GlobalSegment);
34891  } // Inst_MUBUF__BUFFER_LOAD_FORMAT_D16_XYZ
34892 
34895  {
34896  } // ~Inst_MUBUF__BUFFER_LOAD_FORMAT_D16_XYZ
34897 
34898  // Untyped buffer load 3 dwords with format conversion.
34899  void
34901  {
34903  }
34904 
34905  void
34907  GPUDynInstPtr gpuDynInst)
34908  {
34909  } // initiateAcc
34910 
34911  void
34913  GPUDynInstPtr gpuDynInst)
34914  {
34915  }
34916 
34919  : Inst_MUBUF(iFmt, "buffer_load_format_d16_xyzw")
34920  {
34921  setFlag(MemoryRef);
34922  setFlag(Load);
34923  setFlag(GlobalSegment);
34924  } // Inst_MUBUF__BUFFER_LOAD_FORMAT_D16_XYZW
34925 
34928  {
34929  } // ~Inst_MUBUF__BUFFER_LOAD_FORMAT_D16_XYZW
34930 
34931  // Untyped buffer load 4 dwords with format conversion.
34932  void
34934  {
34936  }
34937 
34938  void
34940  GPUDynInstPtr gpuDynInst)
34941  {
34942  } // initiateAcc
34943 
34944  void
34946  GPUDynInstPtr gpuDynInst)
34947  {
34948  }
34949 
34952  : Inst_MUBUF(iFmt, "buffer_store_format_d16_x")
34953  {
34954  setFlag(MemoryRef);
34955  setFlag(Store);
34956  setFlag(GlobalSegment);
34957  } // Inst_MUBUF__BUFFER_STORE_FORMAT_D16_X
34958 
34961  {
34962  } // ~Inst_MUBUF__BUFFER_STORE_FORMAT_D16_X
34963 
34964  // Untyped buffer store 1 dword with format conversion.
34965  void
34967  {
34969  }
34970 
34971  void
34973  GPUDynInstPtr gpuDynInst)
34974  {
34975  } // initiateAcc
34976 
34977  void
34979  GPUDynInstPtr gpuDynInst)
34980  {
34981  }
34982 
34985  : Inst_MUBUF(iFmt, "buffer_store_format_d16_xy")
34986  {
34987  setFlag(MemoryRef);
34988  setFlag(Store);
34989  setFlag(GlobalSegment);
34990  } // Inst_MUBUF__BUFFER_STORE_FORMAT_D16_XY
34991 
34994  {
34995  } // ~Inst_MUBUF__BUFFER_STORE_FORMAT_D16_XY
34996 
34997  // Untyped buffer store 2 dwords with format conversion.
34998  void
35000  {
35002  }
35003 
35004  void
35006  GPUDynInstPtr gpuDynInst)
35007  {
35008  } // initiateAcc
35009 
35010  void
35012  GPUDynInstPtr gpuDynInst)
35013  {
35014  }
35015 
35018  : Inst_MUBUF(iFmt, "buffer_store_format_d16_xyz")
35019  {
35020  setFlag(MemoryRef);
35021  setFlag(Store);
35022  setFlag(GlobalSegment);
35023  } // Inst_MUBUF__BUFFER_STORE_FORMAT_D16_XYZ
35024 
35027  {
35028  } // ~Inst_MUBUF__BUFFER_STORE_FORMAT_D16_XYZ
35029 
35030  // Untyped buffer store 3 dwords with format conversion.
35031  void
35033  {
35035  }
35036 
35037  void
35039  GPUDynInstPtr gpuDynInst)
35040  {
35041  } // initiateAcc
35042 
35043  void
35045  GPUDynInstPtr gpuDynInst)
35046  {
35047  }
35048 
35051  : Inst_MUBUF(iFmt, "buffer_store_format_d16_xyzw")
35052  {
35053  setFlag(MemoryRef);
35054  setFlag(Store);
35055  setFlag(GlobalSegment);
35056  } // Inst_MUBUF__BUFFER_STORE_FORMAT_D16_XYZW
35057 
35060  {
35061  } // ~Inst_MUBUF__BUFFER_STORE_FORMAT_D16_XYZW
35062 
35063  // Untyped buffer store 4 dwords with format conversion.
35064  void
35066  {
35068  }
35069 
35070  void
35072  GPUDynInstPtr gpuDynInst)
35073  {
35074  } // initiateAcc
35075 
35076  void
35078  GPUDynInstPtr gpuDynInst)
35079  {
35080  }
35081 
35084  : Inst_MUBUF(iFmt, "buffer_load_ubyte")
35085  {
35086  setFlag(MemoryRef);
35087  setFlag(Load);
35088  if (instData.LDS) {
35089  setFlag(GroupSegment);
35090  } else {
35091  setFlag(GlobalSegment);
35092  }
35093  } // Inst_MUBUF__BUFFER_LOAD_UBYTE
35094 
35096  {
35097  } // ~Inst_MUBUF__BUFFER_LOAD_UBYTE
35098 
35099  // Untyped buffer load unsigned byte (zero extend to VGPR destination).
35100  void
35102  {
35103  Wavefront *wf = gpuDynInst->wavefront();
35104  gpuDynInst->execUnitId = wf->execUnitId;
35105  gpuDynInst->latency.init(gpuDynInst->computeUnit());
35106  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
35107 
35108  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
35109  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
35110  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
35112 
35113  rsrcDesc.read();
35114  offset.read();
35115 
35116  int inst_offset = instData.OFFSET;
35117 
35118  if (!instData.IDXEN && !instData.OFFEN) {
35121  addr0, addr1, rsrcDesc, offset, inst_offset);
35122  } else if (!instData.IDXEN && instData.OFFEN) {
35123  addr0.read();
35126  addr0, addr1, rsrcDesc, offset, inst_offset);
35127  } else if (instData.IDXEN && !instData.OFFEN) {
35128  addr0.read();
35131  addr1, addr0, rsrcDesc, offset, inst_offset);
35132  } else {
35133  addr0.read();
35134  addr1.read();
35137  addr1, addr0, rsrcDesc, offset, inst_offset);
35138  }
35139 
35140  if (isLocalMem()) {
35141  gpuDynInst->computeUnit()->localMemoryPipe.
35142  issueRequest(gpuDynInst);
35143  } else {
35144  gpuDynInst->computeUnit()->globalMemoryPipe.
35145  issueRequest(gpuDynInst);
35146  }
35147  }
35148 
35149  void
35151  {
35152  initMemRead<VecElemU8>(gpuDynInst);
35153  } // initiateAcc
35154 
35155  void
35157  {
35158  VecOperandU32 vdst(gpuDynInst, extData.VDATA);
35159 
35160  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
35161  if (gpuDynInst->exec_mask[lane]) {
35162  if (!oobMask[lane]) {
35163  vdst[lane] = (VecElemU32)((reinterpret_cast<VecElemU8*>(
35164  gpuDynInst->d_data))[lane]);
35165  } else {
35166  vdst[lane] = 0;
35167  }
35168  }
35169  }
35170 
35171  vdst.write();
35172  }
35173 
35174 
35177  : Inst_MUBUF(iFmt, "buffer_load_sbyte")
35178  {
35179  setFlag(MemoryRef);
35180  setFlag(Load);
35181  setFlag(GlobalSegment);
35182  } // Inst_MUBUF__BUFFER_LOAD_SBYTE
35183 
35185  {
35186  } // ~Inst_MUBUF__BUFFER_LOAD_SBYTE
35187 
35188  // Untyped buffer load signed byte (sign extend to VGPR destination).
35189  void
35191  {
35193  }
35194 
35195  void
35197  {
35198  } // initiateAcc
35199 
35200  void
35202  {
35203  }
35204 
35207  : Inst_MUBUF(iFmt, "buffer_load_ushort")
35208  {
35209  setFlag(MemoryRef);
35210  setFlag(Load);
35211  if (instData.LDS) {
35212  setFlag(GroupSegment);
35213  } else {
35214  setFlag(GlobalSegment);
35215  }
35216  } // Inst_MUBUF__BUFFER_LOAD_USHORT
35217 
35219  {
35220  } // ~Inst_MUBUF__BUFFER_LOAD_USHORT
35221 
35222  // Untyped buffer load unsigned short (zero extend to VGPR destination).
35223  void
35225  {
35226  Wavefront *wf = gpuDynInst->wavefront();
35227  gpuDynInst->execUnitId = wf->execUnitId;
35228  gpuDynInst->latency.init(gpuDynInst->computeUnit());
35229  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
35230 
35231  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
35232  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
35233  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
35235 
35236  rsrcDesc.read();
35237  offset.read();
35238 
35239  int inst_offset = instData.OFFSET;
35240 
35241  if (!instData.IDXEN && !instData.OFFEN) {
35244  addr0, addr1, rsrcDesc, offset, inst_offset);
35245  } else if (!instData.IDXEN && instData.OFFEN) {
35246  addr0.read();
35249  addr0, addr1, rsrcDesc, offset, inst_offset);
35250  } else if (instData.IDXEN && !instData.OFFEN) {
35251  addr0.read();
35254  addr1, addr0, rsrcDesc, offset, inst_offset);
35255  } else {
35256  addr0.read();
35257  addr1.read();
35260  addr1, addr0, rsrcDesc, offset, inst_offset);
35261  }
35262 
35263  if (isLocalMem()) {
35264  gpuDynInst->computeUnit()->localMemoryPipe
35265  .issueRequest(gpuDynInst);
35266  } else {
35267  gpuDynInst->computeUnit()->globalMemoryPipe
35268  .issueRequest(gpuDynInst);
35269  }
35270  }
35271 
35272  void
35274  {
35275  initMemRead<VecElemU16>(gpuDynInst);
35276  } // initiateAcc
35277 
35278  void
35280  {
35281  VecOperandU32 vdst(gpuDynInst, extData.VDATA);
35282 
35283  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
35284  if (gpuDynInst->exec_mask[lane]) {
35285  if (!oobMask[lane]) {
35286  vdst[lane] = (VecElemU32)((reinterpret_cast<VecElemU16*>(
35287  gpuDynInst->d_data))[lane]);
35288  } else {
35289  vdst[lane] = 0;
35290  }
35291  }
35292  }
35293 
35294  vdst.write();
35295  }
35296 
35297 
35300  : Inst_MUBUF(iFmt, "buffer_load_sshort")
35301  {
35302  setFlag(MemoryRef);
35303  setFlag(Load);
35304  setFlag(GlobalSegment);
35305  } // Inst_MUBUF__BUFFER_LOAD_SSHORT
35306 
35308  {
35309  } // ~Inst_MUBUF__BUFFER_LOAD_SSHORT
35310 
35311  // Untyped buffer load signed short (sign extend to VGPR destination).
35312  void
35314  {
35316  }
35317 
35318  void
35320  {
35321  } // initiateAcc
35322 
35323  void
35325  {
35326  }
35327 
35330  : Inst_MUBUF(iFmt, "buffer_load_dword")
35331  {
35332  setFlag(MemoryRef);
35333  setFlag(Load);
35334  if (instData.LDS) {
35335  setFlag(GroupSegment);
35336  } else {
35337  setFlag(GlobalSegment);
35338  }
35339  } // Inst_MUBUF__BUFFER_LOAD_DWORD
35340 
35342  {
35343  } // ~Inst_MUBUF__BUFFER_LOAD_DWORD
35344 
35345  // Untyped buffer load dword.
35346  void
35348  {
35349  Wavefront *wf = gpuDynInst->wavefront();
35350  gpuDynInst->execUnitId = wf->execUnitId;
35351  gpuDynInst->latency.init(gpuDynInst->computeUnit());
35352  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
35353 
35354  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
35355  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
35356  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
35358 
35359  rsrcDesc.read();
35360  offset.read();
35361 
35362  int inst_offset = instData.OFFSET;
35363 
35364  if (!instData.IDXEN && !instData.OFFEN) {
35367  addr0, addr1, rsrcDesc, offset, inst_offset);
35368  } else if (!instData.IDXEN && instData.OFFEN) {
35369  addr0.read();
35372  addr0, addr1, rsrcDesc, offset, inst_offset);
35373  } else if (instData.IDXEN && !instData.OFFEN) {
35374  addr0.read();
35377  addr1, addr0, rsrcDesc, offset, inst_offset);
35378  } else {
35379  addr0.read();
35380  addr1.read();
35383  addr1, addr0, rsrcDesc, offset, inst_offset);
35384  }
35385 
35386  if (isLocalMem()) {
35387  gpuDynInst->computeUnit()->localMemoryPipe
35388  .issueRequest(gpuDynInst);
35389  } else {
35390  gpuDynInst->computeUnit()->globalMemoryPipe
35391  .issueRequest(gpuDynInst);
35392  }
35393  }
35394 
35395  void
35397  {
35398  initMemRead<VecElemU32>(gpuDynInst);
35399  } // initiateAcc
35400 
35401  void
35403  {
35404  VecOperandU32 vdst(gpuDynInst, extData.VDATA);
35405 
35406  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
35407  if (gpuDynInst->exec_mask[lane]) {
35408  if (!oobMask[lane]) {
35409  vdst[lane] = (reinterpret_cast<VecElemU32*>(
35410  gpuDynInst->d_data))[lane];
35411  } else {
35412  vdst[lane] = 0;
35413  }
35414  }
35415  }
35416 
35417  vdst.write();
35418  } // completeAcc
35419 
35422  : Inst_MUBUF(iFmt, "buffer_load_dwordx2")
35423  {
35424  setFlag(MemoryRef);
35425  setFlag(Load);
35426  if (instData.LDS) {
35427  setFlag(GroupSegment);
35428  } else {
35429  setFlag(GlobalSegment);
35430  }
35431  } // Inst_MUBUF__BUFFER_LOAD_DWORDX2
35432 
35434  {
35435  } // ~Inst_MUBUF__BUFFER_LOAD_DWORDX2
35436 
35437  // Untyped buffer load 2 dwords.
35438  void
35440  {
35441  Wavefront *wf = gpuDynInst->wavefront();
35442  gpuDynInst->execUnitId = wf->execUnitId;
35443  gpuDynInst->latency.init(gpuDynInst->computeUnit());
35444  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
35445 
35446  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
35447  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
35448  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
35450 
35451  rsrcDesc.read();
35452  offset.read();
35453 
35454  int inst_offset = instData.OFFSET;
35455 
35456  if (!instData.IDXEN && !instData.OFFEN) {
35459  addr0, addr1, rsrcDesc, offset, inst_offset);
35460  } else if (!instData.IDXEN && instData.OFFEN) {
35461  addr0.read();
35464  addr0, addr1, rsrcDesc, offset, inst_offset);
35465  } else if (instData.IDXEN && !instData.OFFEN) {
35466  addr0.read();
35469  addr1, addr0, rsrcDesc, offset, inst_offset);
35470  } else {
35471  addr0.read();
35472  addr1.read();
35475  addr1, addr0, rsrcDesc, offset, inst_offset);
35476  }
35477 
35478  if (isLocalMem()) {
35479  gpuDynInst->computeUnit()->localMemoryPipe
35480  .issueRequest(gpuDynInst);
35481  } else {
35482  gpuDynInst->computeUnit()->globalMemoryPipe
35483  .issueRequest(gpuDynInst);
35484  }
35485  } // execute
35486 
35487  void
35489  {
35490  initMemRead<2>(gpuDynInst);
35491  } // initiateAcc
35492 
35493  void
35495  {
35496  VecOperandU32 vdst0(gpuDynInst, extData.VDATA);
35497  VecOperandU32 vdst1(gpuDynInst, extData.VDATA + 1);
35498 
35499  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
35500  if (gpuDynInst->exec_mask[lane]) {
35501  if (!oobMask[lane]) {
35502  vdst0[lane] = (reinterpret_cast<VecElemU32*>(
35503  gpuDynInst->d_data))[lane * 2];
35504  vdst1[lane] = (reinterpret_cast<VecElemU32*>(
35505  gpuDynInst->d_data))[lane * 2 + 1];
35506  } else {
35507  vdst0[lane] = 0;
35508  vdst1[lane] = 0;
35509  }
35510  }
35511  }
35512 
35513  vdst0.write();
35514  vdst1.write();
35515  } // completeAcc
35516 
35519  : Inst_MUBUF(iFmt, "buffer_load_dwordx3")
35520  {
35521  setFlag(MemoryRef);
35522  setFlag(Load);
35523  if (instData.LDS) {
35524  setFlag(GroupSegment);
35525  } else {
35526  setFlag(GlobalSegment);
35527  }
35528  } // Inst_MUBUF__BUFFER_LOAD_DWORDX3
35529 
35531  {
35532  } // ~Inst_MUBUF__BUFFER_LOAD_DWORDX3
35533 
35534  // Untyped buffer load 3 dwords.
35535  void
35537  {
35538  Wavefront *wf = gpuDynInst->wavefront();
35539  gpuDynInst->execUnitId = wf->execUnitId;
35540  gpuDynInst->latency.init(gpuDynInst->computeUnit());
35541  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
35542 
35543  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
35544  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
35545  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
35547 
35548  rsrcDesc.read();
35549  offset.read();
35550 
35551  int inst_offset = instData.OFFSET;
35552 
35553  if (!instData.IDXEN && !instData.OFFEN) {
35556  addr0, addr1, rsrcDesc, offset, inst_offset);
35557  } else if (!instData.IDXEN && instData.OFFEN) {
35558  addr0.read();
35561  addr0, addr1, rsrcDesc, offset, inst_offset);
35562  } else if (instData.IDXEN && !instData.OFFEN) {
35563  addr0.read();
35566  addr1, addr0, rsrcDesc, offset, inst_offset);
35567  } else {
35568  addr0.read();
35569  addr1.read();
35572  addr1, addr0, rsrcDesc, offset, inst_offset);
35573  }
35574 
35575  if (isLocalMem()) {
35576  gpuDynInst->computeUnit()->localMemoryPipe
35577  .issueRequest(gpuDynInst);
35578  } else {
35579  gpuDynInst->computeUnit()->globalMemoryPipe
35580  .issueRequest(gpuDynInst);
35581  }
35582  } // execute
35583 
35584  void
35586  {
35587  initMemRead<3>(gpuDynInst);
35588  } // initiateAcc
35589 
35590  void
35592  {
35593  VecOperandU32 vdst0(gpuDynInst, extData.VDATA);
35594  VecOperandU32 vdst1(gpuDynInst, extData.VDATA + 1);
35595  VecOperandU32 vdst2(gpuDynInst, extData.VDATA + 2);
35596 
35597  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
35598  if (gpuDynInst->exec_mask[lane]) {
35599  if (!oobMask[lane]) {
35600  vdst0[lane] = (reinterpret_cast<VecElemU32*>(
35601  gpuDynInst->d_data))[lane * 3];
35602  vdst1[lane] = (reinterpret_cast<VecElemU32*>(
35603  gpuDynInst->d_data))[lane * 3 + 1];
35604  vdst2[lane] = (reinterpret_cast<VecElemU32*>(
35605  gpuDynInst->d_data))[lane * 3 + 2];
35606  } else {
35607  vdst0[lane] = 0;
35608  vdst1[lane] = 0;
35609  vdst2[lane] = 0;
35610  }
35611  }
35612  }
35613 
35614  vdst0.write();
35615  vdst1.write();
35616  vdst2.write();
35617  } // completeAcc
35618 
35621  : Inst_MUBUF(iFmt, "buffer_load_dwordx4")
35622  {
35623  setFlag(MemoryRef);
35624  setFlag(Load);
35625  if (instData.LDS) {
35626  setFlag(GroupSegment);
35627  } else {
35628  setFlag(GlobalSegment);
35629  }
35630  } // Inst_MUBUF__BUFFER_LOAD_DWORDX4
35631 
35633  {
35634  } // ~Inst_MUBUF__BUFFER_LOAD_DWORDX4
35635 
35636  // Untyped buffer load 4 dwords.
35637  void
35639  {
35640  Wavefront *wf = gpuDynInst->wavefront();
35641  gpuDynInst->execUnitId = wf->execUnitId;
35642  gpuDynInst->latency.init(gpuDynInst->computeUnit());
35643  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
35644 
35645  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
35646  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
35647  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
35649 
35650  rsrcDesc.read();
35651  offset.read();
35652 
35653  int inst_offset = instData.OFFSET;
35654 
35655  if (!instData.IDXEN && !instData.OFFEN) {
35658  addr0, addr1, rsrcDesc, offset, inst_offset);
35659  } else if (!instData.IDXEN && instData.OFFEN) {
35660  addr0.read();
35663  addr0, addr1, rsrcDesc, offset, inst_offset);
35664  } else if (instData.IDXEN && !instData.OFFEN) {
35665  addr0.read();
35668  addr1, addr0, rsrcDesc, offset, inst_offset);
35669  } else {
35670  addr0.read();
35671  addr1.read();
35674  addr1, addr0, rsrcDesc, offset, inst_offset);
35675  }
35676 
35677  if (isLocalMem()) {
35678  gpuDynInst->computeUnit()->localMemoryPipe
35679  .issueRequest(gpuDynInst);
35680  } else {
35681  gpuDynInst->computeUnit()->globalMemoryPipe
35682  .issueRequest(gpuDynInst);
35683  }
35684  } // execute
35685 
35686  void
35688  {
35689  initMemRead<4>(gpuDynInst);
35690  } // initiateAcc
35691 
35692  void
35694  {
35695  VecOperandU32 vdst0(gpuDynInst, extData.VDATA);
35696  VecOperandU32 vdst1(gpuDynInst, extData.VDATA + 1);
35697  VecOperandU32 vdst2(gpuDynInst, extData.VDATA + 2);
35698  VecOperandU32 vdst3(gpuDynInst, extData.VDATA + 3);
35699 
35700  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
35701  if (gpuDynInst->exec_mask[lane]) {
35702  if (!oobMask[lane]) {
35703  vdst0[lane] = (reinterpret_cast<VecElemU32*>(
35704  gpuDynInst->d_data))[lane * 4];
35705  vdst1[lane] = (reinterpret_cast<VecElemU32*>(
35706  gpuDynInst->d_data))[lane * 4 + 1];
35707  vdst2[lane] = (reinterpret_cast<VecElemU32*>(
35708  gpuDynInst->d_data))[lane * 4 + 2];
35709  vdst3[lane] = (reinterpret_cast<VecElemU32*>(
35710  gpuDynInst->d_data))[lane * 4 + 3];
35711  } else {
35712  vdst0[lane] = 0;
35713  vdst1[lane] = 0;
35714  vdst2[lane] = 0;
35715  vdst3[lane] = 0;
35716  }
35717  }
35718  }
35719 
35720  vdst0.write();
35721  vdst1.write();
35722  vdst2.write();
35723  vdst3.write();
35724  } // completeAcc
35725 
35728  : Inst_MUBUF(iFmt, "buffer_store_byte")
35729  {
35730  setFlag(MemoryRef);
35731  setFlag(Store);
35732  if (instData.LDS) {
35733  setFlag(GroupSegment);
35734  } else {
35735  setFlag(GlobalSegment);
35736  }
35737  } // Inst_MUBUF__BUFFER_STORE_BYTE
35738 
35740  {
35741  } // ~Inst_MUBUF__BUFFER_STORE_BYTE
35742 
35743  // Untyped buffer store byte.
35744  void
35746  {
35747  Wavefront *wf = gpuDynInst->wavefront();
35748  gpuDynInst->execUnitId = wf->execUnitId;
35749  gpuDynInst->latency.init(gpuDynInst->computeUnit());
35750  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
35751 
35752  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
35753  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
35754  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
35756  ConstVecOperandI8 data(gpuDynInst, extData.VDATA);
35757 
35758  rsrcDesc.read();
35759  offset.read();
35760  data.read();
35761 
35762  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
35763  if (gpuDynInst->exec_mask[lane]) {
35764  (reinterpret_cast<VecElemI8*>(gpuDynInst->d_data))[lane]
35765  = data[lane];
35766  }
35767  }
35768 
35769  int inst_offset = instData.OFFSET;
35770 
35771  if (!instData.IDXEN && !instData.OFFEN) {
35774  addr0, addr1, rsrcDesc, offset, inst_offset);
35775  } else if (!instData.IDXEN && instData.OFFEN) {
35776  addr0.read();
35779  addr0, addr1, rsrcDesc, offset, inst_offset);
35780  } else if (instData.IDXEN && !instData.OFFEN) {
35781  addr0.read();
35784  addr1, addr0, rsrcDesc, offset, inst_offset);
35785  } else {
35786  addr0.read();
35787  addr1.read();
35790  addr1, addr0, rsrcDesc, offset, inst_offset);
35791  }
35792 
35793  if (isLocalMem()) {
35794  gpuDynInst->computeUnit()->localMemoryPipe
35795  .issueRequest(gpuDynInst);
35796  } else {
35797  gpuDynInst->computeUnit()->globalMemoryPipe
35798  .issueRequest(gpuDynInst);
35799  }
35800  }
35801 
35802  void
35804  {
35805  initMemWrite<VecElemI8>(gpuDynInst);
35806  } // initiateAcc
35807 
35808  void
35810  {
35811  }
35812 
35815  : Inst_MUBUF(iFmt, "buffer_store_short")
35816  {
35817  setFlag(MemoryRef);
35818  setFlag(Store);
35819  if (instData.LDS) {
35820  setFlag(GroupSegment);
35821  } else {
35822  setFlag(GlobalSegment);
35823  }
35824  } // Inst_MUBUF__BUFFER_STORE_SHORT
35825 
35827  {
35828  } // ~Inst_MUBUF__BUFFER_STORE_SHORT
35829 
35830  // Untyped buffer store short.
35831  void
35833  {
35834  Wavefront *wf = gpuDynInst->wavefront();
35835  gpuDynInst->execUnitId = wf->execUnitId;
35836  gpuDynInst->latency.init(gpuDynInst->computeUnit());
35837  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
35838 
35839  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
35840  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
35841  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
35843  ConstVecOperandI16 data(gpuDynInst, extData.VDATA);
35844 
35845  rsrcDesc.read();
35846  offset.read();
35847  data.read();
35848 
35849  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
35850  if (gpuDynInst->exec_mask[lane]) {
35851  (reinterpret_cast<VecElemI16*>(gpuDynInst->d_data))[lane]
35852  = data[lane];
35853  }
35854  }
35855 
35856  int inst_offset = instData.OFFSET;
35857 
35858  if (!instData.IDXEN && !instData.OFFEN) {
35861  addr0, addr1, rsrcDesc, offset, inst_offset);
35862  } else if (!instData.IDXEN && instData.OFFEN) {
35863  addr0.read();
35866  addr0, addr1, rsrcDesc, offset, inst_offset);
35867  } else if (instData.IDXEN && !instData.OFFEN) {
35868  addr0.read();
35871  addr1, addr0, rsrcDesc, offset, inst_offset);
35872  } else {
35873  addr0.read();
35874  addr1.read();
35877  addr1, addr0, rsrcDesc, offset, inst_offset);
35878  }
35879 
35880  if (isLocalMem()) {
35881  gpuDynInst->computeUnit()->localMemoryPipe
35882  .issueRequest(gpuDynInst);
35883  } else {
35884  gpuDynInst->computeUnit()->globalMemoryPipe
35885  .issueRequest(gpuDynInst);
35886  }
35887  }
35888 
35889  void
35891  {
35892  initMemWrite<VecElemI16>(gpuDynInst);
35893  } // initiateAcc
35894 
35895  void
35897  {
35898  }
35899 
35902  : Inst_MUBUF(iFmt, "buffer_store_dword")
35903  {
35904  setFlag(MemoryRef);
35905  setFlag(Store);
35906  if (instData.LDS) {
35907  setFlag(GroupSegment);
35908  } else {
35909  setFlag(GlobalSegment);
35910  }
35911  } // Inst_MUBUF__BUFFER_STORE_DWORD
35912 
35914  {
35915  } // ~Inst_MUBUF__BUFFER_STORE_DWORD
35916 
35917  // Untyped buffer store dword.
35918  void
35920  {
35921  Wavefront *wf = gpuDynInst->wavefront();
35922  gpuDynInst->execUnitId = wf->execUnitId;
35923  gpuDynInst->latency.init(gpuDynInst->computeUnit());
35924  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
35925 
35926  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
35927  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
35928  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
35930  ConstVecOperandU32 data(gpuDynInst, extData.VDATA);
35931 
35932  rsrcDesc.read();
35933  offset.read();
35934  data.read();
35935 
35936  int inst_offset = instData.OFFSET;
35937 
35938  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
35939  if (gpuDynInst->exec_mask[lane]) {
35940  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane]
35941  = data[lane];
35942  }
35943  }
35944 
35945  if (!instData.IDXEN && !instData.OFFEN) {
35948  addr0, addr1, rsrcDesc, offset, inst_offset);
35949  } else if (!instData.IDXEN && instData.OFFEN) {
35950  addr0.read();
35953  addr0, addr1, rsrcDesc, offset, inst_offset);
35954  } else if (instData.IDXEN && !instData.OFFEN) {
35955  addr0.read();
35958  addr1, addr0, rsrcDesc, offset, inst_offset);
35959  } else {
35960  addr0.read();
35961  addr1.read();
35964  addr1, addr0, rsrcDesc, offset, inst_offset);
35965  }
35966 
35967  if (isLocalMem()) {
35968  gpuDynInst->computeUnit()->localMemoryPipe
35969  .issueRequest(gpuDynInst);
35970  } else {
35971  gpuDynInst->computeUnit()->globalMemoryPipe
35972  .issueRequest(gpuDynInst);
35973  }
35974  }
35975 
35976  void
35978  {
35979  initMemWrite<VecElemU32>(gpuDynInst);
35980  } // initiateAcc
35981 
35982  void
35984  {
35985  } // completeAcc
35986 
35989  : Inst_MUBUF(iFmt, "buffer_store_dwordx2")
35990  {
35991  setFlag(MemoryRef);
35992  setFlag(Store);
35993  if (instData.LDS) {
35994  setFlag(GroupSegment);
35995  } else {
35996  setFlag(GlobalSegment);
35997  }
35998  } // Inst_MUBUF__BUFFER_STORE_DWORDX2
35999 
36001  {
36002  } // ~Inst_MUBUF__BUFFER_STORE_DWORDX2
36003 
36004  // Untyped buffer store 2 dwords.
36005  void
36007  {
36008  Wavefront *wf = gpuDynInst->wavefront();
36009  gpuDynInst->execUnitId = wf->execUnitId;
36010  gpuDynInst->latency.init(gpuDynInst->computeUnit());
36011  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
36012 
36013  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
36014  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
36015  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
36017  ConstVecOperandU32 data0(gpuDynInst, extData.VDATA);
36018  ConstVecOperandU32 data1(gpuDynInst, extData.VDATA + 1);
36019 
36020  rsrcDesc.read();
36021  offset.read();
36022  data0.read();
36023  data1.read();
36024 
36025  int inst_offset = instData.OFFSET;
36026 
36027  if (!instData.IDXEN && !instData.OFFEN) {
36030  addr0, addr1, rsrcDesc, offset, inst_offset);
36031  } else if (!instData.IDXEN && instData.OFFEN) {
36032  addr0.read();
36035  addr0, addr1, rsrcDesc, offset, inst_offset);
36036  } else if (instData.IDXEN && !instData.OFFEN) {
36037  addr0.read();
36040  addr1, addr0, rsrcDesc, offset, inst_offset);
36041  } else {
36042  addr0.read();
36043  addr1.read();
36046  addr1, addr0, rsrcDesc, offset, inst_offset);
36047  }
36048 
36049  if (isLocalMem()) {
36050  gpuDynInst->computeUnit()->localMemoryPipe
36051  .issueRequest(gpuDynInst);
36052  } else {
36053  gpuDynInst->computeUnit()->globalMemoryPipe
36054  .issueRequest(gpuDynInst);
36055  }
36056 
36057  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
36058  if (gpuDynInst->exec_mask[lane]) {
36059  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane * 4]
36060  = data0[lane];
36061  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane*4 + 1]
36062  = data1[lane];
36063  }
36064  }
36065  } // execute
36066 
36067  void
36069  {
36070  initMemWrite<2>(gpuDynInst);
36071  } // initiateAcc
36072 
36073  void
36075  {
36076  } // completeAcc
36077 
36080  : Inst_MUBUF(iFmt, "buffer_store_dwordx3")
36081  {
36082  setFlag(MemoryRef);
36083  setFlag(Store);
36084  if (instData.LDS) {
36085  setFlag(GroupSegment);
36086  } else {
36087  setFlag(GlobalSegment);
36088  }
36089  } // Inst_MUBUF__BUFFER_STORE_DWORDX3
36090 
36092  {
36093  } // ~Inst_MUBUF__BUFFER_STORE_DWORDX3
36094 
36095  // Untyped buffer store 3 dwords.
36096  void
36098  {
36099  Wavefront *wf = gpuDynInst->wavefront();
36100  gpuDynInst->execUnitId = wf->execUnitId;
36101  gpuDynInst->latency.init(gpuDynInst->computeUnit());
36102  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
36103 
36104  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
36105  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
36106  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
36108  ConstVecOperandU32 data0(gpuDynInst, extData.VDATA);
36109  ConstVecOperandU32 data1(gpuDynInst, extData.VDATA + 1);
36110  ConstVecOperandU32 data2(gpuDynInst, extData.VDATA + 2);
36111 
36112  rsrcDesc.read();
36113  offset.read();
36114  data0.read();
36115  data1.read();
36116  data2.read();
36117 
36118  int inst_offset = instData.OFFSET;
36119 
36120  if (!instData.IDXEN && !instData.OFFEN) {
36123  addr0, addr1, rsrcDesc, offset, inst_offset);
36124  } else if (!instData.IDXEN && instData.OFFEN) {
36125  addr0.read();
36128  addr0, addr1, rsrcDesc, offset, inst_offset);
36129  } else if (instData.IDXEN && !instData.OFFEN) {
36130  addr0.read();
36133  addr1, addr0, rsrcDesc, offset, inst_offset);
36134  } else {
36135  addr0.read();
36136  addr1.read();
36139  addr1, addr0, rsrcDesc, offset, inst_offset);
36140  }
36141 
36142  if (isLocalMem()) {
36143  gpuDynInst->computeUnit()->localMemoryPipe
36144  .issueRequest(gpuDynInst);
36145  } else {
36146  gpuDynInst->computeUnit()->globalMemoryPipe
36147  .issueRequest(gpuDynInst);
36148  }
36149 
36150  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
36151  if (gpuDynInst->exec_mask[lane]) {
36152  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane * 4]
36153  = data0[lane];
36154  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane*4 + 1]
36155  = data1[lane];
36156  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane*4 + 2]
36157  = data2[lane];
36158  }
36159  }
36160  } // execute
36161 
36162  void
36164  {
36165  initMemWrite<3>(gpuDynInst);
36166  } // initiateAcc
36167 
36168  void
36170  {
36171  } // completeAcc
36172 
36175  : Inst_MUBUF(iFmt, "buffer_store_dwordx4")
36176  {
36177  setFlag(MemoryRef);
36178  setFlag(Store);
36179  if (instData.LDS) {
36180  setFlag(GroupSegment);
36181  } else {
36182  setFlag(GlobalSegment);
36183  }
36184  } // Inst_MUBUF__BUFFER_STORE_DWORDX4
36185 
36187  {
36188  } // ~Inst_MUBUF__BUFFER_STORE_DWORDX4
36189 
36190  // Untyped buffer store 4 dwords.
36191  void
36193  {
36194  Wavefront *wf = gpuDynInst->wavefront();
36195  gpuDynInst->execUnitId = wf->execUnitId;
36196  gpuDynInst->latency.init(gpuDynInst->computeUnit());
36197  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
36198 
36199  ConstVecOperandU32 addr0(gpuDynInst, extData.VADDR);
36200  ConstVecOperandU32 addr1(gpuDynInst, extData.VADDR + 1);
36201  ConstScalarOperandU128 rsrcDesc(gpuDynInst, extData.SRSRC * 4);
36203  ConstVecOperandU32 data0(gpuDynInst, extData.VDATA);
36204  ConstVecOperandU32 data1(gpuDynInst, extData.VDATA + 1);
36205  ConstVecOperandU32 data2(gpuDynInst, extData.VDATA + 2);
36206  ConstVecOperandU32 data3(gpuDynInst, extData.VDATA + 3);
36207 
36208  rsrcDesc.read();
36209  offset.read();
36210  data0.read();
36211  data1.read();
36212  data2.read();
36213  data3.read();
36214 
36215  int inst_offset = instData.OFFSET;
36216 
36217  if (!instData.IDXEN && !instData.OFFEN) {
36220  addr0, addr1, rsrcDesc, offset, inst_offset);
36221  } else if (!instData.IDXEN && instData.OFFEN) {
36222  addr0.read();
36225  addr0, addr1, rsrcDesc, offset, inst_offset);
36226  } else if (instData.IDXEN && !instData.OFFEN) {
36227  addr0.read();
36230  addr1, addr0, rsrcDesc, offset, inst_offset);
36231  } else {
36232  addr0.read();
36233  addr1.read();
36236  addr1, addr0, rsrcDesc, offset, inst_offset);
36237  }
36238 
36239  if (isLocalMem()) {
36240  gpuDynInst->computeUnit()->localMemoryPipe
36241  .issueRequest(gpuDynInst);
36242  } else {
36243  gpuDynInst->computeUnit()->globalMemoryPipe
36244  .issueRequest(gpuDynInst);
36245  }
36246 
36247  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
36248  if (gpuDynInst->exec_mask[lane]) {
36249  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane * 4]
36250  = data0[lane];
36251  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane*4 + 1]
36252  = data1[lane];
36253  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane*4 + 2]
36254  = data2[lane];
36255  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane*4 + 3]
36256  = data3[lane];
36257  }
36258  }
36259  } // execute
36260 
36261  void
36263  {
36264  initMemWrite<4>(gpuDynInst);
36265  } // initiateAcc
36266 
36267  void
36269  {
36270  } // completeAcc
36271 
36274  : Inst_MUBUF(iFmt, "buffer_store_lds_dword")
36275  {
36276  setFlag(GlobalSegment);
36277  } // Inst_MUBUF__BUFFER_STORE_LDS_DWORD
36278 
36280  {
36281  } // ~Inst_MUBUF__BUFFER_STORE_LDS_DWORD
36282 
36283  // Store one DWORD from LDS memory to system memory without utilizing
36284  // VGPRs.
36285  void
36287  {
36289  }
36290 
36292  : Inst_MUBUF(iFmt, "buffer_wbinvl1")
36293  {
36294  setFlag(MemoryRef);
36295  setFlag(GPUStaticInst::MemSync);
36296  setFlag(GlobalSegment);
36297  setFlag(MemSync);
36298  } // Inst_MUBUF__BUFFER_WBINVL1
36299 
36301  {
36302  } // ~Inst_MUBUF__BUFFER_WBINVL1
36303 
36304  // Write back and invalidate the shader L1.
36305  // Always returns ACK to shader.
36306  void
36308  {
36309  Wavefront *wf = gpuDynInst->wavefront();
36310  gpuDynInst->execUnitId = wf->execUnitId;
36311  gpuDynInst->latency.init(gpuDynInst->computeUnit());
36312  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
36313 
36314  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
36315  gpuDynInst->computeUnit()->globalMemoryPipe.
36316  issueRequest(gpuDynInst);
36317  } else {
36318  fatal("Unsupported scope for flat instruction.\n");
36319  }
36320  }
36321 
36322  void
36324  {
36325  injectGlobalMemFence(gpuDynInst);
36326  } // initiateAcc
36327 
36328  void
36330  {
36331  } // completeAcc
36332 
36335  : Inst_MUBUF(iFmt, "buffer_wbinvl1_vol") {
36343  setFlag(MemoryRef);
36344  setFlag(GPUStaticInst::MemSync);
36345  setFlag(GlobalSegment);
36346  setFlag(MemSync);
36347  } // Inst_MUBUF__BUFFER_WBINVL1_VOL
36348 
36350  {
36351  } // ~Inst_MUBUF__BUFFER_WBINVL1_VOL
36352 
36353  // Write back and invalidate the shader L1 only for lines that are marked
36354  // volatile. Always returns ACK to shader.
36355  void
36357  {
36358  Wavefront *wf = gpuDynInst->wavefront();
36359  gpuDynInst->execUnitId = wf->execUnitId;
36360  gpuDynInst->latency.init(gpuDynInst->computeUnit());
36361  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
36362 
36363  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
36364  gpuDynInst->computeUnit()->globalMemoryPipe.
36365  issueRequest(gpuDynInst);
36366  } else {
36367  fatal("Unsupported scope for flat instruction.\n");
36368  }
36369  }
36370  void
36372  {
36373  injectGlobalMemFence(gpuDynInst);
36374  } // initiateAcc
36375  void
36377  {
36378  } // completeAcc
36379 
36382  : Inst_MUBUF(iFmt, "buffer_atomic_swap")
36383  {
36384  setFlag(AtomicExch);
36385  if (instData.GLC) {
36386  setFlag(AtomicReturn);
36387  } else {
36388  setFlag(AtomicNoReturn);
36389  } // if
36390  setFlag(MemoryRef);
36391  setFlag(GlobalSegment);
36392  } // Inst_MUBUF__BUFFER_ATOMIC_SWAP
36393 
36395  {
36396  } // ~Inst_MUBUF__BUFFER_ATOMIC_SWAP
36397 
36398  // tmp = MEM[ADDR];
36399  // MEM[ADDR] = DATA;
36400  // RETURN_DATA = tmp.
36401  void
36403  {
36405  }
36406 
36409  : Inst_MUBUF(iFmt, "buffer_atomic_cmpswap")
36410  {
36411  setFlag(AtomicCAS);
36412  if (instData.GLC) {
36413  setFlag(AtomicReturn);
36414  } else {
36415  setFlag(AtomicNoReturn);
36416  }
36417  setFlag(MemoryRef);
36418  setFlag(GlobalSegment);
36419  } // Inst_MUBUF__BUFFER_ATOMIC_CMPSWAP
36420 
36422  {
36423  } // ~Inst_MUBUF__BUFFER_ATOMIC_CMPSWAP
36424 
36425  // tmp = MEM[ADDR];
36426  // src = DATA[0];
36427  // cmp = DATA[1];
36428  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
36429  // RETURN_DATA[0] = tmp.
36430  void
36432  {
36434  }
36435 
36438  : Inst_MUBUF(iFmt, "buffer_atomic_add")
36439  {
36440  setFlag(AtomicAdd);
36441  if (instData.GLC) {
36442  setFlag(AtomicReturn);
36443  } else {
36444  setFlag(AtomicNoReturn);
36445  } // if
36446  setFlag(MemoryRef);
36447  setFlag(GlobalSegment);
36448  } // Inst_MUBUF__BUFFER_ATOMIC_ADD
36449 
36451  {
36452  } // ~Inst_MUBUF__BUFFER_ATOMIC_ADD
36453 
36454  // tmp = MEM[ADDR];
36455  // MEM[ADDR] += DATA;
36456  // RETURN_DATA = tmp.
36457  void
36459  {
36461  }
36462 
36465  : Inst_MUBUF(iFmt, "buffer_atomic_sub")
36466  {
36467  setFlag(AtomicSub);
36468  if (instData.GLC) {
36469  setFlag(AtomicReturn);
36470  } else {
36471  setFlag(AtomicNoReturn);
36472  }
36473  setFlag(MemoryRef);
36474  setFlag(GlobalSegment);
36475  } // Inst_MUBUF__BUFFER_ATOMIC_SUB
36476 
36478  {
36479  } // ~Inst_MUBUF__BUFFER_ATOMIC_SUB
36480 
36481  // tmp = MEM[ADDR];
36482  // MEM[ADDR] -= DATA;
36483  // RETURN_DATA = tmp.
36484  void
36486  {
36488  }
36489 
36492  : Inst_MUBUF(iFmt, "buffer_atomic_smin")
36493  {
36494  setFlag(AtomicMin);
36495  if (instData.GLC) {
36496  setFlag(AtomicReturn);
36497  } else {
36498  setFlag(AtomicNoReturn);
36499  }
36500  setFlag(MemoryRef);
36501  setFlag(GlobalSegment);
36502  } // Inst_MUBUF__BUFFER_ATOMIC_SMIN
36503 
36505  {
36506  } // ~Inst_MUBUF__BUFFER_ATOMIC_SMIN
36507 
36508  // tmp = MEM[ADDR];
36509  // MEM[ADDR] = (DATA < tmp) ? DATA : tmp (signed compare);
36510  // RETURN_DATA = tmp.
36511  void
36513  {
36515  }
36516 
36519  : Inst_MUBUF(iFmt, "buffer_atomic_umin")
36520  {
36521  setFlag(AtomicMin);
36522  if (instData.GLC) {
36523  setFlag(AtomicReturn);
36524  } else {
36525  setFlag(AtomicNoReturn);
36526  }
36527  setFlag(MemoryRef);
36528  setFlag(GlobalSegment);
36529  } // Inst_MUBUF__BUFFER_ATOMIC_UMIN
36530 
36532  {
36533  } // ~Inst_MUBUF__BUFFER_ATOMIC_UMIN
36534 
36535  // tmp = MEM[ADDR];
36536  // MEM[ADDR] = (DATA < tmp) ? DATA : tmp (unsigned compare);
36537  // RETURN_DATA = tmp.
36538  void
36540  {
36542  }
36543 
36546  : Inst_MUBUF(iFmt, "buffer_atomic_smax")
36547  {
36548  setFlag(AtomicMax);
36549  if (instData.GLC) {
36550  setFlag(AtomicReturn);
36551  } else {
36552  setFlag(AtomicNoReturn);
36553  }
36554  setFlag(MemoryRef);
36555  setFlag(GlobalSegment);
36556  } // Inst_MUBUF__BUFFER_ATOMIC_SMAX
36557 
36559  {
36560  } // ~Inst_MUBUF__BUFFER_ATOMIC_SMAX
36561 
36562  // tmp = MEM[ADDR];
36563  // MEM[ADDR] = (DATA > tmp) ? DATA : tmp (signed compare);
36564  // RETURN_DATA = tmp.
36565  void
36567  {
36569  }
36570 
36573  : Inst_MUBUF(iFmt, "buffer_atomic_umax")
36574  {
36575  setFlag(AtomicMax);
36576  if (instData.GLC) {
36577  setFlag(AtomicReturn);
36578  } else {
36579  setFlag(AtomicNoReturn);
36580  } // if
36581  setFlag(MemoryRef);
36582  setFlag(GlobalSegment);
36583  } // Inst_MUBUF__BUFFER_ATOMIC_UMAX
36584 
36586  {
36587  } // ~Inst_MUBUF__BUFFER_ATOMIC_UMAX
36588 
36589  // tmp = MEM[ADDR];
36590  // MEM[ADDR] = (DATA > tmp) ? DATA : tmp (unsigned compare);
36591  // RETURN_DATA = tmp.
36592  void
36594  {
36596  }
36597 
36600  : Inst_MUBUF(iFmt, "buffer_atomic_and")
36601  {
36602  setFlag(AtomicAnd);
36603  if (instData.GLC) {
36604  setFlag(AtomicReturn);
36605  } else {
36606  setFlag(AtomicNoReturn);
36607  }
36608  setFlag(MemoryRef);
36609  setFlag(GlobalSegment);
36610  } // Inst_MUBUF__BUFFER_ATOMIC_AND
36611 
36613  {
36614  } // ~Inst_MUBUF__BUFFER_ATOMIC_AND
36615 
36616  // tmp = MEM[ADDR];
36617  // MEM[ADDR] &= DATA;
36618  // RETURN_DATA = tmp.
36619  void
36621  {
36623  }
36624 
36627  : Inst_MUBUF(iFmt, "buffer_atomic_or")
36628  {
36629  setFlag(AtomicOr);
36630  if (instData.GLC) {
36631  setFlag(AtomicReturn);
36632  } else {
36633  setFlag(AtomicNoReturn);
36634  }
36635  setFlag(MemoryRef);
36636  setFlag(GlobalSegment);
36637  } // Inst_MUBUF__BUFFER_ATOMIC_OR
36638 
36640  {
36641  } // ~Inst_MUBUF__BUFFER_ATOMIC_OR
36642 
36643  // tmp = MEM[ADDR];
36644  // MEM[ADDR] |= DATA;
36645  // RETURN_DATA = tmp.
36646  void
36648  {
36650  }
36651 
36654  : Inst_MUBUF(iFmt, "buffer_atomic_xor")
36655  {
36656  setFlag(AtomicXor);
36657  if (instData.GLC) {
36658  setFlag(AtomicReturn);
36659  } else {
36660  setFlag(AtomicNoReturn);
36661  }
36662  setFlag(MemoryRef);
36663  setFlag(GlobalSegment);
36664  } // Inst_MUBUF__BUFFER_ATOMIC_XOR
36665 
36667  {
36668  } // ~Inst_MUBUF__BUFFER_ATOMIC_XOR
36669 
36670  // tmp = MEM[ADDR];
36671  // MEM[ADDR] ^= DATA;
36672  // RETURN_DATA = tmp.
36673  void
36675  {
36677  }
36678 
36681  : Inst_MUBUF(iFmt, "buffer_atomic_inc")
36682  {
36683  setFlag(AtomicInc);
36684  if (instData.GLC) {
36685  setFlag(AtomicReturn);
36686  } else {
36687  setFlag(AtomicNoReturn);
36688  }
36689  setFlag(MemoryRef);
36690  setFlag(GlobalSegment);
36691  } // Inst_MUBUF__BUFFER_ATOMIC_INC
36692 
36694  {
36695  } // ~Inst_MUBUF__BUFFER_ATOMIC_INC
36696 
36697  // tmp = MEM[ADDR];
36698  // MEM[ADDR] = (tmp >= DATA) ? 0 : tmp + 1 (unsigned compare);
36699  // RETURN_DATA = tmp.
36700  void
36702  {
36704  }
36705 
36708  : Inst_MUBUF(iFmt, "buffer_atomic_dec")
36709  {
36710  setFlag(AtomicDec);
36711  if (instData.GLC) {
36712  setFlag(AtomicReturn);
36713  } else {
36714  setFlag(AtomicNoReturn);
36715  }
36716  setFlag(MemoryRef);
36717  setFlag(GlobalSegment);
36718  } // Inst_MUBUF__BUFFER_ATOMIC_DEC
36719 
36721  {
36722  } // ~Inst_MUBUF__BUFFER_ATOMIC_DEC
36723 
36724  // tmp = MEM[ADDR];
36725  // MEM[ADDR] = (tmp == 0 || tmp > DATA) ? DATA : tmp - 1
36726  // (unsigned compare); RETURN_DATA = tmp.
36727  void
36729  {
36731  }
36732 
36735  : Inst_MUBUF(iFmt, "buffer_atomic_swap_x2")
36736  {
36737  setFlag(AtomicExch);
36738  if (instData.GLC) {
36739  setFlag(AtomicReturn);
36740  } else {
36741  setFlag(AtomicNoReturn);
36742  }
36743  setFlag(MemoryRef);
36744  setFlag(GlobalSegment);
36745  } // Inst_MUBUF__BUFFER_ATOMIC_SWAP_X2
36746 
36748  {
36749  } // ~Inst_MUBUF__BUFFER_ATOMIC_SWAP_X2
36750 
36751  // tmp = MEM[ADDR];
36752  // MEM[ADDR] = DATA[0:1];
36753  // RETURN_DATA[0:1] = tmp.
36754  void
36756  {
36758  }
36759 
36762  : Inst_MUBUF(iFmt, "buffer_atomic_cmpswap_x2")
36763  {
36764  setFlag(AtomicCAS);
36765  if (instData.GLC) {
36766  setFlag(AtomicReturn);
36767  } else {
36768  setFlag(AtomicNoReturn);
36769  }
36770  setFlag(MemoryRef);
36771  setFlag(GlobalSegment);
36772  } // Inst_MUBUF__BUFFER_ATOMIC_CMPSWAP_X2
36773 
36776  {
36777  } // ~Inst_MUBUF__BUFFER_ATOMIC_CMPSWAP_X2
36778 
36779  // tmp = MEM[ADDR];
36780  // src = DATA[0:1];
36781  // cmp = DATA[2:3];
36782  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
36783  // RETURN_DATA[0:1] = tmp.
36784  void
36786  {
36788  }
36789 
36792  : Inst_MUBUF(iFmt, "buffer_atomic_add_x2")
36793  {
36794  setFlag(AtomicAdd);
36795  if (instData.GLC) {
36796  setFlag(AtomicReturn);
36797  } else {
36798  setFlag(AtomicNoReturn);
36799  }
36800  setFlag(MemoryRef);
36801  setFlag(GlobalSegment);
36802  } // Inst_MUBUF__BUFFER_ATOMIC_ADD_X2
36803 
36805  {
36806  } // ~Inst_MUBUF__BUFFER_ATOMIC_ADD_X2
36807 
36808  // tmp = MEM[ADDR];
36809  // MEM[ADDR] += DATA[0:1];
36810  // RETURN_DATA[0:1] = tmp.
36811  void
36813  {
36815  }
36816 
36819  : Inst_MUBUF(iFmt, "buffer_atomic_sub_x2")
36820  {
36821  setFlag(AtomicSub);
36822  if (instData.GLC) {
36823  setFlag(AtomicReturn);
36824  } else {
36825  setFlag(AtomicNoReturn);
36826  }
36827  setFlag(MemoryRef);
36828  setFlag(GlobalSegment);
36829  } // Inst_MUBUF__BUFFER_ATOMIC_SUB_X2
36830 
36832  {
36833  } // ~Inst_MUBUF__BUFFER_ATOMIC_SUB_X2
36834 
36835  // tmp = MEM[ADDR];
36836  // MEM[ADDR] -= DATA[0:1];
36837  // RETURN_DATA[0:1] = tmp.
36838  void
36840  {
36842  }
36843 
36846  : Inst_MUBUF(iFmt, "buffer_atomic_smin_x2")
36847  {
36848  setFlag(AtomicMin);
36849  if (instData.GLC) {
36850  setFlag(AtomicReturn);
36851  } else {
36852  setFlag(AtomicNoReturn);
36853  }
36854  setFlag(MemoryRef);
36855  setFlag(GlobalSegment);
36856  } // Inst_MUBUF__BUFFER_ATOMIC_SMIN_X2
36857 
36859  {
36860  } // ~Inst_MUBUF__BUFFER_ATOMIC_SMIN_X2
36861 
36862  // tmp = MEM[ADDR];
36863  // MEM[ADDR] -= (DATA[0:1] < tmp) ? DATA[0:1] : tmp (signed compare);
36864  // RETURN_DATA[0:1] = tmp.
36865  void
36867  {
36869  }
36870 
36873  : Inst_MUBUF(iFmt, "buffer_atomic_umin_x2")
36874  {
36875  setFlag(AtomicMin);
36876  if (instData.GLC) {
36877  setFlag(AtomicReturn);
36878  } else {
36879  setFlag(AtomicNoReturn);
36880  }
36881  setFlag(MemoryRef);
36882  setFlag(GlobalSegment);
36883  } // Inst_MUBUF__BUFFER_ATOMIC_UMIN_X2
36884 
36886  {
36887  } // ~Inst_MUBUF__BUFFER_ATOMIC_UMIN_X2
36888 
36889  // tmp = MEM[ADDR];
36890  // MEM[ADDR] -= (DATA[0:1] < tmp) ? DATA[0:1] : tmp (unsigned compare);
36891  // RETURN_DATA[0:1] = tmp.
36892  void
36894  {
36896  }
36897 
36900  : Inst_MUBUF(iFmt, "buffer_atomic_smax_x2")
36901  {
36902  setFlag(AtomicMax);
36903  if (instData.GLC) {
36904  setFlag(AtomicReturn);
36905  } else {
36906  setFlag(AtomicNoReturn);
36907  }
36908  setFlag(MemoryRef);
36909  setFlag(GlobalSegment);
36910  } // Inst_MUBUF__BUFFER_ATOMIC_SMAX_X2
36911 
36913  {
36914  } // ~Inst_MUBUF__BUFFER_ATOMIC_SMAX_X2
36915 
36916  // tmp = MEM[ADDR];
36917  // MEM[ADDR] -= (DATA[0:1] > tmp) ? DATA[0:1] : tmp (signed compare);
36918  // RETURN_DATA[0:1] = tmp.
36919  void
36921  {
36923  }
36924 
36927  : Inst_MUBUF(iFmt, "buffer_atomic_umax_x2")
36928  {
36929  setFlag(AtomicMax);
36930  if (instData.GLC) {
36931  setFlag(AtomicReturn);
36932  } else {
36933  setFlag(AtomicNoReturn);
36934  }
36935  setFlag(MemoryRef);
36936  setFlag(GlobalSegment);
36937  } // Inst_MUBUF__BUFFER_ATOMIC_UMAX_X2
36938 
36940  {
36941  } // ~Inst_MUBUF__BUFFER_ATOMIC_UMAX_X2
36942 
36943  // tmp = MEM[ADDR];
36944  // MEM[ADDR] -= (DATA[0:1] > tmp) ? DATA[0:1] : tmp (unsigned compare);
36945  // RETURN_DATA[0:1] = tmp.
36946  void
36948  {
36950  }
36951 
36954  : Inst_MUBUF(iFmt, "buffer_atomic_and_x2")
36955  {
36956  setFlag(AtomicAnd);
36957  if (instData.GLC) {
36958  setFlag(AtomicReturn);
36959  } else {
36960  setFlag(AtomicNoReturn);
36961  }
36962  setFlag(MemoryRef);
36963  setFlag(GlobalSegment);
36964  } // Inst_MUBUF__BUFFER_ATOMIC_AND_X2
36965 
36967  {
36968  } // ~Inst_MUBUF__BUFFER_ATOMIC_AND_X2
36969 
36970  // tmp = MEM[ADDR];
36971  // MEM[ADDR] &= DATA[0:1];
36972  // RETURN_DATA[0:1] = tmp.
36973  void
36975  {
36977  }
36978 
36981  : Inst_MUBUF(iFmt, "buffer_atomic_or_x2")
36982  {
36983  setFlag(AtomicOr);
36984  if (instData.GLC) {
36985  setFlag(AtomicReturn);
36986  } else {
36987  setFlag(AtomicNoReturn);
36988  }
36989  setFlag(MemoryRef);
36990  setFlag(GlobalSegment);
36991  } // Inst_MUBUF__BUFFER_ATOMIC_OR_X2
36992 
36994  {
36995  } // ~Inst_MUBUF__BUFFER_ATOMIC_OR_X2
36996 
36997  // tmp = MEM[ADDR];
36998  // MEM[ADDR] |= DATA[0:1];
36999  // RETURN_DATA[0:1] = tmp.
37000  void
37002  {
37004  }
37005 
37008  : Inst_MUBUF(iFmt, "buffer_atomic_xor_x2")
37009  {
37010  setFlag(AtomicXor);
37011  if (instData.GLC) {
37012  setFlag(AtomicReturn);
37013  } else {
37014  setFlag(AtomicNoReturn);
37015  }
37016  setFlag(MemoryRef);
37017  setFlag(GlobalSegment);
37018  } // Inst_MUBUF__BUFFER_ATOMIC_XOR_X2
37019 
37021  {
37022  } // ~Inst_MUBUF__BUFFER_ATOMIC_XOR_X2
37023 
37024  // tmp = MEM[ADDR];
37025  // MEM[ADDR] ^= DATA[0:1];
37026  // RETURN_DATA[0:1] = tmp.
37027  void
37029  {
37031  }
37032 
37035  : Inst_MUBUF(iFmt, "buffer_atomic_inc_x2")
37036  {
37037  setFlag(AtomicInc);
37038  if (instData.GLC) {
37039  setFlag(AtomicReturn);
37040  } else {
37041  setFlag(AtomicNoReturn);
37042  }
37043  setFlag(MemoryRef);
37044  setFlag(GlobalSegment);
37045  } // Inst_MUBUF__BUFFER_ATOMIC_INC_X2
37046 
37048  {
37049  } // ~Inst_MUBUF__BUFFER_ATOMIC_INC_X2
37050 
37051  // tmp = MEM[ADDR];
37052  // MEM[ADDR] = (tmp >= DATA[0:1]) ? 0 : tmp + 1 (unsigned compare);
37053  // RETURN_DATA[0:1] = tmp.
37054  void
37056  {
37058  }
37059 
37062  : Inst_MUBUF(iFmt, "buffer_atomic_dec_x2")
37063  {
37064  setFlag(AtomicDec);
37065  if (instData.GLC) {
37066  setFlag(AtomicReturn);
37067  } else {
37068  setFlag(AtomicNoReturn);
37069  }
37070  setFlag(MemoryRef);
37071  setFlag(GlobalSegment);
37072  } // Inst_MUBUF__BUFFER_ATOMIC_DEC_X2
37073 
37075  {
37076  } // ~Inst_MUBUF__BUFFER_ATOMIC_DEC_X2
37077 
37078  // tmp = MEM[ADDR];
37079  // MEM[ADDR] = (tmp == 0 || tmp > DATA[0:1]) ? DATA[0:1] : tmp - 1
37080  // (unsigned compare);
37081  // RETURN_DATA[0:1] = tmp.
37082  void
37084  {
37086  }
37087 
37090  : Inst_MTBUF(iFmt, "tbuffer_load_format_x")
37091  {
37092  setFlag(MemoryRef);
37093  setFlag(Load);
37094  setFlag(GlobalSegment);
37095  } // Inst_MTBUF__TBUFFER_LOAD_FORMAT_X
37096 
37098  {
37099  } // ~Inst_MTBUF__TBUFFER_LOAD_FORMAT_X
37100 
37101  // Typed buffer load 1 dword with format conversion.
37102  void
37104  {
37106  }
37107 
37108  void
37110  {
37111  } // initiateAcc
37112 
37113  void
37115  {
37116  }
37117 
37120  : Inst_MTBUF(iFmt, "tbuffer_load_format_xy")
37121  {
37122  setFlag(MemoryRef);
37123  setFlag(Load);
37124  setFlag(GlobalSegment);
37125  } // Inst_MTBUF__TBUFFER_LOAD_FORMAT_XY
37126 
37128  {
37129  } // ~Inst_MTBUF__TBUFFER_LOAD_FORMAT_XY
37130 
37131  // Typed buffer load 2 dwords with format conversion.
37132  void
37134  {
37136  }
37137 
37138  void
37140  {
37141  } // initiateAcc
37142 
37143  void
37145  {
37146  }
37147 
37150  : Inst_MTBUF(iFmt, "tbuffer_load_format_xyz")
37151  {
37152  setFlag(MemoryRef);
37153  setFlag(Load);
37154  setFlag(GlobalSegment);
37155  } // Inst_MTBUF__TBUFFER_LOAD_FORMAT_XYZ
37156 
37158  {
37159  } // ~Inst_MTBUF__TBUFFER_LOAD_FORMAT_XYZ
37160 
37161  // Typed buffer load 3 dwords with format conversion.
37162  void
37164  {
37166  }
37167 
37168  void
37170  {
37171  } // initiateAcc
37172 
37173  void
37175  {
37176  }
37177 
37180  : Inst_MTBUF(iFmt, "tbuffer_load_format_xyzw")
37181  {
37182  setFlag(MemoryRef);
37183  setFlag(Load);
37184  setFlag(GlobalSegment);
37185  } // Inst_MTBUF__TBUFFER_LOAD_FORMAT_XYZW
37186 
37189  {
37190  } // ~Inst_MTBUF__TBUFFER_LOAD_FORMAT_XYZW
37191 
37192  // Typed buffer load 4 dwords with format conversion.
37193  void
37195  {
37197  }
37198 
37199  void
37201  {
37202  } // initiateAcc
37203 
37204  void
37206  {
37207  }
37208 
37211  : Inst_MTBUF(iFmt, "tbuffer_store_format_x")
37212  {
37213  setFlag(MemoryRef);
37214  setFlag(Store);
37215  setFlag(GlobalSegment);
37216  } // Inst_MTBUF__TBUFFER_STORE_FORMAT_X
37217 
37219  {
37220  } // ~Inst_MTBUF__TBUFFER_STORE_FORMAT_X
37221 
37222  // Typed buffer store 1 dword with format conversion.
37223  void
37225  {
37227  }
37228 
37229  void
37231  {
37232  } // initiateAcc
37233 
37234  void
37236  {
37237  }
37238 
37241  : Inst_MTBUF(iFmt, "tbuffer_store_format_xy")
37242  {
37243  setFlag(MemoryRef);
37244  setFlag(Store);
37245  setFlag(GlobalSegment);
37246  } // Inst_MTBUF__TBUFFER_STORE_FORMAT_XY
37247 
37249  {
37250  } // ~Inst_MTBUF__TBUFFER_STORE_FORMAT_XY
37251 
37252  // Typed buffer store 2 dwords with format conversion.
37253  void
37255  {
37257  }
37258 
37259  void
37261  {
37262  } // initiateAcc
37263 
37264  void
37266  {
37267  }
37268 
37271  : Inst_MTBUF(iFmt, "tbuffer_store_format_xyz")
37272  {
37273  setFlag(MemoryRef);
37274  setFlag(Store);
37275  setFlag(GlobalSegment);
37276  } // Inst_MTBUF__TBUFFER_STORE_FORMAT_XYZ
37277 
37280  {
37281  } // ~Inst_MTBUF__TBUFFER_STORE_FORMAT_XYZ
37282 
37283  // Typed buffer store 3 dwords with format conversion.
37284  void
37286  {
37288  }
37289 
37290  void
37292  {
37293  } // initiateAcc
37294 
37295  void
37297  {
37298  }
37299 
37302  : Inst_MTBUF(iFmt, "tbuffer_store_format_xyzw")
37303  {
37304  setFlag(MemoryRef);
37305  setFlag(Store);
37306  setFlag(GlobalSegment);
37307  } // Inst_MTBUF__TBUFFER_STORE_FORMAT_XYZW
37308 
37311  {
37312  } // ~Inst_MTBUF__TBUFFER_STORE_FORMAT_XYZW
37313 
37314  // Typed buffer store 4 dwords with format conversion.
37315  void
37317  {
37319  }
37320 
37321  void
37323  GPUDynInstPtr gpuDynInst)
37324  {
37325  } // initiateAcc
37326 
37327  void
37329  GPUDynInstPtr gpuDynInst)
37330  {
37331  }
37332 
37335  : Inst_MTBUF(iFmt, "tbuffer_load_format_d16_x")
37336  {
37337  setFlag(MemoryRef);
37338  setFlag(Load);
37339  setFlag(GlobalSegment);
37340  } // Inst_MTBUF__TBUFFER_LOAD_FORMAT_D16_X
37341 
37344  {
37345  } // ~Inst_MTBUF__TBUFFER_LOAD_FORMAT_D16_X
37346 
37347  // Typed buffer load 1 dword with format conversion.
37348  void
37350  {
37352  }
37353 
37354  void
37356  GPUDynInstPtr gpuDynInst)
37357  {
37358  } // initiateAcc
37359 
37360  void
37362  GPUDynInstPtr gpuDynInst)
37363  {
37364  }
37365 
37368  : Inst_MTBUF(iFmt, "tbuffer_load_format_d16_xy")
37369  {
37370  setFlag(MemoryRef);
37371  setFlag(Load);
37372  setFlag(GlobalSegment);
37373  } // Inst_MTBUF__TBUFFER_LOAD_FORMAT_D16_XY
37374 
37377  {
37378  } // ~Inst_MTBUF__TBUFFER_LOAD_FORMAT_D16_XY
37379 
37380  // Typed buffer load 2 dwords with format conversion.
37381  void
37383  {
37385  }
37386 
37387  void
37389  GPUDynInstPtr gpuDynInst)
37390  {
37391  } // initiateAcc
37392 
37393  void
37395  GPUDynInstPtr gpuDynInst)
37396  {
37397  }
37398 
37401  InFmt_MTBUF *iFmt)
37402  : Inst_MTBUF(iFmt, "tbuffer_load_format_d16_xyz")
37403  {
37404  setFlag(MemoryRef);
37405  setFlag(Load);
37406  setFlag(GlobalSegment);
37407  } // Inst_MTBUF__TBUFFER_LOAD_FORMAT_D16_XYZ
37408 
37411  {
37412  } // ~Inst_MTBUF__TBUFFER_LOAD_FORMAT_D16_XYZ
37413 
37414  // Typed buffer load 3 dwords with format conversion.
37415  void
37417  {
37419  }
37420 
37421  void
37423  GPUDynInstPtr gpuDynInst)
37424  {
37425  } // initiateAcc
37426 
37427  void
37429  GPUDynInstPtr gpuDynInst)
37430  {
37431  }
37432 
37435  InFmt_MTBUF *iFmt)
37436  : Inst_MTBUF(iFmt, "tbuffer_load_format_d16_xyzw")
37437  {
37438  setFlag(MemoryRef);
37439  setFlag(Load);
37440  setFlag(GlobalSegment);
37441  } // Inst_MTBUF__TBUFFER_LOAD_FORMAT_D16_XYZW
37442 
37445  {
37446  } // ~Inst_MTBUF__TBUFFER_LOAD_FORMAT_D16_XYZW
37447 
37448  // Typed buffer load 4 dwords with format conversion.
37449  void
37451  {
37453  }
37454 
37455  void
37457  GPUDynInstPtr gpuDynInst)
37458  {
37459  } // initiateAcc
37460 
37461  void
37463  GPUDynInstPtr gpuDynInst)
37464  {
37465  }
37466 
37469  : Inst_MTBUF(iFmt, "tbuffer_store_format_d16_x")
37470  {
37471  setFlag(MemoryRef);
37472  setFlag(Store);
37473  setFlag(GlobalSegment);
37474  } // Inst_MTBUF__TBUFFER_STORE_FORMAT_D16_X
37475 
37478  {
37479  } // ~Inst_MTBUF__TBUFFER_STORE_FORMAT_D16_X
37480 
37481  // Typed buffer store 1 dword with format conversion.
37482  void
37484  {
37486  }
37487 
37488  void
37490  GPUDynInstPtr gpuDynInst)
37491  {
37492  } // initiateAcc
37493 
37494  void
37496  GPUDynInstPtr gpuDynInst)
37497  {
37498  }
37499 
37502  : Inst_MTBUF(iFmt, "tbuffer_store_format_d16_xy")
37503  {
37504  setFlag(MemoryRef);
37505  setFlag(Store);
37506  setFlag(GlobalSegment);
37507  } // Inst_MTBUF__TBUFFER_STORE_FORMAT_D16_XY
37508 
37511  {
37512  } // ~Inst_MTBUF__TBUFFER_STORE_FORMAT_D16_XY
37513 
37514  // Typed buffer store 2 dwords with format conversion.
37515  void
37517  {
37519  }
37520 
37521  void
37523  GPUDynInstPtr gpuDynInst)
37524  {
37525  } // initiateAcc
37526 
37527  void
37529  GPUDynInstPtr gpuDynInst)
37530  {
37531  }
37532 
37535  : Inst_MTBUF(iFmt, "tbuffer_store_format_d16_xyz")
37536  {
37537  setFlag(MemoryRef);
37538  setFlag(Store);
37539  setFlag(GlobalSegment);
37540  } // Inst_MTBUF__TBUFFER_STORE_FORMAT_D16_XYZ
37541 
37544  {
37545  } // ~Inst_MTBUF__TBUFFER_STORE_FORMAT_D16_XYZ
37546 
37547  // Typed buffer store 3 dwords with format conversion.
37548  void
37550  {
37552  }
37553 
37554  void
37556  GPUDynInstPtr gpuDynInst)
37557  {
37558  } // initiateAcc
37559 
37560  void
37562  GPUDynInstPtr gpuDynInst)
37563  {
37564  }
37565 
37568  : Inst_MTBUF(iFmt, "tbuffer_store_format_d16_xyzw")
37569  {
37570  setFlag(MemoryRef);
37571  setFlag(Store);
37572  setFlag(GlobalSegment);
37573  } // Inst_MTBUF__TBUFFER_STORE_FORMAT_D16_XYZW
37574 
37577  {
37578  } // ~Inst_MTBUF__TBUFFER_STORE_FORMAT_D16_XYZW
37579 
37580  // Typed buffer store 4 dwords with format conversion.
37581  void
37583  GPUDynInstPtr gpuDynInst)
37584  {
37586  }
37587 
37588  void
37590  GPUDynInstPtr gpuDynInst)
37591  {
37592  } // initiateAcc
37593 
37594  void
37596  GPUDynInstPtr gpuDynInst)
37597  {
37598  }
37599 
37601  : Inst_MIMG(iFmt, "image_load")
37602  {
37603  setFlag(MemoryRef);
37604  setFlag(Load);
37605  setFlag(GlobalSegment);
37606  } // Inst_MIMG__IMAGE_LOAD
37607 
37609  {
37610  } // ~Inst_MIMG__IMAGE_LOAD
37611 
37612  // Image memory load with format conversion specified
37613  void
37615  {
37617  }
37618 
37619  void
37621  {
37622  } // initiateAcc
37623 
37624  void
37626  {
37627  }
37628 
37630  : Inst_MIMG(iFmt, "image_load_mip")
37631  {
37632  setFlag(MemoryRef);
37633  setFlag(Load);
37634  setFlag(GlobalSegment);
37635  } // Inst_MIMG__IMAGE_LOAD_MIP
37636 
37638  {
37639  } // ~Inst_MIMG__IMAGE_LOAD_MIP
37640 
37641  void
37643  {
37645  }
37646 
37647  void
37649  {
37650  } // initiateAcc
37651 
37652  void
37654  {
37655  }
37656 
37658  : Inst_MIMG(iFmt, "image_load_pck")
37659  {
37660  setFlag(MemoryRef);
37661  setFlag(Load);
37662  setFlag(GlobalSegment);
37663  } // Inst_MIMG__IMAGE_LOAD_PCK
37664 
37666  {
37667  } // ~Inst_MIMG__IMAGE_LOAD_PCK
37668 
37669  void
37671  {
37673  }
37674 
37675  void
37677  {
37678  } // initiateAcc
37679 
37680  void
37682  {
37683  }
37684 
37686  InFmt_MIMG *iFmt)
37687  : Inst_MIMG(iFmt, "image_load_pck_sgn")
37688  {
37689  setFlag(MemoryRef);
37690  setFlag(Load);
37691  setFlag(GlobalSegment);
37692  } // Inst_MIMG__IMAGE_LOAD_PCK_SGN
37693 
37695  {
37696  } // ~Inst_MIMG__IMAGE_LOAD_PCK_SGN
37697 
37698  // Image memory load with with no format conversion and sign extension
37699  void
37701  {
37703  }
37704 
37705  void
37707  {
37708  } // initiateAcc
37709 
37710  void
37712  {
37713  }
37714 
37716  InFmt_MIMG *iFmt)
37717  : Inst_MIMG(iFmt, "image_load_mip_pck")
37718  {
37719  setFlag(MemoryRef);
37720  setFlag(Load);
37721  setFlag(GlobalSegment);
37722  } // Inst_MIMG__IMAGE_LOAD_MIP_PCK
37723 
37725  {
37726  } // ~Inst_MIMG__IMAGE_LOAD_MIP_PCK
37727 
37728  // Image memory load with user-supplied mip level, no format conversion
37729  void
37731  {
37733  }
37734 
37735  void
37737  {
37738  } // initiateAcc
37739 
37740  void
37742  {
37743  }
37744 
37746  InFmt_MIMG *iFmt)
37747  : Inst_MIMG(iFmt, "image_load_mip_pck_sgn")
37748  {
37749  setFlag(MemoryRef);
37750  setFlag(Load);
37751  setFlag(GlobalSegment);
37752  } // Inst_MIMG__IMAGE_LOAD_MIP_PCK_SGN
37753 
37755  {
37756  } // ~Inst_MIMG__IMAGE_LOAD_MIP_PCK_SGN
37757 
37758  // Image memory load with user-supplied mip level, no format conversion.
37759  void
37761  {
37763  }
37764 
37765  void
37767  {
37768  } // initiateAcc
37769 
37770  void
37772  {
37773  }
37774 
37776  : Inst_MIMG(iFmt, "image_store")
37777  {
37778  setFlag(MemoryRef);
37779  setFlag(Store);
37780  setFlag(GlobalSegment);
37781  } // Inst_MIMG__IMAGE_STORE
37782 
37784  {
37785  } // ~Inst_MIMG__IMAGE_STORE
37786 
37787  // Image memory store with format conversion specified
37788  void
37790  {
37792  }
37793 
37794  void
37796  {
37797  } // initiateAcc
37798 
37799  void
37801  {
37802  }
37803 
37805  : Inst_MIMG(iFmt, "image_store_mip")
37806  {
37807  setFlag(MemoryRef);
37808  setFlag(Store);
37809  setFlag(GlobalSegment);
37810  } // Inst_MIMG__IMAGE_STORE_MIP
37811 
37813  {
37814  } // ~Inst_MIMG__IMAGE_STORE_MIP
37815 
37816  void
37818  {
37820  }
37821 
37822  void
37824  {
37825  } // initiateAcc
37826 
37827  void
37829  {
37830  }
37831 
37833  : Inst_MIMG(iFmt, "image_store_pck")
37834  {
37835  setFlag(MemoryRef);
37836  setFlag(Store);
37837  setFlag(GlobalSegment);
37838  } // Inst_MIMG__IMAGE_STORE_PCK
37839 
37841  {
37842  } // ~Inst_MIMG__IMAGE_STORE_PCK
37843 
37844  // Image memory store of packed data without format conversion.
37845  void
37847  {
37849  }
37850 
37851  void
37853  {
37854  } // initiateAcc
37855 
37856  void
37858  {
37859  }
37860 
37862  InFmt_MIMG *iFmt)
37863  : Inst_MIMG(iFmt, "image_store_mip_pck")
37864  {
37865  setFlag(MemoryRef);
37866  setFlag(Store);
37867  setFlag(GlobalSegment);
37868  } // Inst_MIMG__IMAGE_STORE_MIP_PCK
37869 
37871  {
37872  } // ~Inst_MIMG__IMAGE_STORE_MIP_PCK
37873 
37874  // Image memory store of packed data without format conversion
37875  void
37877  {
37879  }
37880 
37881  void
37883  {
37884  } // initiateAcc
37885 
37886  void
37888  {
37889  }
37890 
37892  InFmt_MIMG *iFmt)
37893  : Inst_MIMG(iFmt, "image_get_resinfo")
37894  {
37895  setFlag(GlobalSegment);
37896  } // Inst_MIMG__IMAGE_GET_RESINFO
37897 
37899  {
37900  } // ~Inst_MIMG__IMAGE_GET_RESINFO
37901 
37902  void
37904  {
37906  }
37907 
37909  InFmt_MIMG *iFmt)
37910  : Inst_MIMG(iFmt, "image_atomic_swap")
37911  {
37912  setFlag(AtomicExch);
37913  if (instData.GLC) {
37914  setFlag(AtomicReturn);
37915  } else {
37916  setFlag(AtomicNoReturn);
37917  }
37918  setFlag(MemoryRef);
37919  setFlag(GlobalSegment);
37920  } // Inst_MIMG__IMAGE_ATOMIC_SWAP
37921 
37923  {
37924  } // ~Inst_MIMG__IMAGE_ATOMIC_SWAP
37925 
37926  // tmp = MEM[ADDR];
37927  // MEM[ADDR] = DATA;
37928  // RETURN_DATA = tmp.
37929  void
37931  {
37933  }
37934 
37936  InFmt_MIMG *iFmt)
37937  : Inst_MIMG(iFmt, "image_atomic_cmpswap")
37938  {
37939  setFlag(AtomicCAS);
37940  if (instData.GLC) {
37941  setFlag(AtomicReturn);
37942  } else {
37943  setFlag(AtomicNoReturn);
37944  }
37945  setFlag(MemoryRef);
37946  setFlag(GlobalSegment);
37947  } // Inst_MIMG__IMAGE_ATOMIC_CMPSWAP
37948 
37950  {
37951  } // ~Inst_MIMG__IMAGE_ATOMIC_CMPSWAP
37952 
37953  // tmp = MEM[ADDR];
37954  // src = DATA[0];
37955  // cmp = DATA[1];
37956  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
37957  // RETURN_DATA[0] = tmp.
37958  void
37960  {
37962  }
37963 
37965  : Inst_MIMG(iFmt, "image_atomic_add")
37966  {
37967  setFlag(AtomicAdd);
37968  if (instData.GLC) {
37969  setFlag(AtomicReturn);
37970  } else {
37971  setFlag(AtomicNoReturn);
37972  }
37973  setFlag(MemoryRef);
37974  setFlag(GlobalSegment);
37975  } // Inst_MIMG__IMAGE_ATOMIC_ADD
37976 
37978  {
37979  } // ~Inst_MIMG__IMAGE_ATOMIC_ADD
37980 
37981  // tmp = MEM[ADDR];
37982  // MEM[ADDR] += DATA;
37983  // RETURN_DATA = tmp.
37984  void
37986  {
37988  }
37989 
37991  : Inst_MIMG(iFmt, "image_atomic_sub")
37992  {
37993  setFlag(AtomicSub);
37994  if (instData.GLC) {
37995  setFlag(AtomicReturn);
37996  } else {
37997  setFlag(AtomicNoReturn);
37998  }
37999  setFlag(MemoryRef);
38000  setFlag(GlobalSegment);
38001  } // Inst_MIMG__IMAGE_ATOMIC_SUB
38002 
38004  {
38005  } // ~Inst_MIMG__IMAGE_ATOMIC_SUB
38006 
38007  // tmp = MEM[ADDR];
38008  // MEM[ADDR] -= DATA;
38009  // RETURN_DATA = tmp.
38010  void
38012  {
38014  }
38015 
38017  InFmt_MIMG *iFmt)
38018  : Inst_MIMG(iFmt, "image_atomic_smin")
38019  {
38020  setFlag(AtomicMin);
38021  if (instData.GLC) {
38022  setFlag(AtomicReturn);
38023  } else {
38024  setFlag(AtomicNoReturn);
38025  }
38026  setFlag(MemoryRef);
38027  setFlag(GlobalSegment);
38028  } // Inst_MIMG__IMAGE_ATOMIC_SMIN
38029 
38031  {
38032  } // ~Inst_MIMG__IMAGE_ATOMIC_SMIN
38033 
38034  // tmp = MEM[ADDR];
38035  // MEM[ADDR] = (DATA < tmp) ? DATA : tmp (signed compare);
38036  // RETURN_DATA = tmp.
38037  void
38039  {
38041  }
38042 
38044  InFmt_MIMG *iFmt)
38045  : Inst_MIMG(iFmt, "image_atomic_umin")
38046  {
38047  setFlag(AtomicMin);
38048  if (instData.GLC) {
38049  setFlag(AtomicReturn);
38050  } else {
38051  setFlag(AtomicNoReturn);
38052  }
38053  setFlag(MemoryRef);
38054  setFlag(GlobalSegment);
38055  } // Inst_MIMG__IMAGE_ATOMIC_UMIN
38056 
38058  {
38059  } // ~Inst_MIMG__IMAGE_ATOMIC_UMIN
38060 
38061  // tmp = MEM[ADDR];
38062  // MEM[ADDR] = (DATA < tmp) ? DATA : tmp (unsigned compare);
38063  // RETURN_DATA = tmp.
38064  void
38066  {
38068  }
38069 
38071  InFmt_MIMG *iFmt)
38072  : Inst_MIMG(iFmt, "image_atomic_smax")
38073  {
38074  setFlag(AtomicMax);
38075  if (instData.GLC) {
38076  setFlag(AtomicReturn);
38077  } else {
38078  setFlag(AtomicNoReturn);
38079  }
38080  setFlag(MemoryRef);
38081  setFlag(GlobalSegment);
38082  } // Inst_MIMG__IMAGE_ATOMIC_SMAX
38083 
38085  {
38086  } // ~Inst_MIMG__IMAGE_ATOMIC_SMAX
38087 
38088  // tmp = MEM[ADDR];
38089  // MEM[ADDR] = (DATA > tmp) ? DATA : tmp (signed compare);
38090  // RETURN_DATA = tmp.
38091  void
38093  {
38095  }
38096 
38098  InFmt_MIMG *iFmt)
38099  : Inst_MIMG(iFmt, "image_atomic_umax")
38100  {
38101  setFlag(AtomicMax);
38102  if (instData.GLC) {
38103  setFlag(AtomicReturn);
38104  } else {
38105  setFlag(AtomicNoReturn);
38106  }
38107  setFlag(MemoryRef);
38108  setFlag(GlobalSegment);
38109  } // Inst_MIMG__IMAGE_ATOMIC_UMAX
38110 
38112  {
38113  } // ~Inst_MIMG__IMAGE_ATOMIC_UMAX
38114 
38115  // tmp = MEM[ADDR];
38116  // MEM[ADDR] = (DATA > tmp) ? DATA : tmp (unsigned compare);
38117  // RETURN_DATA = tmp.
38118  void
38120  {
38122  }
38123 
38125  : Inst_MIMG(iFmt, "image_atomic_and")
38126  {
38127  setFlag(AtomicAnd);
38128  if (instData.GLC) {
38129  setFlag(AtomicReturn);
38130  } else {
38131  setFlag(AtomicNoReturn);
38132  }
38133  setFlag(MemoryRef);
38134  setFlag(GlobalSegment);
38135  } // Inst_MIMG__IMAGE_ATOMIC_AND
38136 
38138  {
38139  } // ~Inst_MIMG__IMAGE_ATOMIC_AND
38140 
38141  // tmp = MEM[ADDR];
38142  // MEM[ADDR] &= DATA;
38143  // RETURN_DATA = tmp.
38144  void
38146  {
38148  }
38149 
38151  : Inst_MIMG(iFmt, "image_atomic_or")
38152  {
38153  setFlag(AtomicOr);
38154  if (instData.GLC) {
38155  setFlag(AtomicReturn);
38156  } else {
38157  setFlag(AtomicNoReturn);
38158  }
38159  setFlag(MemoryRef);
38160  setFlag(GlobalSegment);
38161  } // Inst_MIMG__IMAGE_ATOMIC_OR
38162 
38164  {
38165  } // ~Inst_MIMG__IMAGE_ATOMIC_OR
38166 
38167  // tmp = MEM[ADDR];
38168  // MEM[ADDR] |= DATA;
38169  // RETURN_DATA = tmp.
38170  void
38172  {
38174  }
38175 
38177  : Inst_MIMG(iFmt, "image_atomic_xor")
38178  {
38179  setFlag(AtomicXor);
38180  if (instData.GLC) {
38181  setFlag(AtomicReturn);
38182  } else {
38183  setFlag(AtomicNoReturn);
38184  }
38185  setFlag(MemoryRef);
38186  setFlag(GlobalSegment);
38187  } // Inst_MIMG__IMAGE_ATOMIC_XOR
38188 
38190  {
38191  } // ~Inst_MIMG__IMAGE_ATOMIC_XOR
38192 
38193  // tmp = MEM[ADDR];
38194  // MEM[ADDR] ^= DATA;
38195  // RETURN_DATA = tmp.
38196  void
38198  {
38200  }
38201 
38203  : Inst_MIMG(iFmt, "image_atomic_inc")
38204  {
38205  setFlag(AtomicInc);
38206  if (instData.GLC) {
38207  setFlag(AtomicReturn);
38208  } else {
38209  setFlag(AtomicNoReturn);
38210  }
38211  setFlag(MemoryRef);
38212  setFlag(GlobalSegment);
38213  } // Inst_MIMG__IMAGE_ATOMIC_INC
38214 
38216  {
38217  } // ~Inst_MIMG__IMAGE_ATOMIC_INC
38218 
38219  // tmp = MEM[ADDR];
38220  // MEM[ADDR] = (tmp >= DATA) ? 0 : tmp + 1 (unsigned compare);
38221  // RETURN_DATA = tmp.
38222  void
38224  {
38226  }
38227 
38229  : Inst_MIMG(iFmt, "image_atomic_dec")
38230  {
38231  setFlag(AtomicDec);
38232  if (instData.GLC) {
38233  setFlag(AtomicReturn);
38234  } else {
38235  setFlag(AtomicNoReturn);
38236  }
38237  setFlag(MemoryRef);
38238  setFlag(GlobalSegment);
38239  } // Inst_MIMG__IMAGE_ATOMIC_DEC
38240 
38242  {
38243  } // ~Inst_MIMG__IMAGE_ATOMIC_DEC
38244 
38245  // tmp = MEM[ADDR];
38246  // MEM[ADDR] = (tmp == 0 || tmp > DATA) ? DATA : tmp - 1
38247  // (unsigned compare); RETURN_DATA = tmp.
38248  void
38250  {
38252  }
38253 
38255  : Inst_MIMG(iFmt, "image_sample")
38256  {
38257  setFlag(GlobalSegment);
38258  } // Inst_MIMG__IMAGE_SAMPLE
38259 
38261  {
38262  } // ~Inst_MIMG__IMAGE_SAMPLE
38263 
38264  void
38266  {
38268  }
38269 
38271  : Inst_MIMG(iFmt, "image_sample_cl")
38272  {
38273  setFlag(GlobalSegment);
38274  } // Inst_MIMG__IMAGE_SAMPLE_CL
38275 
38277  {
38278  } // ~Inst_MIMG__IMAGE_SAMPLE_CL
38279 
38280  void
38282  {
38284  }
38285 
38287  : Inst_MIMG(iFmt, "image_sample_d")
38288  {
38289  setFlag(GlobalSegment);
38290  } // Inst_MIMG__IMAGE_SAMPLE_D
38291 
38293  {
38294  } // ~Inst_MIMG__IMAGE_SAMPLE_D
38295 
38296  void
38298  {
38300  }
38301 
38303  InFmt_MIMG *iFmt)
38304  : Inst_MIMG(iFmt, "image_sample_d_cl")
38305  {
38306  setFlag(GlobalSegment);
38307  } // Inst_MIMG__IMAGE_SAMPLE_D_CL
38308 
38310  {
38311  } // ~Inst_MIMG__IMAGE_SAMPLE_D_CL
38312 
38313  void
38315  {
38317  }
38318 
38320  : Inst_MIMG(iFmt, "image_sample_l")
38321  {
38322  setFlag(GlobalSegment);
38323  } // Inst_MIMG__IMAGE_SAMPLE_L
38324 
38326  {
38327  } // ~Inst_MIMG__IMAGE_SAMPLE_L
38328 
38329  void
38331  {
38333  }
38334 
38336  : Inst_MIMG(iFmt, "image_sample_b")
38337  {
38338  setFlag(GlobalSegment);
38339  } // Inst_MIMG__IMAGE_SAMPLE_B
38340 
38342  {
38343  } // ~Inst_MIMG__IMAGE_SAMPLE_B
38344 
38345  void
38347  {
38349  }
38350 
38352  InFmt_MIMG *iFmt)
38353  : Inst_MIMG(iFmt, "image_sample_b_cl")
38354  {
38355  setFlag(GlobalSegment);
38356  } // Inst_MIMG__IMAGE_SAMPLE_B_CL
38357 
38359  {
38360  } // ~Inst_MIMG__IMAGE_SAMPLE_B_CL
38361 
38362  void
38364  {
38366  }
38367 
38369  : Inst_MIMG(iFmt, "image_sample_lz")
38370  {
38371  setFlag(GlobalSegment);
38372  } // Inst_MIMG__IMAGE_SAMPLE_LZ
38373 
38375  {
38376  } // ~Inst_MIMG__IMAGE_SAMPLE_LZ
38377 
38378  void
38380  {
38382  }
38383 
38385  : Inst_MIMG(iFmt, "image_sample_c")
38386  {
38387  setFlag(GlobalSegment);
38388  } // Inst_MIMG__IMAGE_SAMPLE_C
38389 
38391  {
38392  } // ~Inst_MIMG__IMAGE_SAMPLE_C
38393 
38394  void
38396  {
38398  }
38399 
38401  InFmt_MIMG *iFmt)
38402  : Inst_MIMG(iFmt, "image_sample_c_cl")
38403  {
38404  setFlag(GlobalSegment);
38405  } // Inst_MIMG__IMAGE_SAMPLE_C_CL
38406 
38408  {
38409  } // ~Inst_MIMG__IMAGE_SAMPLE_C_CL
38410 
38411  void
38413  {
38415  }
38416 
38418  : Inst_MIMG(iFmt, "image_sample_c_d")
38419  {
38420  setFlag(GlobalSegment);
38421  } // Inst_MIMG__IMAGE_SAMPLE_C_D
38422 
38424  {
38425  } // ~Inst_MIMG__IMAGE_SAMPLE_C_D
38426 
38427  void
38429  {
38431  }
38432 
38434  InFmt_MIMG *iFmt)
38435  : Inst_MIMG(iFmt, "image_sample_c_d_cl")
38436  {
38437  setFlag(GlobalSegment);
38438  } // Inst_MIMG__IMAGE_SAMPLE_C_D_CL
38439 
38441  {
38442  } // ~Inst_MIMG__IMAGE_SAMPLE_C_D_CL
38443 
38444  void
38446  {
38448  }
38449 
38451  : Inst_MIMG(iFmt, "image_sample_c_l")
38452  {
38453  setFlag(GlobalSegment);
38454  } // Inst_MIMG__IMAGE_SAMPLE_C_L
38455 
38457  {
38458  } // ~Inst_MIMG__IMAGE_SAMPLE_C_L
38459 
38460  void
38462  {
38464  }
38465 
38467  : Inst_MIMG(iFmt, "image_sample_c_b")
38468  {
38469  setFlag(GlobalSegment);
38470  } // Inst_MIMG__IMAGE_SAMPLE_C_B
38471 
38473  {
38474  } // ~Inst_MIMG__IMAGE_SAMPLE_C_B
38475 
38476  void
38478  {
38480  }
38481 
38483  InFmt_MIMG *iFmt)
38484  : Inst_MIMG(iFmt, "image_sample_c_b_cl")
38485  {
38486  setFlag(GlobalSegment);
38487  } // Inst_MIMG__IMAGE_SAMPLE_C_B_CL
38488 
38490  {
38491  } // ~Inst_MIMG__IMAGE_SAMPLE_C_B_CL
38492 
38493  void
38495  {
38497  }
38498 
38500  InFmt_MIMG *iFmt)
38501  : Inst_MIMG(iFmt, "image_sample_c_lz")
38502  {
38503  setFlag(GlobalSegment);
38504  } // Inst_MIMG__IMAGE_SAMPLE_C_LZ
38505 
38507  {
38508  } // ~Inst_MIMG__IMAGE_SAMPLE_C_LZ
38509 
38510  void
38512  {
38514  }
38515 
38517  : Inst_MIMG(iFmt, "image_sample_o")
38518  {
38519  setFlag(GlobalSegment);
38520  } // Inst_MIMG__IMAGE_SAMPLE_O
38521 
38523  {
38524  } // ~Inst_MIMG__IMAGE_SAMPLE_O
38525 
38526  void
38528  {
38530  }
38531 
38533  InFmt_MIMG *iFmt)
38534  : Inst_MIMG(iFmt, "image_sample_cl_o")
38535  {
38536  setFlag(GlobalSegment);
38537  } // Inst_MIMG__IMAGE_SAMPLE_CL_O
38538 
38540  {
38541  } // ~Inst_MIMG__IMAGE_SAMPLE_CL_O
38542 
38543  void
38545  {
38547  }
38548 
38550  : Inst_MIMG(iFmt, "image_sample_d_o")
38551  {
38552  setFlag(GlobalSegment);
38553  } // Inst_MIMG__IMAGE_SAMPLE_D_O
38554 
38556  {
38557  } // ~Inst_MIMG__IMAGE_SAMPLE_D_O
38558 
38559  void
38561  {
38563  }
38564 
38566  InFmt_MIMG *iFmt)
38567  : Inst_MIMG(iFmt, "image_sample_d_cl_o")
38568  {
38569  setFlag(GlobalSegment);
38570  } // Inst_MIMG__IMAGE_SAMPLE_D_CL_O
38571 
38573  {
38574  } // ~Inst_MIMG__IMAGE_SAMPLE_D_CL_O
38575 
38576  void
38578  {
38580  }
38581 
38583  : Inst_MIMG(iFmt, "image_sample_l_o")
38584  {
38585  setFlag(GlobalSegment);
38586  } // Inst_MIMG__IMAGE_SAMPLE_L_O
38587 
38589  {
38590  } // ~Inst_MIMG__IMAGE_SAMPLE_L_O
38591 
38592  void
38594  {
38596  }
38597 
38599  : Inst_MIMG(iFmt, "image_sample_b_o")
38600  {
38601  setFlag(GlobalSegment);
38602  } // Inst_MIMG__IMAGE_SAMPLE_B_O
38603 
38605  {
38606  } // ~Inst_MIMG__IMAGE_SAMPLE_B_O
38607 
38608  void
38610  {
38612  }
38613 
38615  InFmt_MIMG *iFmt)
38616  : Inst_MIMG(iFmt, "image_sample_b_cl_o")
38617  {
38618  setFlag(GlobalSegment);
38619  } // Inst_MIMG__IMAGE_SAMPLE_B_CL_O
38620 
38622  {
38623  } // ~Inst_MIMG__IMAGE_SAMPLE_B_CL_O
38624 
38625  void
38627  {
38629  }
38630 
38632  InFmt_MIMG *iFmt)
38633  : Inst_MIMG(iFmt, "image_sample_lz_o")
38634  {
38635  setFlag(GlobalSegment);
38636  } // Inst_MIMG__IMAGE_SAMPLE_LZ_O
38637 
38639  {
38640  } // ~Inst_MIMG__IMAGE_SAMPLE_LZ_O
38641 
38642  void
38644  {
38646  }
38647 
38649  : Inst_MIMG(iFmt, "image_sample_c_o")
38650  {
38651  setFlag(GlobalSegment);
38652  } // Inst_MIMG__IMAGE_SAMPLE_C_O
38653 
38655  {
38656  } // ~Inst_MIMG__IMAGE_SAMPLE_C_O
38657 
38658  void
38660  {
38662  }
38663 
38665  InFmt_MIMG *iFmt)
38666  : Inst_MIMG(iFmt, "image_sample_c_cl_o")
38667  {
38668  setFlag(GlobalSegment);
38669  } // Inst_MIMG__IMAGE_SAMPLE_C_CL_O
38670 
38672  {
38673  } // ~Inst_MIMG__IMAGE_SAMPLE_C_CL_O
38674 
38675  void
38677  {
38679  }
38680 
38682  InFmt_MIMG *iFmt)
38683  : Inst_MIMG(iFmt, "image_sample_c_d_o")
38684  {
38685  setFlag(GlobalSegment);
38686  } // Inst_MIMG__IMAGE_SAMPLE_C_D_O
38687 
38689  {
38690  } // ~Inst_MIMG__IMAGE_SAMPLE_C_D_O
38691 
38692  void
38694  {
38696  }
38697 
38699  InFmt_MIMG *iFmt)
38700  : Inst_MIMG(iFmt, "image_sample_c_d_cl_o")
38701  {
38702  setFlag(GlobalSegment);
38703  } // Inst_MIMG__IMAGE_SAMPLE_C_D_CL_O
38704 
38706  {
38707  } // ~Inst_MIMG__IMAGE_SAMPLE_C_D_CL_O
38708 
38709  void
38711  {
38713  }
38714 
38716  InFmt_MIMG *iFmt)
38717  : Inst_MIMG(iFmt, "image_sample_c_l_o")
38718  {
38719  setFlag(GlobalSegment);
38720  } // Inst_MIMG__IMAGE_SAMPLE_C_L_O
38721 
38723  {
38724  } // ~Inst_MIMG__IMAGE_SAMPLE_C_L_O
38725 
38726  void
38728  {
38730  }
38731 
38733  InFmt_MIMG *iFmt)
38734  : Inst_MIMG(iFmt, "image_sample_c_b_o")
38735  {
38736  setFlag(GlobalSegment);
38737  } // Inst_MIMG__IMAGE_SAMPLE_C_B_O
38738 
38740  {
38741  } // ~Inst_MIMG__IMAGE_SAMPLE_C_B_O
38742 
38743  void
38745  {
38747  }
38748 
38750  InFmt_MIMG *iFmt)
38751  : Inst_MIMG(iFmt, "image_sample_c_b_cl_o")
38752  {
38753  setFlag(GlobalSegment);
38754  } // Inst_MIMG__IMAGE_SAMPLE_C_B_CL_O
38755 
38757  {
38758  } // ~Inst_MIMG__IMAGE_SAMPLE_C_B_CL_O
38759 
38760  void
38762  {
38764  }
38765 
38767  InFmt_MIMG *iFmt)
38768  : Inst_MIMG(iFmt, "image_sample_c_lz_o")
38769  {
38770  setFlag(GlobalSegment);
38771  } // Inst_MIMG__IMAGE_SAMPLE_C_LZ_O
38772 
38774  {
38775  } // ~Inst_MIMG__IMAGE_SAMPLE_C_LZ_O
38776 
38777  void
38779  {
38781  }
38782 
38784  : Inst_MIMG(iFmt, "image_gather4")
38785  {
38786  setFlag(GlobalSegment);
38787  } // Inst_MIMG__IMAGE_GATHER4
38788 
38790  {
38791  } // ~Inst_MIMG__IMAGE_GATHER4
38792 
38793  void
38795  {
38797  }
38798 
38800  : Inst_MIMG(iFmt, "image_gather4_cl")
38801  {
38802  setFlag(GlobalSegment);
38803  } // Inst_MIMG__IMAGE_GATHER4_CL
38804 
38806  {
38807  } // ~Inst_MIMG__IMAGE_GATHER4_CL
38808 
38809  void
38811  {
38813  }
38814 
38816  : Inst_MIMG(iFmt, "image_gather4_l")
38817  {
38818  setFlag(GlobalSegment);
38819  } // Inst_MIMG__IMAGE_GATHER4_L
38820 
38822  {
38823  } // ~Inst_MIMG__IMAGE_GATHER4_L
38824 
38825  void
38827  {
38829  }
38830 
38832  : Inst_MIMG(iFmt, "image_gather4_b")
38833  {
38834  setFlag(GlobalSegment);
38835  } // Inst_MIMG__IMAGE_GATHER4_B
38836 
38838  {
38839  } // ~Inst_MIMG__IMAGE_GATHER4_B
38840 
38841  void
38843  {
38845  }
38846 
38848  InFmt_MIMG *iFmt)
38849  : Inst_MIMG(iFmt, "image_gather4_b_cl")
38850  {
38851  setFlag(GlobalSegment);
38852  } // Inst_MIMG__IMAGE_GATHER4_B_CL
38853 
38855  {
38856  } // ~Inst_MIMG__IMAGE_GATHER4_B_CL
38857 
38858  void
38860  {
38862  }
38863 
38865  : Inst_MIMG(iFmt, "image_gather4_lz")
38866  {
38867  setFlag(GlobalSegment);
38868  } // Inst_MIMG__IMAGE_GATHER4_LZ
38869 
38871  {
38872  } // ~Inst_MIMG__IMAGE_GATHER4_LZ
38873 
38874  void
38876  {
38878  }
38879 
38881  : Inst_MIMG(iFmt, "image_gather4_c")
38882  {
38883  setFlag(GlobalSegment);
38884  } // Inst_MIMG__IMAGE_GATHER4_C
38885 
38887  {
38888  } // ~Inst_MIMG__IMAGE_GATHER4_C
38889 
38890  void
38892  {
38894  }
38895 
38897  InFmt_MIMG *iFmt)
38898  : Inst_MIMG(iFmt, "image_gather4_c_cl")
38899  {
38900  setFlag(GlobalSegment);
38901  } // Inst_MIMG__IMAGE_GATHER4_C_CL
38902 
38904  {
38905  } // ~Inst_MIMG__IMAGE_GATHER4_C_CL
38906 
38907  void
38909  {
38911  }
38912 
38914  InFmt_MIMG *iFmt)
38915  : Inst_MIMG(iFmt, "image_gather4_c_l")
38916  {
38917  setFlag(GlobalSegment);
38918  } // Inst_MIMG__IMAGE_GATHER4_C_L
38919 
38921  {
38922  } // ~Inst_MIMG__IMAGE_GATHER4_C_L
38923 
38924  void
38926  {
38928  }
38929 
38931  InFmt_MIMG *iFmt)
38932  : Inst_MIMG(iFmt, "image_gather4_c_b")
38933  {
38934  setFlag(GlobalSegment);
38935  } // Inst_MIMG__IMAGE_GATHER4_C_B
38936 
38938  {
38939  } // ~Inst_MIMG__IMAGE_GATHER4_C_B
38940 
38941  void
38943  {
38945  }
38946 
38948  InFmt_MIMG *iFmt)
38949  : Inst_MIMG(iFmt, "image_gather4_c_b_cl")
38950  {
38951  setFlag(GlobalSegment);
38952  } // Inst_MIMG__IMAGE_GATHER4_C_B_CL
38953 
38955  {
38956  } // ~Inst_MIMG__IMAGE_GATHER4_C_B_CL
38957 
38958  void
38960  {
38962  }
38963 
38965  InFmt_MIMG *iFmt)
38966  : Inst_MIMG(iFmt, "image_gather4_c_lz")
38967  {
38968  setFlag(GlobalSegment);
38969  } // Inst_MIMG__IMAGE_GATHER4_C_LZ
38970 
38972  {
38973  } // ~Inst_MIMG__IMAGE_GATHER4_C_LZ
38974 
38975  void
38977  {
38979  }
38980 
38982  : Inst_MIMG(iFmt, "image_gather4_o")
38983  {
38984  setFlag(GlobalSegment);
38985  } // Inst_MIMG__IMAGE_GATHER4_O
38986 
38988  {
38989  } // ~Inst_MIMG__IMAGE_GATHER4_O
38990 
38991  void
38993  {
38995  }
38996 
38998  InFmt_MIMG *iFmt)
38999  : Inst_MIMG(iFmt, "image_gather4_cl_o")
39000  {
39001  setFlag(GlobalSegment);
39002  } // Inst_MIMG__IMAGE_GATHER4_CL_O
39003 
39005  {
39006  } // ~Inst_MIMG__IMAGE_GATHER4_CL_O
39007 
39008  void
39010  {
39012  }
39013 
39015  InFmt_MIMG *iFmt)
39016  : Inst_MIMG(iFmt, "image_gather4_l_o")
39017  {
39018  setFlag(GlobalSegment);
39019  } // Inst_MIMG__IMAGE_GATHER4_L_O
39020 
39022  {
39023  } // ~Inst_MIMG__IMAGE_GATHER4_L_O
39024 
39025  void
39027  {
39029  }
39030 
39032  InFmt_MIMG *iFmt)
39033  : Inst_MIMG(iFmt, "image_gather4_b_o")
39034  {
39035  setFlag(GlobalSegment);
39036  } // Inst_MIMG__IMAGE_GATHER4_B_O
39037 
39039  {
39040  } // ~Inst_MIMG__IMAGE_GATHER4_B_O
39041 
39042  void
39044  {
39046  }
39047 
39049  InFmt_MIMG *iFmt)
39050  : Inst_MIMG(iFmt, "image_gather4_b_cl_o")
39051  {
39052  setFlag(GlobalSegment);
39053  } // Inst_MIMG__IMAGE_GATHER4_B_CL_O
39054 
39056  {
39057  } // ~Inst_MIMG__IMAGE_GATHER4_B_CL_O
39058 
39059  void
39061  {
39063  }
39064 
39066  InFmt_MIMG *iFmt)
39067  : Inst_MIMG(iFmt, "image_gather4_lz_o")
39068  {
39069  setFlag(GlobalSegment);
39070  } // Inst_MIMG__IMAGE_GATHER4_LZ_O
39071 
39073  {
39074  } // ~Inst_MIMG__IMAGE_GATHER4_LZ_O
39075 
39076  void
39078  {
39080  }
39081 
39083  InFmt_MIMG *iFmt)
39084  : Inst_MIMG(iFmt, "image_gather4_c_o")
39085  {
39086  setFlag(GlobalSegment);
39087  } // Inst_MIMG__IMAGE_GATHER4_C_O
39088 
39090  {
39091  } // ~Inst_MIMG__IMAGE_GATHER4_C_O
39092 
39093  void
39095  {
39097  }
39098 
39100  InFmt_MIMG *iFmt)
39101  : Inst_MIMG(iFmt, "image_gather4_c_cl_o")
39102  {
39103  setFlag(GlobalSegment);
39104  } // Inst_MIMG__IMAGE_GATHER4_C_CL_O
39105 
39107  {
39108  } // ~Inst_MIMG__IMAGE_GATHER4_C_CL_O
39109 
39110  void
39112  {
39114  }
39115 
39117  InFmt_MIMG *iFmt)
39118  : Inst_MIMG(iFmt, "image_gather4_c_l_o")
39119  {
39120  setFlag(GlobalSegment);
39121  } // Inst_MIMG__IMAGE_GATHER4_C_L_O
39122 
39124  {
39125  } // ~Inst_MIMG__IMAGE_GATHER4_C_L_O
39126 
39127  void
39129  {
39131  }
39132 
39134  InFmt_MIMG *iFmt)
39135  : Inst_MIMG(iFmt, "image_gather4_c_b_o")
39136  {
39137  setFlag(GlobalSegment);
39138  } // Inst_MIMG__IMAGE_GATHER4_C_B_O
39139 
39141  {
39142  } // ~Inst_MIMG__IMAGE_GATHER4_C_B_O
39143 
39144  void
39146  {
39148  }
39149 
39151  InFmt_MIMG *iFmt)
39152  : Inst_MIMG(iFmt, "image_gather4_c_b_cl_o")
39153  {
39154  setFlag(GlobalSegment);
39155  } // Inst_MIMG__IMAGE_GATHER4_C_B_CL_O
39156 
39158  {
39159  } // ~Inst_MIMG__IMAGE_GATHER4_C_B_CL_O
39160 
39161  void
39163  {
39165  }
39166 
39168  InFmt_MIMG *iFmt)
39169  : Inst_MIMG(iFmt, "image_gather4_c_lz_o")
39170  {
39171  setFlag(GlobalSegment);
39172  } // Inst_MIMG__IMAGE_GATHER4_C_LZ_O
39173 
39175  {
39176  } // ~Inst_MIMG__IMAGE_GATHER4_C_LZ_O
39177 
39178  void
39180  {
39182  }
39183 
39185  : Inst_MIMG(iFmt, "image_get_lod")
39186  {
39187  setFlag(GlobalSegment);
39188  } // Inst_MIMG__IMAGE_GET_LOD
39189 
39191  {
39192  } // ~Inst_MIMG__IMAGE_GET_LOD
39193 
39194  void
39196  {
39198  }
39199 
39201  : Inst_MIMG(iFmt, "image_sample_cd")
39202  {
39203  setFlag(GlobalSegment);
39204  } // Inst_MIMG__IMAGE_SAMPLE_CD
39205 
39207  {
39208  } // ~Inst_MIMG__IMAGE_SAMPLE_CD
39209 
39210  void
39212  {
39214  }
39215 
39217  InFmt_MIMG *iFmt)
39218  : Inst_MIMG(iFmt, "image_sample_cd_cl")
39219  {
39220  setFlag(GlobalSegment);
39221  } // Inst_MIMG__IMAGE_SAMPLE_CD_CL
39222 
39224  {
39225  } // ~Inst_MIMG__IMAGE_SAMPLE_CD_CL
39226 
39227  void
39229  {
39231  }
39232 
39234  InFmt_MIMG *iFmt)
39235  : Inst_MIMG(iFmt, "image_sample_c_cd")
39236  {
39237  setFlag(GlobalSegment);
39238  } // Inst_MIMG__IMAGE_SAMPLE_C_CD
39239 
39241  {
39242  } // ~Inst_MIMG__IMAGE_SAMPLE_C_CD
39243 
39244  void
39246  {
39248  }
39249 
39251  InFmt_MIMG *iFmt)
39252  : Inst_MIMG(iFmt, "image_sample_c_cd_cl")
39253  {
39254  setFlag(GlobalSegment);
39255  } // Inst_MIMG__IMAGE_SAMPLE_C_CD_CL
39256 
39258  {
39259  } // ~Inst_MIMG__IMAGE_SAMPLE_C_CD_CL
39260 
39261  void
39263  {
39265  }
39266 
39268  InFmt_MIMG *iFmt)
39269  : Inst_MIMG(iFmt, "image_sample_cd_o")
39270  {
39271  setFlag(GlobalSegment);
39272  } // Inst_MIMG__IMAGE_SAMPLE_CD_O
39273 
39275  {
39276  } // ~Inst_MIMG__IMAGE_SAMPLE_CD_O
39277 
39278  void
39280  {
39282  }
39283 
39285  InFmt_MIMG *iFmt)
39286  : Inst_MIMG(iFmt, "image_sample_cd_cl_o")
39287  {
39288  setFlag(GlobalSegment);
39289  } // Inst_MIMG__IMAGE_SAMPLE_CD_CL_O
39290 
39292  {
39293  } // ~Inst_MIMG__IMAGE_SAMPLE_CD_CL_O
39294 
39295  void
39297  {
39299  }
39300 
39302  InFmt_MIMG *iFmt)
39303  : Inst_MIMG(iFmt, "image_sample_c_cd_o")
39304  {
39305  setFlag(GlobalSegment);
39306  } // Inst_MIMG__IMAGE_SAMPLE_C_CD_O
39307 
39309  {
39310  } // ~Inst_MIMG__IMAGE_SAMPLE_C_CD_O
39311 
39312  void
39314  {
39316  }
39317 
39319  InFmt_MIMG *iFmt)
39320  : Inst_MIMG(iFmt, "image_sample_c_cd_cl_o")
39321  {
39322  setFlag(GlobalSegment);
39323  } // Inst_MIMG__IMAGE_SAMPLE_C_CD_CL_O
39324 
39326  {
39327  } // ~Inst_MIMG__IMAGE_SAMPLE_C_CD_CL_O
39328 
39329  void
39331  {
39333  }
39334 
39336  : Inst_EXP(iFmt, "exp")
39337  {
39338  } // Inst_EXP__EXP
39339 
39341  {
39342  } // ~Inst_EXP__EXP
39343 
39344  void
39346  {
39348  }
39349 
39351  : Inst_FLAT(iFmt, "flat_load_ubyte")
39352  {
39353  setFlag(MemoryRef);
39354  setFlag(Load);
39355  } // Inst_FLAT__FLAT_LOAD_UBYTE
39356 
39358  {
39359  } // ~Inst_FLAT__FLAT_LOAD_UBYTE
39360 
39361  // Untyped buffer load unsigned byte (zero extend to VGPR destination).
39362  void
39364  {
39365  Wavefront *wf = gpuDynInst->wavefront();
39366 
39367  if (gpuDynInst->exec_mask.none()) {
39368  wf->decVMemInstsIssued();
39369  wf->decLGKMInstsIssued();
39370  wf->rdGmReqsInPipe--;
39371  wf->rdLmReqsInPipe--;
39372  return;
39373  }
39374 
39375  gpuDynInst->execUnitId = wf->execUnitId;
39376  gpuDynInst->latency.init(gpuDynInst->computeUnit());
39377  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
39378 
39379  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
39380 
39381  addr.read();
39382 
39383  calcAddr(gpuDynInst, addr);
39384 
39385  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
39386  gpuDynInst->computeUnit()->globalMemoryPipe
39387  .issueRequest(gpuDynInst);
39388  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
39389  gpuDynInst->computeUnit()->localMemoryPipe
39390  .issueRequest(gpuDynInst);
39391  } else {
39392  fatal("Unsupported scope for flat instruction.\n");
39393  }
39394  } // execute
39395 
39396  void
39398  {
39399  initMemRead<VecElemU8>(gpuDynInst);
39400  } // initiateAcc
39401 
39402  void
39404  {
39405  VecOperandU32 vdst(gpuDynInst, extData.VDST);
39406 
39407  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
39408  if (gpuDynInst->exec_mask[lane]) {
39409  vdst[lane] = (VecElemU32)((reinterpret_cast<VecElemU8*>(
39410  gpuDynInst->d_data))[lane]);
39411  }
39412  }
39413  vdst.write();
39414  } // execute
39415  // --- Inst_FLAT__FLAT_LOAD_SBYTE class methods ---
39416 
39418  : Inst_FLAT(iFmt, "flat_load_sbyte")
39419  {
39420  setFlag(MemoryRef);
39421  setFlag(Load);
39422  } // Inst_FLAT__FLAT_LOAD_SBYTE
39423 
39425  {
39426  } // ~Inst_FLAT__FLAT_LOAD_SBYTE
39427 
39428  // Untyped buffer load signed byte (sign extend to VGPR destination).
39429  void
39431  {
39432  Wavefront *wf = gpuDynInst->wavefront();
39433 
39434  if (gpuDynInst->exec_mask.none()) {
39435  wf->decVMemInstsIssued();
39436  wf->decLGKMInstsIssued();
39437  wf->rdGmReqsInPipe--;
39438  wf->rdLmReqsInPipe--;
39439  return;
39440  }
39441 
39442  gpuDynInst->execUnitId = wf->execUnitId;
39443  gpuDynInst->latency.init(gpuDynInst->computeUnit());
39444  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
39445 
39446  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
39447 
39448  addr.read();
39449 
39450  calcAddr(gpuDynInst, addr);
39451 
39452  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
39453  gpuDynInst->computeUnit()->globalMemoryPipe
39454  .issueRequest(gpuDynInst);
39455  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
39456  gpuDynInst->computeUnit()->localMemoryPipe
39457  .issueRequest(gpuDynInst);
39458  } else {
39459  fatal("Unsupported scope for flat instruction.\n");
39460  }
39461  }
39462 
39463  void
39465  {
39466  initMemRead<VecElemI8>(gpuDynInst);
39467  } // initiateAcc
39468 
39469  void
39471  {
39472  VecOperandI32 vdst(gpuDynInst, extData.VDST);
39473 
39474  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
39475  if (gpuDynInst->exec_mask[lane]) {
39476  vdst[lane] = (VecElemI32)((reinterpret_cast<VecElemI8*>(
39477  gpuDynInst->d_data))[lane]);
39478  }
39479  }
39480  vdst.write();
39481  }
39482 
39484  : Inst_FLAT(iFmt, "flat_load_ushort")
39485  {
39486  setFlag(MemoryRef);
39487  setFlag(Load);
39488  } // Inst_FLAT__FLAT_LOAD_USHORT
39489 
39491  {
39492  } // ~Inst_FLAT__FLAT_LOAD_USHORT
39493 
39494  // Untyped buffer load unsigned short (zero extend to VGPR destination).
39495  void
39497  {
39498  Wavefront *wf = gpuDynInst->wavefront();
39499 
39500  if (gpuDynInst->exec_mask.none()) {
39501  wf->decVMemInstsIssued();
39502  wf->decLGKMInstsIssued();
39503  wf->rdGmReqsInPipe--;
39504  wf->rdLmReqsInPipe--;
39505  return;
39506  }
39507 
39508  gpuDynInst->execUnitId = wf->execUnitId;
39509  gpuDynInst->latency.init(gpuDynInst->computeUnit());
39510  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
39511 
39512  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
39513 
39514  addr.read();
39515 
39516  calcAddr(gpuDynInst, addr);
39517 
39518  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
39519  gpuDynInst->computeUnit()->globalMemoryPipe
39520  .issueRequest(gpuDynInst);
39521  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
39522  gpuDynInst->computeUnit()->localMemoryPipe
39523  .issueRequest(gpuDynInst);
39524  } else {
39525  fatal("Unsupported scope for flat instruction.\n");
39526  }
39527  }
39528 
39529  void
39531  {
39532  initMemRead<VecElemU16>(gpuDynInst);
39533  } // initiateAcc
39534 
39535  void
39537  {
39538  VecOperandU32 vdst(gpuDynInst, extData.VDST);
39539 
39540  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
39541  if (gpuDynInst->exec_mask[lane]) {
39542  vdst[lane] = (VecElemU32)((reinterpret_cast<VecElemU16*>(
39543  gpuDynInst->d_data))[lane]);
39544  }
39545  }
39546  vdst.write();
39547  }
39548 
39549 
39551  : Inst_FLAT(iFmt, "flat_load_sshort")
39552  {
39553  setFlag(MemoryRef);
39554  setFlag(Load);
39555  } // Inst_FLAT__FLAT_LOAD_SSHORT
39556 
39558  {
39559  } // ~Inst_FLAT__FLAT_LOAD_SSHORT
39560 
39561  // Untyped buffer load signed short (sign extend to VGPR destination).
39562  void
39564  {
39566  }
39567 
39568  void
39570  {
39571  } // initiateAcc
39572 
39573  void
39575  {
39576  }
39577 
39579  : Inst_FLAT(iFmt, "flat_load_dword")
39580  {
39581  setFlag(MemoryRef);
39582  setFlag(Load);
39583  } // Inst_FLAT__FLAT_LOAD_DWORD
39584 
39586  {
39587  } // ~Inst_FLAT__FLAT_LOAD_DWORD
39588 
39589  // Untyped buffer load dword.
39590  void
39592  {
39593  Wavefront *wf = gpuDynInst->wavefront();
39594 
39595  if (gpuDynInst->exec_mask.none()) {
39596  wf->decVMemInstsIssued();
39597  wf->decLGKMInstsIssued();
39598  wf->rdGmReqsInPipe--;
39599  wf->rdLmReqsInPipe--;
39600  return;
39601  }
39602 
39603  gpuDynInst->execUnitId = wf->execUnitId;
39604  gpuDynInst->latency.init(gpuDynInst->computeUnit());
39605  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
39606 
39607  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
39608 
39609  addr.read();
39610 
39611  calcAddr(gpuDynInst, addr);
39612 
39613  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
39614  gpuDynInst->computeUnit()->globalMemoryPipe
39615  .issueRequest(gpuDynInst);
39616  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
39617  gpuDynInst->computeUnit()->localMemoryPipe
39618  .issueRequest(gpuDynInst);
39619  } else {
39620  fatal("Unsupported scope for flat instruction.\n");
39621  }
39622  }
39623 
39624  void
39626  {
39627  initMemRead<VecElemU32>(gpuDynInst);
39628  } // initiateAcc
39629 
39630  void
39632  {
39633  VecOperandU32 vdst(gpuDynInst, extData.VDST);
39634 
39635  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
39636  if (gpuDynInst->exec_mask[lane]) {
39637  vdst[lane] = (reinterpret_cast<VecElemU32*>(
39638  gpuDynInst->d_data))[lane];
39639  }
39640  }
39641  vdst.write();
39642  } // completeAcc
39643 
39645  InFmt_FLAT *iFmt)
39646  : Inst_FLAT(iFmt, "flat_load_dwordx2")
39647  {
39648  setFlag(MemoryRef);
39649  setFlag(Load);
39650  } // Inst_FLAT__FLAT_LOAD_DWORDX2
39651 
39653  {
39654  } // ~Inst_FLAT__FLAT_LOAD_DWORDX2
39655 
39656  // Untyped buffer load 2 dwords.
39657  void
39659  {
39660  Wavefront *wf = gpuDynInst->wavefront();
39661 
39662  if (gpuDynInst->exec_mask.none()) {
39663  wf->decVMemInstsIssued();
39664  wf->decLGKMInstsIssued();
39665  wf->rdGmReqsInPipe--;
39666  wf->rdLmReqsInPipe--;
39667  return;
39668  }
39669 
39670  gpuDynInst->execUnitId = wf->execUnitId;
39671  gpuDynInst->latency.init(gpuDynInst->computeUnit());
39672  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
39673 
39674  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
39675 
39676  addr.read();
39677 
39678  calcAddr(gpuDynInst, addr);
39679 
39680  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
39681  gpuDynInst->computeUnit()->globalMemoryPipe
39682  .issueRequest(gpuDynInst);
39683  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
39684  gpuDynInst->computeUnit()->localMemoryPipe
39685  .issueRequest(gpuDynInst);
39686  } else {
39687  fatal("Unsupported scope for flat instruction.\n");
39688  }
39689  }
39690 
39691  void
39693  {
39694  initMemRead<VecElemU64>(gpuDynInst);
39695  } // initiateAcc
39696 
39697  void
39699  {
39700  VecOperandU64 vdst(gpuDynInst, extData.VDST);
39701 
39702  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
39703  if (gpuDynInst->exec_mask[lane]) {
39704  vdst[lane] = (reinterpret_cast<VecElemU64*>(
39705  gpuDynInst->d_data))[lane];
39706  }
39707  }
39708  vdst.write();
39709  } // completeAcc
39710 
39712  InFmt_FLAT *iFmt)
39713  : Inst_FLAT(iFmt, "flat_load_dwordx3")
39714  {
39715  setFlag(MemoryRef);
39716  setFlag(Load);
39717  } // Inst_FLAT__FLAT_LOAD_DWORDX3
39718 
39720  {
39721  } // ~Inst_FLAT__FLAT_LOAD_DWORDX3
39722 
39723  // Untyped buffer load 3 dwords.
39724  void
39726  {
39727  Wavefront *wf = gpuDynInst->wavefront();
39728 
39729  if (gpuDynInst->exec_mask.none()) {
39730  wf->decVMemInstsIssued();
39731  wf->decLGKMInstsIssued();
39732  wf->rdGmReqsInPipe--;
39733  wf->rdLmReqsInPipe--;
39734  return;
39735  }
39736 
39737  gpuDynInst->execUnitId = wf->execUnitId;
39738  gpuDynInst->latency.init(gpuDynInst->computeUnit());
39739  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
39740 
39741  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
39742 
39743  addr.read();
39744 
39745  calcAddr(gpuDynInst, addr);
39746 
39747  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
39748  gpuDynInst->computeUnit()->globalMemoryPipe
39749  .issueRequest(gpuDynInst);
39750  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
39751  gpuDynInst->computeUnit()->localMemoryPipe
39752  .issueRequest(gpuDynInst);
39753  } else {
39754  fatal("Unsupported scope for flat instruction.\n");
39755  }
39756  }
39757 
39758  void
39760  {
39761  initMemRead<3>(gpuDynInst);
39762  } // initiateAcc
39763 
39764  void
39766  {
39767  VecOperandU32 vdst0(gpuDynInst, extData.VDST);
39768  VecOperandU32 vdst1(gpuDynInst, extData.VDST + 1);
39769  VecOperandU32 vdst2(gpuDynInst, extData.VDST + 2);
39770 
39771  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
39772  if (gpuDynInst->exec_mask[lane]) {
39773  vdst0[lane] = (reinterpret_cast<VecElemU32*>(
39774  gpuDynInst->d_data))[lane * 3];
39775  vdst1[lane] = (reinterpret_cast<VecElemU32*>(
39776  gpuDynInst->d_data))[lane * 3 + 1];
39777  vdst2[lane] = (reinterpret_cast<VecElemU32*>(
39778  gpuDynInst->d_data))[lane * 3 + 2];
39779  }
39780  }
39781 
39782  vdst0.write();
39783  vdst1.write();
39784  vdst2.write();
39785  } // completeAcc
39786 
39788  InFmt_FLAT *iFmt)
39789  : Inst_FLAT(iFmt, "flat_load_dwordx4")
39790  {
39791  setFlag(MemoryRef);
39792  setFlag(Load);
39793  } // Inst_FLAT__FLAT_LOAD_DWORDX4
39794 
39796  {
39797  } // ~Inst_FLAT__FLAT_LOAD_DWORDX4
39798 
39799  // Untyped buffer load 4 dwords.
39800  void
39802  {
39803  Wavefront *wf = gpuDynInst->wavefront();
39804 
39805  if (gpuDynInst->exec_mask.none()) {
39806  wf->decVMemInstsIssued();
39807  wf->decLGKMInstsIssued();
39808  wf->rdGmReqsInPipe--;
39809  wf->rdLmReqsInPipe--;
39810  return;
39811  }
39812 
39813  gpuDynInst->execUnitId = wf->execUnitId;
39814  gpuDynInst->latency.init(gpuDynInst->computeUnit());
39815  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
39816 
39817  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
39818 
39819  addr.read();
39820 
39821  calcAddr(gpuDynInst, addr);
39822 
39823  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
39824  gpuDynInst->computeUnit()->globalMemoryPipe
39825  .issueRequest(gpuDynInst);
39826  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
39827  gpuDynInst->computeUnit()->localMemoryPipe
39828  .issueRequest(gpuDynInst);
39829  } else {
39830  fatal("Unsupported scope for flat instruction.\n");
39831  }
39832  }
39833 
39834  void
39836  {
39837  initMemRead<4>(gpuDynInst);
39838  } // initiateAcc
39839 
39840  void
39842  {
39843  VecOperandU32 vdst0(gpuDynInst, extData.VDST);
39844  VecOperandU32 vdst1(gpuDynInst, extData.VDST + 1);
39845  VecOperandU32 vdst2(gpuDynInst, extData.VDST + 2);
39846  VecOperandU32 vdst3(gpuDynInst, extData.VDST + 3);
39847 
39848  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
39849  if (gpuDynInst->exec_mask[lane]) {
39850  vdst0[lane] = (reinterpret_cast<VecElemU32*>(
39851  gpuDynInst->d_data))[lane * 4];
39852  vdst1[lane] = (reinterpret_cast<VecElemU32*>(
39853  gpuDynInst->d_data))[lane * 4 + 1];
39854  vdst2[lane] = (reinterpret_cast<VecElemU32*>(
39855  gpuDynInst->d_data))[lane * 4 + 2];
39856  vdst3[lane] = (reinterpret_cast<VecElemU32*>(
39857  gpuDynInst->d_data))[lane * 4 + 3];
39858  }
39859  }
39860 
39861  vdst0.write();
39862  vdst1.write();
39863  vdst2.write();
39864  vdst3.write();
39865  } // completeAcc
39866 
39868  : Inst_FLAT(iFmt, "flat_store_byte")
39869  {
39870  setFlag(MemoryRef);
39871  setFlag(Store);
39872  } // Inst_FLAT__FLAT_STORE_BYTE
39873 
39875  {
39876  } // ~Inst_FLAT__FLAT_STORE_BYTE
39877 
39878  // Untyped buffer store byte.
39879  void
39881  {
39882  Wavefront *wf = gpuDynInst->wavefront();
39883 
39884  if (gpuDynInst->exec_mask.none()) {
39885  wf->decVMemInstsIssued();
39886  wf->decLGKMInstsIssued();
39887  wf->wrGmReqsInPipe--;
39888  wf->wrLmReqsInPipe--;
39889  return;
39890  }
39891 
39892  gpuDynInst->execUnitId = wf->execUnitId;
39893  gpuDynInst->latency.init(gpuDynInst->computeUnit());
39894  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
39895 
39896  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
39897  ConstVecOperandU8 data(gpuDynInst, extData.DATA);
39898 
39899  addr.read();
39900  data.read();
39901 
39902  calcAddr(gpuDynInst, addr);
39903 
39904  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
39905  if (gpuDynInst->exec_mask[lane]) {
39906  (reinterpret_cast<VecElemU8*>(gpuDynInst->d_data))[lane]
39907  = data[lane];
39908  }
39909  }
39910 
39911  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
39912  gpuDynInst->computeUnit()->globalMemoryPipe
39913  .issueRequest(gpuDynInst);
39914  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
39915  gpuDynInst->computeUnit()->localMemoryPipe
39916  .issueRequest(gpuDynInst);
39917  } else {
39918  fatal("Unsupported scope for flat instruction.\n");
39919  }
39920  } // execute
39921 
39922  void
39924  {
39925  initMemWrite<VecElemU8>(gpuDynInst);
39926  } // initiateAcc
39927 
39928  void
39930  {
39931  }
39932 
39934  : Inst_FLAT(iFmt, "flat_store_short")
39935  {
39936  setFlag(MemoryRef);
39937  setFlag(Store);
39938  } // Inst_FLAT__FLAT_STORE_SHORT
39939 
39941  {
39942  } // ~Inst_FLAT__FLAT_STORE_SHORT
39943 
39944  // Untyped buffer store short.
39945  void
39947  {
39948  Wavefront *wf = gpuDynInst->wavefront();
39949 
39950  if (gpuDynInst->exec_mask.none()) {
39951  wf->decVMemInstsIssued();
39952  wf->decLGKMInstsIssued();
39953  wf->wrGmReqsInPipe--;
39954  wf->wrLmReqsInPipe--;
39955  return;
39956  }
39957 
39958  gpuDynInst->execUnitId = wf->execUnitId;
39959  gpuDynInst->latency.init(gpuDynInst->computeUnit());
39960  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
39961 
39962  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
39963  ConstVecOperandU16 data(gpuDynInst, extData.DATA);
39964 
39965  addr.read();
39966  data.read();
39967 
39968  calcAddr(gpuDynInst, addr);
39969 
39970  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
39971  if (gpuDynInst->exec_mask[lane]) {
39972  (reinterpret_cast<VecElemU16*>(gpuDynInst->d_data))[lane]
39973  = data[lane];
39974  }
39975  }
39976 
39977  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
39978  gpuDynInst->computeUnit()->globalMemoryPipe
39979  .issueRequest(gpuDynInst);
39980  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
39981  gpuDynInst->computeUnit()->localMemoryPipe
39982  .issueRequest(gpuDynInst);
39983  } else {
39984  fatal("Unsupported scope for flat instruction.\n");
39985  }
39986  }
39987 
39988  void
39990  {
39991  initMemWrite<VecElemU16>(gpuDynInst);
39992  } // initiateAcc
39993 
39994  void
39996  {
39997  } // completeAcc
39998 
40000  : Inst_FLAT(iFmt, "flat_store_dword")
40001  {
40002  setFlag(MemoryRef);
40003  setFlag(Store);
40004  } // Inst_FLAT__FLAT_STORE_DWORD
40005 
40007  {
40008  } // ~Inst_FLAT__FLAT_STORE_DWORD
40009 
40010  // Untyped buffer store dword.
40011  void
40013  {
40014  Wavefront *wf = gpuDynInst->wavefront();
40015 
40016  if (gpuDynInst->exec_mask.none()) {
40017  wf->decVMemInstsIssued();
40018  wf->decLGKMInstsIssued();
40019  wf->wrGmReqsInPipe--;
40020  wf->wrLmReqsInPipe--;
40021  return;
40022  }
40023 
40024  gpuDynInst->execUnitId = wf->execUnitId;
40025  gpuDynInst->latency.init(gpuDynInst->computeUnit());
40026  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
40027 
40028  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
40029  ConstVecOperandU32 data(gpuDynInst, extData.DATA);
40030 
40031  addr.read();
40032  data.read();
40033 
40034  calcAddr(gpuDynInst, addr);
40035 
40036  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40037  if (gpuDynInst->exec_mask[lane]) {
40038  (reinterpret_cast<VecElemU32*>(gpuDynInst->d_data))[lane]
40039  = data[lane];
40040  }
40041  }
40042 
40043  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
40044  gpuDynInst->computeUnit()->globalMemoryPipe
40045  .issueRequest(gpuDynInst);
40046  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
40047  gpuDynInst->computeUnit()->localMemoryPipe
40048  .issueRequest(gpuDynInst);
40049  } else {
40050  fatal("Unsupported scope for flat instruction.\n");
40051  }
40052  }
40053 
40054  void
40056  {
40057  initMemWrite<VecElemU32>(gpuDynInst);
40058  } // initiateAcc
40059 
40060  void
40062  {
40063  } // completeAcc
40064 
40066  InFmt_FLAT *iFmt)
40067  : Inst_FLAT(iFmt, "flat_store_dwordx2")
40068  {
40069  setFlag(MemoryRef);
40070  setFlag(Store);
40071  } // Inst_FLAT__FLAT_STORE_DWORDX2
40072 
40074  {
40075  } // ~Inst_FLAT__FLAT_STORE_DWORDX2
40076 
40077  // Untyped buffer store 2 dwords.
40078  void
40080  {
40081  Wavefront *wf = gpuDynInst->wavefront();
40082 
40083  if (gpuDynInst->exec_mask.none()) {
40084  wf->decVMemInstsIssued();
40085  wf->decLGKMInstsIssued();
40086  wf->wrGmReqsInPipe--;
40087  wf->wrLmReqsInPipe--;
40088  return;
40089  }
40090 
40091  gpuDynInst->execUnitId = wf->execUnitId;
40092  gpuDynInst->latency.init(gpuDynInst->computeUnit());
40093  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
40094 
40095  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
40096  ConstVecOperandU64 data(gpuDynInst, extData.DATA);
40097 
40098  addr.read();
40099  data.read();
40100 
40101  calcAddr(gpuDynInst, addr);
40102 
40103  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40104  if (gpuDynInst->exec_mask[lane]) {
40105  (reinterpret_cast<VecElemU64*>(gpuDynInst->d_data))[lane]
40106  = data[lane];
40107  }
40108  }
40109 
40110  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
40111  gpuDynInst->computeUnit()->globalMemoryPipe
40112  .issueRequest(gpuDynInst);
40113  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
40114  gpuDynInst->computeUnit()->localMemoryPipe
40115  .issueRequest(gpuDynInst);
40116  } else {
40117  fatal("Unsupported scope for flat instruction.\n");
40118  }
40119  }
40120 
40121  void
40123  {
40124  initMemWrite<VecElemU64>(gpuDynInst);
40125  } // initiateAcc
40126 
40127  void
40129  {
40130  } // completeAcc
40131 
40133  InFmt_FLAT *iFmt)
40134  : Inst_FLAT(iFmt, "flat_store_dwordx3")
40135  {
40136  setFlag(MemoryRef);
40137  setFlag(Store);
40138  } // Inst_FLAT__FLAT_STORE_DWORDX3
40139 
40141  {
40142  } // ~Inst_FLAT__FLAT_STORE_DWORDX3
40143 
40144  // Untyped buffer store 3 dwords.
40145  void
40147  {
40148  Wavefront *wf = gpuDynInst->wavefront();
40149 
40150  if (gpuDynInst->exec_mask.none()) {
40151  wf->decVMemInstsIssued();
40152  wf->decLGKMInstsIssued();
40153  wf->wrGmReqsInPipe--;
40154  wf->wrLmReqsInPipe--;
40155  return;
40156  }
40157 
40158  gpuDynInst->execUnitId = wf->execUnitId;
40159  gpuDynInst->latency.init(gpuDynInst->computeUnit());
40160  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
40161 
40162  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
40163  ConstVecOperandU32 data0(gpuDynInst, extData.DATA);
40164  ConstVecOperandU32 data1(gpuDynInst, extData.DATA + 1);
40165  ConstVecOperandU32 data2(gpuDynInst, extData.DATA + 2);
40166 
40167  addr.read();
40168  data0.read();
40169  data1.read();
40170  data2.read();
40171 
40172  calcAddr(gpuDynInst, addr);
40173 
40174  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40175  if (gpuDynInst->exec_mask[lane]) {
40176  (reinterpret_cast<VecElemU32*>(
40177  gpuDynInst->d_data))[lane * 3] = data0[lane];
40178  (reinterpret_cast<VecElemU32*>(
40179  gpuDynInst->d_data))[lane * 3 + 1] = data1[lane];
40180  (reinterpret_cast<VecElemU32*>(
40181  gpuDynInst->d_data))[lane * 3 + 2] = data2[lane];
40182  }
40183  }
40184 
40185  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
40186  gpuDynInst->computeUnit()->globalMemoryPipe
40187  .issueRequest(gpuDynInst);
40188  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
40189  gpuDynInst->computeUnit()->localMemoryPipe
40190  .issueRequest(gpuDynInst);
40191  } else {
40192  fatal("Unsupported scope for flat instruction.\n");
40193  }
40194  }
40195 
40196  void
40198  {
40199  initMemWrite<3>(gpuDynInst);
40200  } // initiateAcc
40201 
40202  void
40204  {
40205  } // completeAcc
40206 
40208  InFmt_FLAT *iFmt)
40209  : Inst_FLAT(iFmt, "flat_store_dwordx4")
40210  {
40211  setFlag(MemoryRef);
40212  setFlag(Store);
40213  } // Inst_FLAT__FLAT_STORE_DWORDX4
40214 
40216  {
40217  } // ~Inst_FLAT__FLAT_STORE_DWORDX4
40218 
40219  // Untyped buffer store 4 dwords.
40220  void
40222  {
40223  Wavefront *wf = gpuDynInst->wavefront();
40224 
40225  if (gpuDynInst->exec_mask.none()) {
40226  wf->decVMemInstsIssued();
40227  wf->decLGKMInstsIssued();
40228  wf->wrGmReqsInPipe--;
40229  wf->wrLmReqsInPipe--;
40230  return;
40231  }
40232 
40233  gpuDynInst->execUnitId = wf->execUnitId;
40234  gpuDynInst->latency.init(gpuDynInst->computeUnit());
40235  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
40236 
40237  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
40238  ConstVecOperandU32 data0(gpuDynInst, extData.DATA);
40239  ConstVecOperandU32 data1(gpuDynInst, extData.DATA + 1);
40240  ConstVecOperandU32 data2(gpuDynInst, extData.DATA + 2);
40241  ConstVecOperandU32 data3(gpuDynInst, extData.DATA + 3);
40242 
40243  addr.read();
40244  data0.read();
40245  data1.read();
40246  data2.read();
40247  data3.read();
40248 
40249  calcAddr(gpuDynInst, addr);
40250 
40251  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40252  if (gpuDynInst->exec_mask[lane]) {
40253  (reinterpret_cast<VecElemU32*>(
40254  gpuDynInst->d_data))[lane * 4] = data0[lane];
40255  (reinterpret_cast<VecElemU32*>(
40256  gpuDynInst->d_data))[lane * 4 + 1] = data1[lane];
40257  (reinterpret_cast<VecElemU32*>(
40258  gpuDynInst->d_data))[lane * 4 + 2] = data2[lane];
40259  (reinterpret_cast<VecElemU32*>(
40260  gpuDynInst->d_data))[lane * 4 + 3] = data3[lane];
40261  }
40262  }
40263 
40264  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
40265  gpuDynInst->computeUnit()->globalMemoryPipe
40266  .issueRequest(gpuDynInst);
40267  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
40268  gpuDynInst->computeUnit()->localMemoryPipe
40269  .issueRequest(gpuDynInst);
40270  } else {
40271  fatal("Unsupported scope for flat instruction.\n");
40272  }
40273  }
40274 
40275  void
40277  {
40278  initMemWrite<4>(gpuDynInst);
40279  } // initiateAcc
40280 
40281  void
40283  {
40284  } // completeAcc
40285 
40287  : Inst_FLAT(iFmt, "flat_atomic_swap")
40288  {
40289  setFlag(AtomicExch);
40290  if (instData.GLC) {
40291  setFlag(AtomicReturn);
40292  } else {
40293  setFlag(AtomicNoReturn);
40294  } // if
40295  setFlag(MemoryRef);
40296  } // Inst_FLAT__FLAT_ATOMIC_SWAP
40297 
40299  {
40300  } // ~Inst_FLAT__FLAT_ATOMIC_SWAP
40301 
40302  // tmp = MEM[ADDR];
40303  // MEM[ADDR] = DATA;
40304  // RETURN_DATA = tmp.
40305  void
40307  {
40308  Wavefront *wf = gpuDynInst->wavefront();
40309 
40310  if (gpuDynInst->exec_mask.none()) {
40311  wf->decVMemInstsIssued();
40312  wf->decLGKMInstsIssued();
40313  wf->wrGmReqsInPipe--;
40314  wf->rdGmReqsInPipe--;
40315  wf->wrLmReqsInPipe--;
40316  wf->rdLmReqsInPipe--;
40317  return;
40318  }
40319 
40320  gpuDynInst->execUnitId = wf->execUnitId;
40321  gpuDynInst->latency.init(gpuDynInst->computeUnit());
40322  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
40323 
40324  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
40325 
40326  addr.read();
40327 
40328  calcAddr(gpuDynInst, addr);
40329 
40330  if (gpuDynInst->executedAs() == enums::SC_GLOBAL ||
40331  gpuDynInst->executedAs() == enums::SC_PRIVATE) {
40332  // TODO: additional address computation required for scratch
40333  panic_if(gpuDynInst->executedAs() == enums::SC_PRIVATE,
40334  "Flats to private aperture not tested yet\n");
40335  gpuDynInst->computeUnit()->globalMemoryPipe.
40336  issueRequest(gpuDynInst);
40337  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
40338  gpuDynInst->computeUnit()->localMemoryPipe
40339  .issueRequest(gpuDynInst);
40340  } else {
40341  fatal("Unsupported scope for flat instruction.\n");
40342  }
40343 
40344  ConstVecOperandU32 data(gpuDynInst, extData.DATA);
40345 
40346  data.read();
40347 
40348  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40349  if (gpuDynInst->exec_mask[lane]) {
40350  (reinterpret_cast<VecElemU32*>(gpuDynInst->a_data))[lane]
40351  = data[lane];
40352  }
40353  }
40354 
40355  } // execute
40356 
40357  void
40359  {
40360  initAtomicAccess<VecElemU32>(gpuDynInst);
40361  } // initiateAcc
40362 
40363  void
40365  {
40366  if (isAtomicRet()) {
40367  VecOperandU32 vdst(gpuDynInst, extData.VDST);
40368 
40369  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40370  if (gpuDynInst->exec_mask[lane]) {
40371  vdst[lane] = (reinterpret_cast<VecElemU32*>(
40372  gpuDynInst->d_data))[lane];
40373  }
40374  }
40375 
40376  vdst.write();
40377  }
40378  } // completeAcc
40379 
40380  // --- Inst_FLAT__FLAT_ATOMIC_CMPSWAP class methods ---
40381 
40384  : Inst_FLAT(iFmt, "flat_atomic_cmpswap")
40385  {
40386  setFlag(AtomicCAS);
40387  if (instData.GLC) {
40388  setFlag(AtomicReturn);
40389  } else {
40390  setFlag(AtomicNoReturn);
40391  } // if
40392  setFlag(MemoryRef);
40393  } // Inst_FLAT__FLAT_ATOMIC_CMPSWAP
40394 
40396  {
40397  } // ~Inst_FLAT__FLAT_ATOMIC_CMPSWAP
40398 
40399  // tmp = MEM[ADDR];
40400  // src = DATA[0];
40401  // cmp = DATA[1];
40402  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
40403  // RETURN_DATA[0] = tmp.
40404  void
40406  {
40407  Wavefront *wf = gpuDynInst->wavefront();
40408 
40409  if (gpuDynInst->exec_mask.none()) {
40410  wf->decVMemInstsIssued();
40411  wf->decLGKMInstsIssued();
40412  wf->wrGmReqsInPipe--;
40413  wf->rdGmReqsInPipe--;
40414  wf->wrLmReqsInPipe--;
40415  wf->rdLmReqsInPipe--;
40416  return;
40417  }
40418 
40419  gpuDynInst->execUnitId = wf->execUnitId;
40420  gpuDynInst->latency.init(gpuDynInst->computeUnit());
40421  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
40422 
40423  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
40424  ConstVecOperandU32 data(gpuDynInst, extData.DATA);
40425  ConstVecOperandU32 cmp(gpuDynInst, extData.DATA + 1);
40426 
40427  addr.read();
40428  data.read();
40429  cmp.read();
40430 
40431  calcAddr(gpuDynInst, addr);
40432 
40433  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40434  if (gpuDynInst->exec_mask[lane]) {
40435  (reinterpret_cast<VecElemU32*>(gpuDynInst->x_data))[lane]
40436  = data[lane];
40437  (reinterpret_cast<VecElemU32*>(gpuDynInst->a_data))[lane]
40438  = cmp[lane];
40439  }
40440  }
40441 
40442  if (gpuDynInst->executedAs() == enums::SC_GLOBAL ||
40443  gpuDynInst->executedAs() == enums::SC_PRIVATE) {
40450  panic_if(gpuDynInst->executedAs() == enums::SC_PRIVATE,
40451  "Flats to private aperture not tested yet\n");
40452  gpuDynInst->computeUnit()->globalMemoryPipe.
40453  issueRequest(gpuDynInst);
40454  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
40455  gpuDynInst->computeUnit()->localMemoryPipe
40456  .issueRequest(gpuDynInst);
40457  } else {
40458  fatal("Unsupported scope for flat instruction.\n");
40459  }
40460  }
40461 
40462  void
40464  {
40465  initAtomicAccess<VecElemU32>(gpuDynInst);
40466  } // initiateAcc
40467 
40468  void
40470  {
40471  if (isAtomicRet()) {
40472  VecOperandU32 vdst(gpuDynInst, extData.VDST);
40473 
40474  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40475  if (gpuDynInst->exec_mask[lane]) {
40476  vdst[lane] = (reinterpret_cast<VecElemU32*>(
40477  gpuDynInst->d_data))[lane];
40478  }
40479  }
40480 
40481  vdst.write();
40482  }
40483  } // completeAcc
40484 
40486  : Inst_FLAT(iFmt, "flat_atomic_add")
40487  {
40488  setFlag(AtomicAdd);
40489  if (instData.GLC) {
40490  setFlag(AtomicReturn);
40491  } else {
40492  setFlag(AtomicNoReturn);
40493  } // if
40494  setFlag(MemoryRef);
40495  } // Inst_FLAT__FLAT_ATOMIC_ADD
40496 
40498  {
40499  } // ~Inst_FLAT__FLAT_ATOMIC_ADD
40500 
40501  // tmp = MEM[ADDR];
40502  // MEM[ADDR] += DATA;
40503  // RETURN_DATA = tmp.
40504  void
40506  {
40507  Wavefront *wf = gpuDynInst->wavefront();
40508 
40509  if (gpuDynInst->exec_mask.none()) {
40510  wf->decVMemInstsIssued();
40511  wf->decLGKMInstsIssued();
40512  wf->wrGmReqsInPipe--;
40513  wf->rdGmReqsInPipe--;
40514  wf->wrLmReqsInPipe--;
40515  wf->rdLmReqsInPipe--;
40516  return;
40517  }
40518 
40519  gpuDynInst->execUnitId = wf->execUnitId;
40520  gpuDynInst->latency.init(gpuDynInst->computeUnit());
40521  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
40522 
40523  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
40524  ConstVecOperandU32 data(gpuDynInst, extData.DATA);
40525 
40526  addr.read();
40527  data.read();
40528 
40529  calcAddr(gpuDynInst, addr);
40530 
40531  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40532  if (gpuDynInst->exec_mask[lane]) {
40533  (reinterpret_cast<VecElemU32*>(gpuDynInst->a_data))[lane]
40534  = data[lane];
40535  }
40536  }
40537 
40538  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
40539  gpuDynInst->computeUnit()->globalMemoryPipe.
40540  issueRequest(gpuDynInst);
40541  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
40542  gpuDynInst->computeUnit()->localMemoryPipe
40543  .issueRequest(gpuDynInst);
40544  } else {
40545  fatal("Unsupported scope for flat instruction.\n");
40546  }
40547  }
40548 
40549  void
40551  {
40552  initAtomicAccess<VecElemU32>(gpuDynInst);
40553  } // initiateAcc
40554 
40555  void
40557  {
40558  if (isAtomicRet()) {
40559  VecOperandU32 vdst(gpuDynInst, extData.VDST);
40560 
40561  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40562  if (gpuDynInst->exec_mask[lane]) {
40563  vdst[lane] = (reinterpret_cast<VecElemU32*>(
40564  gpuDynInst->d_data))[lane];
40565  }
40566  }
40567 
40568  vdst.write();
40569  }
40570  } // completeAcc
40571 
40573  : Inst_FLAT(iFmt, "flat_atomic_sub")
40574  {
40575  setFlag(AtomicSub);
40576  if (instData.GLC) {
40577  setFlag(AtomicReturn);
40578  } else {
40579  setFlag(AtomicNoReturn);
40580  } // if
40581  setFlag(MemoryRef);
40582  } // Inst_FLAT__FLAT_ATOMIC_SUB
40583 
40585  {
40586  } // ~Inst_FLAT__FLAT_ATOMIC_SUB
40587 
40588  // tmp = MEM[ADDR];
40589  // MEM[ADDR] -= DATA;
40590  // RETURN_DATA = tmp.
40591  void
40593  {
40594  Wavefront *wf = gpuDynInst->wavefront();
40595 
40596  if (gpuDynInst->exec_mask.none()) {
40597  wf->decVMemInstsIssued();
40598  wf->decLGKMInstsIssued();
40599  wf->wrGmReqsInPipe--;
40600  wf->rdGmReqsInPipe--;
40601  wf->wrLmReqsInPipe--;
40602  wf->rdLmReqsInPipe--;
40603  return;
40604  }
40605 
40606  gpuDynInst->execUnitId = wf->execUnitId;
40607  gpuDynInst->latency.init(gpuDynInst->computeUnit());
40608  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
40609 
40610  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
40611  ConstVecOperandU32 data(gpuDynInst, extData.DATA);
40612 
40613  addr.read();
40614  data.read();
40615 
40616  calcAddr(gpuDynInst, addr);
40617 
40618  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40619  if (gpuDynInst->exec_mask[lane]) {
40620  (reinterpret_cast<VecElemU32*>(gpuDynInst->a_data))[lane]
40621  = data[lane];
40622  }
40623  }
40624 
40625  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
40626  gpuDynInst->computeUnit()->globalMemoryPipe.
40627  issueRequest(gpuDynInst);
40628  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
40629  gpuDynInst->computeUnit()->localMemoryPipe
40630  .issueRequest(gpuDynInst);
40631  } else {
40632  fatal("Unsupported scope for flat instruction.\n");
40633  }
40634  }
40635  void
40637  {
40638  initAtomicAccess<VecElemU32>(gpuDynInst);
40639  } // initiateAcc
40640 
40641  void
40643  {
40644  if (isAtomicRet()) {
40645  VecOperandU32 vdst(gpuDynInst, extData.VDST);
40646 
40647  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40648  if (gpuDynInst->exec_mask[lane]) {
40649  vdst[lane] = (reinterpret_cast<VecElemU32*>(
40650  gpuDynInst->d_data))[lane];
40651  }
40652  }
40653 
40654  vdst.write();
40655  }
40656  } // completeAcc
40657 
40659  : Inst_FLAT(iFmt, "flat_atomic_smin")
40660  {
40661  setFlag(AtomicMin);
40662  if (instData.GLC) {
40663  setFlag(AtomicReturn);
40664  } else {
40665  setFlag(AtomicNoReturn);
40666  }
40667  setFlag(MemoryRef);
40668  } // Inst_FLAT__FLAT_ATOMIC_SMIN
40669 
40671  {
40672  } // ~Inst_FLAT__FLAT_ATOMIC_SMIN
40673 
40674  // tmp = MEM[ADDR];
40675  // MEM[ADDR] = (DATA < tmp) ? DATA : tmp (signed compare);
40676  // RETURN_DATA = tmp.
40677  void
40679  {
40681  }
40682 
40684  : Inst_FLAT(iFmt, "flat_atomic_umin")
40685  {
40686  setFlag(AtomicMin);
40687  if (instData.GLC) {
40688  setFlag(AtomicReturn);
40689  } else {
40690  setFlag(AtomicNoReturn);
40691  }
40692  setFlag(MemoryRef);
40693  } // Inst_FLAT__FLAT_ATOMIC_UMIN
40694 
40696  {
40697  } // ~Inst_FLAT__FLAT_ATOMIC_UMIN
40698 
40699  // tmp = MEM[ADDR];
40700  // MEM[ADDR] = (DATA < tmp) ? DATA : tmp (unsigned compare);
40701  // RETURN_DATA = tmp.
40702  void
40704  {
40706  }
40707 
40709  : Inst_FLAT(iFmt, "flat_atomic_smax")
40710  {
40711  setFlag(AtomicMax);
40712  if (instData.GLC) {
40713  setFlag(AtomicReturn);
40714  } else {
40715  setFlag(AtomicNoReturn);
40716  }
40717  setFlag(MemoryRef);
40718  } // Inst_FLAT__FLAT_ATOMIC_SMAX
40719 
40721  {
40722  } // ~Inst_FLAT__FLAT_ATOMIC_SMAX
40723 
40724  // tmp = MEM[ADDR];
40725  // MEM[ADDR] = (DATA > tmp) ? DATA : tmp (signed compare);
40726  // RETURN_DATA = tmp.
40727  void
40729  {
40731  }
40732 
40734  : Inst_FLAT(iFmt, "flat_atomic_umax")
40735  {
40736  setFlag(AtomicMax);
40737  if (instData.GLC) {
40738  setFlag(AtomicReturn);
40739  } else {
40740  setFlag(AtomicNoReturn);
40741  }
40742  setFlag(MemoryRef);
40743  } // Inst_FLAT__FLAT_ATOMIC_UMAX
40744 
40746  {
40747  } // ~Inst_FLAT__FLAT_ATOMIC_UMAX
40748 
40749  // tmp = MEM[ADDR];
40750  // MEM[ADDR] = (DATA > tmp) ? DATA : tmp (unsigned compare);
40751  // RETURN_DATA = tmp.
40752  void
40754  {
40756  }
40757 
40759  : Inst_FLAT(iFmt, "flat_atomic_and")
40760  {
40761  setFlag(AtomicAnd);
40762  if (instData.GLC) {
40763  setFlag(AtomicReturn);
40764  } else {
40765  setFlag(AtomicNoReturn);
40766  }
40767  setFlag(MemoryRef);
40768  } // Inst_FLAT__FLAT_ATOMIC_AND
40769 
40771  {
40772  } // ~Inst_FLAT__FLAT_ATOMIC_AND
40773 
40774  // tmp = MEM[ADDR];
40775  // MEM[ADDR] &= DATA;
40776  // RETURN_DATA = tmp.
40777  void
40779  {
40781  }
40782 
40784  : Inst_FLAT(iFmt, "flat_atomic_or")
40785  {
40786  setFlag(AtomicOr);
40787  if (instData.GLC) {
40788  setFlag(AtomicReturn);
40789  } else {
40790  setFlag(AtomicNoReturn);
40791  }
40792  setFlag(MemoryRef);
40793  } // Inst_FLAT__FLAT_ATOMIC_OR
40794 
40796  {
40797  } // ~Inst_FLAT__FLAT_ATOMIC_OR
40798 
40799  // tmp = MEM[ADDR];
40800  // MEM[ADDR] |= DATA;
40801  // RETURN_DATA = tmp.
40802  void
40804  {
40806  }
40807 
40809  : Inst_FLAT(iFmt, "flat_atomic_xor")
40810  {
40811  setFlag(AtomicXor);
40812  if (instData.GLC) {
40813  setFlag(AtomicReturn);
40814  } else {
40815  setFlag(AtomicNoReturn);
40816  }
40817  setFlag(MemoryRef);
40818  } // Inst_FLAT__FLAT_ATOMIC_XOR
40819 
40821  {
40822  } // ~Inst_FLAT__FLAT_ATOMIC_XOR
40823 
40824  // tmp = MEM[ADDR];
40825  // MEM[ADDR] ^= DATA;
40826  // RETURN_DATA = tmp.
40827  void
40829  {
40831  }
40832 
40834  : Inst_FLAT(iFmt, "flat_atomic_inc")
40835  {
40836  setFlag(AtomicInc);
40837  if (instData.GLC) {
40838  setFlag(AtomicReturn);
40839  } else {
40840  setFlag(AtomicNoReturn);
40841  }
40842  setFlag(MemoryRef);
40843  } // Inst_FLAT__FLAT_ATOMIC_INC
40844 
40846  {
40847  } // ~Inst_FLAT__FLAT_ATOMIC_INC
40848 
40849  // tmp = MEM[ADDR];
40850  // MEM[ADDR] = (tmp >= DATA) ? 0 : tmp + 1 (unsigned compare);
40851  // RETURN_DATA = tmp.
40852  void
40854  {
40855  Wavefront *wf = gpuDynInst->wavefront();
40856 
40857  if (gpuDynInst->exec_mask.none()) {
40858  wf->decVMemInstsIssued();
40859  wf->decLGKMInstsIssued();
40860  wf->wrGmReqsInPipe--;
40861  wf->rdGmReqsInPipe--;
40862  wf->wrLmReqsInPipe--;
40863  wf->rdLmReqsInPipe--;
40864  return;
40865  }
40866 
40867  gpuDynInst->execUnitId = wf->execUnitId;
40868  gpuDynInst->latency.init(gpuDynInst->computeUnit());
40869  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
40870 
40871  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
40872  ConstVecOperandU32 data(gpuDynInst, extData.DATA);
40873 
40874  addr.read();
40875  data.read();
40876 
40877  calcAddr(gpuDynInst, addr);
40878 
40879  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40880  if (gpuDynInst->exec_mask[lane]) {
40881  (reinterpret_cast<VecElemU32*>(gpuDynInst->a_data))[lane]
40882  = data[lane];
40883  }
40884  }
40885 
40886  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
40887  gpuDynInst->computeUnit()->globalMemoryPipe.
40888  issueRequest(gpuDynInst);
40889  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
40890  gpuDynInst->computeUnit()->localMemoryPipe
40891  .issueRequest(gpuDynInst);
40892  } else {
40893  fatal("Unsupported scope for flat instruction.\n");
40894  }
40895  }
40896 
40897  void
40899  {
40900  initAtomicAccess<VecElemU32>(gpuDynInst);
40901  } // initiateAcc
40902 
40903  void
40905  {
40906  if (isAtomicRet()) {
40907  VecOperandU32 vdst(gpuDynInst, extData.VDST);
40908 
40909  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40910  if (gpuDynInst->exec_mask[lane]) {
40911  vdst[lane] = (reinterpret_cast<VecElemU32*>(
40912  gpuDynInst->d_data))[lane];
40913  }
40914  }
40915 
40916  vdst.write();
40917  }
40918  } // completeAcc
40919 
40921  : Inst_FLAT(iFmt, "flat_atomic_dec")
40922  {
40923  setFlag(AtomicDec);
40924  if (instData.GLC) {
40925  setFlag(AtomicReturn);
40926  } else {
40927  setFlag(AtomicNoReturn);
40928  }
40929  setFlag(MemoryRef);
40930  } // Inst_FLAT__FLAT_ATOMIC_DEC
40931 
40933  {
40934  } // ~Inst_FLAT__FLAT_ATOMIC_DEC
40935 
40936  // tmp = MEM[ADDR];
40937  // MEM[ADDR] = (tmp == 0 || tmp > DATA) ? DATA : tmp - 1
40938  // (unsigned compare); RETURN_DATA = tmp.
40939  void
40941  {
40942  Wavefront *wf = gpuDynInst->wavefront();
40943 
40944  if (gpuDynInst->exec_mask.none()) {
40945  wf->decVMemInstsIssued();
40946  wf->decLGKMInstsIssued();
40947  wf->wrGmReqsInPipe--;
40948  wf->rdGmReqsInPipe--;
40949  wf->wrLmReqsInPipe--;
40950  wf->rdLmReqsInPipe--;
40951  return;
40952  }
40953 
40954  gpuDynInst->execUnitId = wf->execUnitId;
40955  gpuDynInst->latency.init(gpuDynInst->computeUnit());
40956  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
40957 
40958  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
40959  ConstVecOperandU32 data(gpuDynInst, extData.DATA);
40960 
40961  addr.read();
40962  data.read();
40963 
40964  calcAddr(gpuDynInst, addr);
40965 
40966  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40967  if (gpuDynInst->exec_mask[lane]) {
40968  (reinterpret_cast<VecElemU32*>(gpuDynInst->a_data))[lane]
40969  = data[lane];
40970  }
40971  }
40972 
40973  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
40974  gpuDynInst->computeUnit()->globalMemoryPipe.
40975  issueRequest(gpuDynInst);
40976  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
40977  gpuDynInst->computeUnit()->localMemoryPipe
40978  .issueRequest(gpuDynInst);
40979  } else {
40980  fatal("Unsupported scope for flat instruction.\n");
40981  }
40982  }
40983 
40984  void
40986  {
40987  initAtomicAccess<VecElemU32>(gpuDynInst);
40988  } // initiateAcc
40989 
40990  void
40992  {
40993  if (isAtomicRet()) {
40994  VecOperandU32 vdst(gpuDynInst, extData.VDST);
40995 
40996  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
40997  if (gpuDynInst->exec_mask[lane]) {
40998  vdst[lane] = (reinterpret_cast<VecElemU32*>(
40999  gpuDynInst->d_data))[lane];
41000  }
41001  }
41002 
41003  vdst.write();
41004  }
41005  } // completeAcc
41006 
41008  InFmt_FLAT *iFmt)
41009  : Inst_FLAT(iFmt, "flat_atomic_swap_x2")
41010  {
41011  setFlag(AtomicExch);
41012  if (instData.GLC) {
41013  setFlag(AtomicReturn);
41014  } else {
41015  setFlag(AtomicNoReturn);
41016  }
41017  setFlag(MemoryRef);
41018  } // Inst_FLAT__FLAT_ATOMIC_SWAP_X2
41019 
41021  {
41022  } // ~Inst_FLAT__FLAT_ATOMIC_SWAP_X2
41023 
41024  // tmp = MEM[ADDR];
41025  // MEM[ADDR] = DATA[0:1];
41026  // RETURN_DATA[0:1] = tmp.
41027  void
41029  {
41031  }
41032 
41034  InFmt_FLAT *iFmt)
41035  : Inst_FLAT(iFmt, "flat_atomic_cmpswap_x2")
41036  {
41037  setFlag(AtomicCAS);
41038  if (instData.GLC) {
41039  setFlag(AtomicReturn);
41040  } else {
41041  setFlag(AtomicNoReturn);
41042  }
41043  setFlag(MemoryRef);
41044  } // Inst_FLAT__FLAT_ATOMIC_CMPSWAP_X2
41045 
41047  {
41048  } // ~Inst_FLAT__FLAT_ATOMIC_CMPSWAP_X2
41049 
41050  // tmp = MEM[ADDR];
41051  // src = DATA[0:1];
41052  // cmp = DATA[2:3];
41053  // MEM[ADDR] = (tmp == cmp) ? src : tmp;
41054  // RETURN_DATA[0:1] = tmp.
41055  void
41057  {
41058  Wavefront *wf = gpuDynInst->wavefront();
41059 
41060  if (gpuDynInst->exec_mask.none()) {
41061  wf->decVMemInstsIssued();
41062  wf->decLGKMInstsIssued();
41063  wf->wrGmReqsInPipe--;
41064  wf->rdGmReqsInPipe--;
41065  wf->wrLmReqsInPipe--;
41066  wf->rdLmReqsInPipe--;
41067  return;
41068  }
41069 
41070  gpuDynInst->execUnitId = wf->execUnitId;
41071  gpuDynInst->latency.init(gpuDynInst->computeUnit());
41072  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
41073 
41074  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
41075  ConstVecOperandU64 data(gpuDynInst, extData.DATA);
41076  ConstVecOperandU64 cmp(gpuDynInst, extData.DATA + 2);
41077 
41078  addr.read();
41079  data.read();
41080  cmp.read();
41081 
41082  calcAddr(gpuDynInst, addr);
41083 
41084  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
41085  if (gpuDynInst->exec_mask[lane]) {
41086  (reinterpret_cast<VecElemU64*>(gpuDynInst->x_data))[lane]
41087  = data[lane];
41088  (reinterpret_cast<VecElemU64*>(gpuDynInst->a_data))[lane]
41089  = cmp[lane];
41090  }
41091  }
41092 
41093  if (gpuDynInst->executedAs() == enums::SC_GLOBAL ||
41094  gpuDynInst->executedAs() == enums::SC_PRIVATE) {
41101  panic_if(gpuDynInst->executedAs() == enums::SC_PRIVATE,
41102  "Flats to private aperture not tested yet\n");
41103  gpuDynInst->computeUnit()->globalMemoryPipe.
41104  issueRequest(gpuDynInst);
41105  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
41106  gpuDynInst->computeUnit()->localMemoryPipe
41107  .issueRequest(gpuDynInst);
41108  } else {
41109  fatal("Unsupported scope for flat instruction.\n");
41110  }
41111  }
41112 
41113  void
41115  {
41116  initAtomicAccess<VecElemU64>(gpuDynInst);
41117  } // initiateAcc
41118 
41119  void
41121  {
41122  if (isAtomicRet()) {
41123  VecOperandU64 vdst(gpuDynInst, extData.VDST);
41124 
41125  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
41126  if (gpuDynInst->exec_mask[lane]) {
41127  vdst[lane] = (reinterpret_cast<VecElemU64*>(
41128  gpuDynInst->d_data))[lane];
41129  }
41130  }
41131 
41132  vdst.write();
41133  }
41134  } // completeAcc
41135 
41137  InFmt_FLAT *iFmt)
41138  : Inst_FLAT(iFmt, "flat_atomic_add_x2")
41139  {
41140  setFlag(AtomicAdd);
41141  if (instData.GLC) {
41142  setFlag(AtomicReturn);
41143  } else {
41144  setFlag(AtomicNoReturn);
41145  }
41146  setFlag(MemoryRef);
41147  } // Inst_FLAT__FLAT_ATOMIC_ADD_X2
41148 
41150  {
41151  } // ~Inst_FLAT__FLAT_ATOMIC_ADD_X2
41152 
41153  // tmp = MEM[ADDR];
41154  // MEM[ADDR] += DATA[0:1];
41155  // RETURN_DATA[0:1] = tmp.
41156  void
41158  {
41159  Wavefront *wf = gpuDynInst->wavefront();
41160 
41161  if (gpuDynInst->exec_mask.none()) {
41162  wf->decVMemInstsIssued();
41163  wf->decLGKMInstsIssued();
41164  wf->wrGmReqsInPipe--;
41165  wf->rdGmReqsInPipe--;
41166  wf->wrLmReqsInPipe--;
41167  wf->rdLmReqsInPipe--;
41168  return;
41169  }
41170 
41171  gpuDynInst->execUnitId = wf->execUnitId;
41172  gpuDynInst->latency.init(gpuDynInst->computeUnit());
41173  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
41174 
41175  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
41176  ConstVecOperandU64 data(gpuDynInst, extData.DATA);
41177 
41178  addr.read();
41179  data.read();
41180 
41181  calcAddr(gpuDynInst, addr);
41182 
41183  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
41184  if (gpuDynInst->exec_mask[lane]) {
41185  (reinterpret_cast<VecElemU64*>(gpuDynInst->a_data))[lane]
41186  = data[lane];
41187  }
41188  }
41189 
41190  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
41191  gpuDynInst->computeUnit()->globalMemoryPipe.
41192  issueRequest(gpuDynInst);
41193  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
41194  gpuDynInst->computeUnit()->localMemoryPipe
41195  .issueRequest(gpuDynInst);
41196  } else {
41197  fatal("Unsupported scope for flat instruction.\n");
41198  }
41199  }
41200 
41201  void
41203  {
41204  initAtomicAccess<VecElemU64>(gpuDynInst);
41205  } // initiateAcc
41206 
41207  void
41209  {
41210  if (isAtomicRet()) {
41211  VecOperandU64 vdst(gpuDynInst, extData.VDST);
41212 
41213 
41214  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
41215  if (gpuDynInst->exec_mask[lane]) {
41216  vdst[lane] = (reinterpret_cast<VecElemU64*>(
41217  gpuDynInst->d_data))[lane];
41218  }
41219  }
41220 
41221  vdst.write();
41222  }
41223  } // completeAcc
41224 
41226  InFmt_FLAT *iFmt)
41227  : Inst_FLAT(iFmt, "flat_atomic_sub_x2")
41228  {
41229  setFlag(AtomicSub);
41230  if (instData.GLC) {
41231  setFlag(AtomicReturn);
41232  } else {
41233  setFlag(AtomicNoReturn);
41234  }
41235  setFlag(MemoryRef);
41236  } // Inst_FLAT__FLAT_ATOMIC_SUB_X2
41237 
41239  {
41240  } // ~Inst_FLAT__FLAT_ATOMIC_SUB_X2
41241 
41242  // tmp = MEM[ADDR];
41243  // MEM[ADDR] -= DATA[0:1];
41244  // RETURN_DATA[0:1] = tmp.
41245  void
41247  {
41248  Wavefront *wf = gpuDynInst->wavefront();
41249 
41250  if (gpuDynInst->exec_mask.none()) {
41251  wf->decVMemInstsIssued();
41252  wf->decLGKMInstsIssued();
41253  wf->wrGmReqsInPipe--;
41254  wf->rdGmReqsInPipe--;
41255  wf->wrLmReqsInPipe--;
41256  wf->rdLmReqsInPipe--;
41257  return;
41258  }
41259 
41260  gpuDynInst->execUnitId = wf->execUnitId;
41261  gpuDynInst->latency.init(gpuDynInst->computeUnit());
41262  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
41263 
41264  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
41265  ConstVecOperandU64 data(gpuDynInst, extData.DATA);
41266 
41267  addr.read();
41268  data.read();
41269 
41270  calcAddr(gpuDynInst, addr);
41271 
41272  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
41273  if (gpuDynInst->exec_mask[lane]) {
41274  (reinterpret_cast<VecElemU64*>(gpuDynInst->a_data))[lane]
41275  = data[lane];
41276  }
41277  }
41278 
41279  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
41280  gpuDynInst->computeUnit()->globalMemoryPipe.
41281  issueRequest(gpuDynInst);
41282  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
41283  gpuDynInst->computeUnit()->localMemoryPipe
41284  .issueRequest(gpuDynInst);
41285  } else {
41286  fatal("Unsupported scope for flat instruction.\n");
41287  }
41288  }
41289 
41290  void
41292  {
41293  initAtomicAccess<VecElemU64>(gpuDynInst);
41294  } // initiateAcc
41295 
41296  void
41298  {
41299  if (isAtomicRet()) {
41300  VecOperandU64 vdst(gpuDynInst, extData.VDST);
41301 
41302 
41303  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
41304  if (gpuDynInst->exec_mask[lane]) {
41305  vdst[lane] = (reinterpret_cast<VecElemU64*>(
41306  gpuDynInst->d_data))[lane];
41307  }
41308  }
41309 
41310  vdst.write();
41311  }
41312  } // completeAcc
41313 
41315  InFmt_FLAT *iFmt)
41316  : Inst_FLAT(iFmt, "flat_atomic_smin_x2")
41317  {
41318  setFlag(AtomicMin);
41319  if (instData.GLC) {
41320  setFlag(AtomicReturn);
41321  } else {
41322  setFlag(AtomicNoReturn);
41323  }
41324  setFlag(MemoryRef);
41325  } // Inst_FLAT__FLAT_ATOMIC_SMIN_X2
41326 
41328  {
41329  } // ~Inst_FLAT__FLAT_ATOMIC_SMIN_X2
41330 
41331  // tmp = MEM[ADDR];
41332  // MEM[ADDR] -= (DATA[0:1] < tmp) ? DATA[0:1] : tmp (signed compare);
41333  // RETURN_DATA[0:1] = tmp.
41334  void
41336  {
41338  }
41339 
41341  InFmt_FLAT *iFmt)
41342  : Inst_FLAT(iFmt, "flat_atomic_umin_x2")
41343  {
41344  setFlag(AtomicMin);
41345  if (instData.GLC) {
41346  setFlag(AtomicReturn);
41347  } else {
41348  setFlag(AtomicNoReturn);
41349  }
41350  setFlag(MemoryRef);
41351  } // Inst_FLAT__FLAT_ATOMIC_UMIN_X2
41352 
41354  {
41355  } // ~Inst_FLAT__FLAT_ATOMIC_UMIN_X2
41356 
41357  // tmp = MEM[ADDR];
41358  // MEM[ADDR] -= (DATA[0:1] < tmp) ? DATA[0:1] : tmp (unsigned compare);
41359  // RETURN_DATA[0:1] = tmp.
41360  void
41362  {
41364  }
41365 
41367  InFmt_FLAT *iFmt)
41368  : Inst_FLAT(iFmt, "flat_atomic_smax_x2")
41369  {
41370  setFlag(AtomicMax);
41371  if (instData.GLC) {
41372  setFlag(AtomicReturn);
41373  } else {
41374  setFlag(AtomicNoReturn);
41375  }
41376  setFlag(MemoryRef);
41377  } // Inst_FLAT__FLAT_ATOMIC_SMAX_X2
41378 
41380  {
41381  } // ~Inst_FLAT__FLAT_ATOMIC_SMAX_X2
41382 
41383  // tmp = MEM[ADDR];
41384  // MEM[ADDR] -= (DATA[0:1] > tmp) ? DATA[0:1] : tmp (signed compare);
41385  // RETURN_DATA[0:1] = tmp.
41386  void
41388  {
41390  }
41391 
41393  InFmt_FLAT *iFmt)
41394  : Inst_FLAT(iFmt, "flat_atomic_umax_x2")
41395  {
41396  setFlag(AtomicMax);
41397  if (instData.GLC) {
41398  setFlag(AtomicReturn);
41399  } else {
41400  setFlag(AtomicNoReturn);
41401  }
41402  setFlag(MemoryRef);
41403  } // Inst_FLAT__FLAT_ATOMIC_UMAX_X2
41404 
41406  {
41407  } // ~Inst_FLAT__FLAT_ATOMIC_UMAX_X2
41408 
41409  // tmp = MEM[ADDR];
41410  // MEM[ADDR] -= (DATA[0:1] > tmp) ? DATA[0:1] : tmp (unsigned compare);
41411  // RETURN_DATA[0:1] = tmp.
41412  void
41414  {
41416  }
41417 
41419  InFmt_FLAT *iFmt)
41420  : Inst_FLAT(iFmt, "flat_atomic_and_x2")
41421  {
41422  setFlag(AtomicAnd);
41423  if (instData.GLC) {
41424  setFlag(AtomicReturn);
41425  } else {
41426  setFlag(AtomicNoReturn);
41427  }
41428  setFlag(MemoryRef);
41429  } // Inst_FLAT__FLAT_ATOMIC_AND_X2
41430 
41432  {
41433  } // ~Inst_FLAT__FLAT_ATOMIC_AND_X2
41434 
41435  // tmp = MEM[ADDR];
41436  // MEM[ADDR] &= DATA[0:1];
41437  // RETURN_DATA[0:1] = tmp.
41438  void
41440  {
41442  }
41443 
41445  InFmt_FLAT *iFmt)
41446  : Inst_FLAT(iFmt, "flat_atomic_or_x2")
41447  {
41448  setFlag(AtomicOr);
41449  if (instData.GLC) {
41450  setFlag(AtomicReturn);
41451  } else {
41452  setFlag(AtomicNoReturn);
41453  }
41454  setFlag(MemoryRef);
41455  } // Inst_FLAT__FLAT_ATOMIC_OR_X2
41456 
41458  {
41459  } // ~Inst_FLAT__FLAT_ATOMIC_OR_X2
41460 
41461  // tmp = MEM[ADDR];
41462  // MEM[ADDR] |= DATA[0:1];
41463  // RETURN_DATA[0:1] = tmp.
41464  void
41466  {
41468  }
41469 
41471  InFmt_FLAT *iFmt)
41472  : Inst_FLAT(iFmt, "flat_atomic_xor_x2")
41473  {
41474  setFlag(AtomicXor);
41475  if (instData.GLC) {
41476  setFlag(AtomicReturn);
41477  } else {
41478  setFlag(AtomicNoReturn);
41479  }
41480  setFlag(MemoryRef);
41481  } // Inst_FLAT__FLAT_ATOMIC_XOR_X2
41482 
41484  {
41485  } // ~Inst_FLAT__FLAT_ATOMIC_XOR_X2
41486 
41487  // tmp = MEM[ADDR];
41488  // MEM[ADDR] ^= DATA[0:1];
41489  // RETURN_DATA[0:1] = tmp.
41490  void
41492  {
41494  }
41495 
41497  InFmt_FLAT *iFmt)
41498  : Inst_FLAT(iFmt, "flat_atomic_inc_x2")
41499  {
41500  setFlag(AtomicInc);
41501  if (instData.GLC) {
41502  setFlag(AtomicReturn);
41503  } else {
41504  setFlag(AtomicNoReturn);
41505  }
41506  setFlag(MemoryRef);
41507  } // Inst_FLAT__FLAT_ATOMIC_INC_X2
41508 
41510  {
41511  } // ~Inst_FLAT__FLAT_ATOMIC_INC_X2
41512 
41513  // tmp = MEM[ADDR];
41514  // MEM[ADDR] = (tmp >= DATA[0:1]) ? 0 : tmp + 1 (unsigned compare);
41515  // RETURN_DATA[0:1] = tmp.
41516  void
41518  {
41519  Wavefront *wf = gpuDynInst->wavefront();
41520 
41521  if (gpuDynInst->exec_mask.none()) {
41522  wf->decVMemInstsIssued();
41523  wf->decLGKMInstsIssued();
41524  wf->wrGmReqsInPipe--;
41525  wf->rdGmReqsInPipe--;
41526  wf->wrLmReqsInPipe--;
41527  wf->rdLmReqsInPipe--;
41528  return;
41529  }
41530 
41531  gpuDynInst->execUnitId = wf->execUnitId;
41532  gpuDynInst->latency.init(gpuDynInst->computeUnit());
41533  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
41534 
41535  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
41536  ConstVecOperandU64 data(gpuDynInst, extData.DATA);
41537 
41538  addr.read();
41539  data.read();
41540 
41541  calcAddr(gpuDynInst, addr);
41542 
41543  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
41544  if (gpuDynInst->exec_mask[lane]) {
41545  (reinterpret_cast<VecElemU64*>(gpuDynInst->a_data))[lane]
41546  = data[lane];
41547  }
41548  }
41549 
41550  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
41551  gpuDynInst->computeUnit()->globalMemoryPipe.
41552  issueRequest(gpuDynInst);
41553  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
41554  gpuDynInst->computeUnit()->localMemoryPipe
41555  .issueRequest(gpuDynInst);
41556  } else {
41557  fatal("Unsupported scope for flat instruction.\n");
41558  }
41559  }
41560 
41561  void
41563  {
41564  initAtomicAccess<VecElemU64>(gpuDynInst);
41565  } // initiateAcc
41566 
41567  void
41569  {
41570  if (isAtomicRet()) {
41571  VecOperandU64 vdst(gpuDynInst, extData.VDST);
41572 
41573 
41574  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
41575  if (gpuDynInst->exec_mask[lane]) {
41576  vdst[lane] = (reinterpret_cast<VecElemU64*>(
41577  gpuDynInst->d_data))[lane];
41578  }
41579  }
41580 
41581  vdst.write();
41582  }
41583  } // completeAcc
41584 
41586  InFmt_FLAT *iFmt)
41587  : Inst_FLAT(iFmt, "flat_atomic_dec_x2")
41588  {
41589  setFlag(AtomicDec);
41590  if (instData.GLC) {
41591  setFlag(AtomicReturn);
41592  } else {
41593  setFlag(AtomicNoReturn);
41594  }
41595  setFlag(MemoryRef);
41596  } // Inst_FLAT__FLAT_ATOMIC_DEC_X2
41597 
41599  {
41600  } // ~Inst_FLAT__FLAT_ATOMIC_DEC_X2
41601 
41602  // tmp = MEM[ADDR];
41603  // MEM[ADDR] = (tmp == 0 || tmp > DATA[0:1]) ? DATA[0:1] : tmp - 1
41604  // (unsigned compare);
41605  // RETURN_DATA[0:1] = tmp.
41606  void
41608  {
41609  Wavefront *wf = gpuDynInst->wavefront();
41610 
41611  if (gpuDynInst->exec_mask.none()) {
41612  wf->decVMemInstsIssued();
41613  wf->decLGKMInstsIssued();
41614  wf->wrGmReqsInPipe--;
41615  wf->rdGmReqsInPipe--;
41616  wf->wrLmReqsInPipe--;
41617  wf->rdLmReqsInPipe--;
41618  return;
41619  }
41620 
41621  gpuDynInst->execUnitId = wf->execUnitId;
41622  gpuDynInst->latency.init(gpuDynInst->computeUnit());
41623  gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
41624 
41625  ConstVecOperandU64 addr(gpuDynInst, extData.ADDR);
41626  ConstVecOperandU64 data(gpuDynInst, extData.DATA);
41627 
41628  addr.read();
41629  data.read();
41630 
41631  calcAddr(gpuDynInst, addr);
41632 
41633  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
41634  if (gpuDynInst->exec_mask[lane]) {
41635  (reinterpret_cast<VecElemU64*>(gpuDynInst->a_data))[lane]
41636  = data[lane];
41637  }
41638  }
41639 
41640  if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
41641  gpuDynInst->computeUnit()->globalMemoryPipe.
41642  issueRequest(gpuDynInst);
41643  } else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
41644  gpuDynInst->computeUnit()->localMemoryPipe
41645  .issueRequest(gpuDynInst);
41646  } else {
41647  fatal("Unsupported scope for flat instruction.\n");
41648  }
41649  }
41650 
41651  void
41653  {
41654  initAtomicAccess<VecElemU64>(gpuDynInst);
41655  } // initiateAcc
41656 
41657  void
41659  {
41660  if (isAtomicRet()) {
41661  VecOperandU64 vdst(gpuDynInst, extData.VDST);
41662 
41663 
41664  for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
41665  if (gpuDynInst->exec_mask[lane]) {
41666  vdst[lane] = (reinterpret_cast<VecElemU64*>(
41667  gpuDynInst->d_data))[lane];
41668  }
41669  }
41670 
41671  vdst.write();
41672  }
41673  } // completeAcc
41674 } // namespace Gcn3ISA
41675 } // namespace gem5
#define DPRINTF(x,...)
Definition: trace.hh:186
const char data[]
void releaseBarrier(int bar_id)
int numYetToReachBarrier(int bar_id)
int maxBarrierCnt(int bar_id)
int numAtBarrier(int bar_id)
void incNumAtBarrier(int bar_id)
RegisterManager * registerManager
std::vector< VectorRegisterFile * > vrf
void decMaxBarrierCnt(int bar_id)
FetchStage fetchStage
LdsState & getLds() const
gem5::ComputeUnit::ComputeUnitStats stats
Cycles is a wrapper class for representing cycle counts, i.e.
Definition: types.hh:79
FetchUnit & fetchUnit(int simdId)
Definition: fetch_stage.hh:66
void flushBuf(int wfSlotId)
Definition: fetch_unit.cc:333
bool isReachingKernelEnd(Wavefront *wf)
Definition: dispatcher.cc:226
void notifyWgCompl(Wavefront *wf)
When an end program instruction detects that the last WF in a WG has completed it will call this meth...
Definition: dispatcher.cc:295
void setFlag(Flags flag)
bool isAtomicRet() const
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void calcAddr(GPUDynInstPtr gpuDynInst, ConstVecOperandU32 &addr)
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void calcAddr(GPUDynInstPtr gpuDynInst, ConstVecOperandU64 &addr)
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void injectGlobalMemFence(GPUDynInstPtr gpuDynInst)
void calcAddr(GPUDynInstPtr gpuDynInst, VOFF v_off, VIDX v_idx, SRSRC s_rsrc_desc, SOFF s_offset, int inst_offset)
MUBUF insructions calculate their addresses as follows:
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Read 2 dwords from scalar data cache.
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Read 1 dword from scalar data cache.
void completeAcc(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void completeAcc(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void initiateAcc(GPUDynInstPtr) override
void calcAddr(GPUDynInstPtr gpu_dyn_inst, ConstScalarOperandU64 &addr, ScalarRegU32 offset)
For normal s_load_dword/s_store_dword instruction addresses.
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Definition: instructions.cc:61
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Definition: instructions.cc:92
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Synchronize waves within a workgroup.
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Inst_VOP3__V_ADDC_U32(InFmt_VOP3_SDST_ENC *)
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Inst_VOP3__V_ADD_U32(InFmt_VOP3_SDST_ENC *)
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Inst_VOP3__V_DIV_SCALE_F32(InFmt_VOP3_SDST_ENC *)
void execute(GPUDynInstPtr) override
Inst_VOP3__V_DIV_SCALE_F64(InFmt_VOP3_SDST_ENC *)
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Inst_VOP3__V_MAD_I64_I32(InFmt_VOP3_SDST_ENC *)
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Inst_VOP3__V_MAD_U64_U32(InFmt_VOP3_SDST_ENC *)
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
uint8_t permute(uint64_t in_dword2x, uint32_t sel)
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Inst_VOP3__V_SUBBREV_U32(InFmt_VOP3_SDST_ENC *)
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Inst_VOP3__V_SUBB_U32(InFmt_VOP3_SDST_ENC *)
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Inst_VOP3__V_SUBREV_U32(InFmt_VOP3_SDST_ENC *)
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
Inst_VOP3__V_SUB_U32(InFmt_VOP3_SDST_ENC *)
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
void execute(GPUDynInstPtr) override
std::enable_if_t< Condition, void > setBit(int bit, int bit_val)
bit access to scalar data.
Definition: operand.hh:490
void read() override
read from and write to the underlying register(s) that this operand is referring to.
Definition: operand.hh:408
std::enable_if_t< Condition, DataType > rawData() const
we store scalar data in a std::array, however if we need the full operand data we use this method to ...
Definition: operand.hh:391
void write() override
Definition: operand.hh:426
void readSrc()
certain vector operands can read from the vrf/srf or constants.
Definition: operand.hh:130
void write() override
write to the vrf.
Definition: operand.hh:198
void read() override
read from the vrf.
Definition: operand.hh:146
int decreaseRefCounter(const uint32_t dispatchId, const uint32_t wgId)
decrease the reference count after making sure it is in the list give back this chunk if the ref coun...
Definition: lds_state.hh:329
void freeRegisters(Wavefront *w)
GPUDispatcher & dispatcher()
Definition: shader.cc:99
int impl_kern_end_rel
Definition: shader.hh:227
void prepareFlush(GPUDynInstPtr gpuDynInst)
dispatcher/shader arranges flush requests to the CUs
Definition: shader.cc:222
Base class for branch operations.
Definition: branch.hh:49
Nop class.
Definition: nop.hh:49
static const int InvalidID
Definition: compute_unit.hh:97
Addr pc() const
Definition: wavefront.cc:1387
bool hasBarrier() const
Definition: wavefront.cc:1452
void setStatus(status_e newStatus)
Definition: wavefront.cc:542
uint32_t wgId
Definition: wavefront.hh:160
void validateRequestCounters()
Definition: wavefront.cc:770
const int simdId
Definition: wavefront.hh:99
ComputeUnit * computeUnit
Definition: wavefront.hh:106
std::vector< int > vecReads
Definition: wavefront.hh:237
std::deque< GPUDynInstPtr > instructionBuffer
Definition: wavefront.hh:109
void releaseBarrier()
Definition: wavefront.cc:1458
uint32_t dispatchId
Definition: wavefront.hh:169
status_e getStatus()
Definition: wavefront.hh:137
void decVMemInstsIssued()
Definition: wavefront.cc:1369
const int wfSlotId
Definition: wavefront.hh:96
std::unordered_map< int, uint64_t > rawDist
Definition: wavefront.hh:233
void decLGKMInstsIssued()
Definition: wavefront.cc:1381
void barrierId(int bar_id)
Definition: wavefront.cc:1438
uint64_t lastInstExec
Definition: wavefront.hh:229
@ S_BARRIER
WF is stalled at a barrier.
Definition: wavefront.hh:92
gem5::Wavefront::WavefrontStats stats
VectorMask & execMask()
Definition: wavefront.cc:1399
uint64_t wfDynId
Definition: wavefront.hh:226
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
Definition: statistics.hh:1328
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition: bitfield.hh:76
constexpr int popCount(uint64_t val)
Returns the number of set ones in the provided value.
Definition: bitfield.hh:334
std::enable_if_t< std::is_integral_v< T >, T > reverseBits(T val, size_t size=sizeof(T))
Takes a value and returns the bit reversed version.
Definition: bitfield.hh:236
constexpr uint64_t mask(unsigned nbits)
Generate a 64-bit mask of 'nbits' 1s, right justified.
Definition: bitfield.hh:63
constexpr int findLsbSet(uint64_t val)
Returns the bit position of the LSB that is set in the input.
Definition: bitfield.hh:296
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:190
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition: logging.hh:204
#define warn_once(...)
Definition: logging.hh:250
Bitfield< 7 > i
Definition: misc_types.hh:67
Bitfield< 23, 0 > offset
Definition: types.hh:144
ScalarRegI32 countZeroBits(T val)
Definition: inst_util.hh:120
uint64_t VecElemU64
VecOperand< VecElemU32, true > ConstVecOperandU32
Definition: operand.hh:738
VecElemU32 muladd(VecElemU64 &dst, VecElemU32 val_0, VecElemU32 val_1, VecElemU64 val_2)
Definition: inst_util.hh:271
ScalarRegI32 countZeroBitsMsb(T val)
Definition: inst_util.hh:163
int16_t ScalarRegI16
uint16_t VecElemU16
uint32_t ScalarRegU32
T quadMask(T val)
Definition: inst_util.hh:103
T median(T val_0, T val_1, T val_2)
Definition: inst_util.hh:246
ScalarRegI32 firstOppositeSignBit(ScalarRegI32 val)
Definition: inst_util.hh:173
const int NumVecElemPerVecReg(64)
uint64_t ScalarRegU64
ScalarOperand< ScalarRegU32, true, 4 > ConstScalarOperandU128
Definition: operand.hh:715
int32_t VecElemI32
T wholeQuadMode(T val)
Definition: inst_util.hh:89
void processSDWA_src(InFmt_VOP_SDWA sdwaInst, T &src0, T &origSrc0)
processSDWA_src is a helper function for implementing sub d-word addressing instructions for the src ...
Definition: inst_util.hh:823
int64_t VecElemI64
int16_t VecElemI16
int64_t ScalarRegI64
void processDPP(GPUDynInstPtr gpuDynInst, InFmt_VOP_DPP dppInst, T &src0)
processDPP is a helper function for implementing Data Parallel Primitive instructions.
Definition: inst_util.hh:415
uint32_t VecElemU32
ScalarRegI32 findFirstZero(T val)
Definition: inst_util.hh:130
int32_t ScalarRegI32
void processSDWA_dst(InFmt_VOP_SDWA sdwaInst, T &dst, T &origDst)
processSDWA_dst is a helper function for implementing sub d-word addressing instructions for the dst ...
Definition: inst_util.hh:879
T roundNearestEven(T val)
Definition: inst_util.hh:258
ScalarRegI32 findFirstOneMsb(T val)
Definition: inst_util.hh:152
ScalarRegI32 findFirstOne(T val)
Definition: inst_util.hh:141
constexpr RegId F16
Definition: float.hh:115
Bitfield< 4 > pc
Bitfield< 30, 0 > index
Bitfield< 23 > k
Definition: dt_constants.hh:81
Bitfield< 31, 16 > selector
Definition: misc.hh:1010
Bitfield< 3 > addr
Definition: types.hh:84
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::shared_ptr< GPUDynInst > GPUDynInstPtr
Definition: misc.hh:49
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
statistics::Distribution readsPerWrite
Definition: wavefront.hh:376
InFmt_VOP_SDWA iFmt_VOP_SDWA

Generated on Wed Dec 21 2022 10:22:17 for gem5 by doxygen 1.9.1