1 // Copyright 2016, VIXL authors
2 // All rights reserved.
3 //
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are met:
6 //
7 // * Redistributions of source code must retain the above copyright notice,
8 // this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above copyright
10 // notice, this list of conditions and the following disclaimer in the
11 // documentation and/or other materials provided with the distribution.
12 // * Neither the name of ARM Limited nor the names of its contributors may
13 // be used to endorse or promote products derived from this software
14 // without specific prior written permission.
15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND
17 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 // POSSIBILITY OF SUCH DAMAGE.
27
28 #include "aarch32/constants-aarch32.h"
29 #include "utils-vixl.h"
30
31 namespace vixl {
32 namespace aarch32 {
33
34 // Start of generated code.
ToCString(InstructionType type)35 const char* ToCString(InstructionType type) {
36 switch (type) {
37 case kAdc:
38 return "adc";
39 case kAdcs:
40 return "adcs";
41 case kAdd:
42 return "add";
43 case kAdds:
44 return "adds";
45 case kAddw:
46 return "addw";
47 case kAdr:
48 return "adr";
49 case kAnd:
50 return "and";
51 case kAnds:
52 return "ands";
53 case kAsr:
54 return "asr";
55 case kAsrs:
56 return "asrs";
57 case kB:
58 return "b";
59 case kBfc:
60 return "bfc";
61 case kBfi:
62 return "bfi";
63 case kBic:
64 return "bic";
65 case kBics:
66 return "bics";
67 case kBkpt:
68 return "bkpt";
69 case kBl:
70 return "bl";
71 case kBlx:
72 return "blx";
73 case kBx:
74 return "bx";
75 case kBxj:
76 return "bxj";
77 case kCbnz:
78 return "cbnz";
79 case kCbz:
80 return "cbz";
81 case kClrex:
82 return "clrex";
83 case kClz:
84 return "clz";
85 case kCmn:
86 return "cmn";
87 case kCmp:
88 return "cmp";
89 case kCrc32b:
90 return "crc32b";
91 case kCrc32cb:
92 return "crc32cb";
93 case kCrc32ch:
94 return "crc32ch";
95 case kCrc32cw:
96 return "crc32cw";
97 case kCrc32h:
98 return "crc32h";
99 case kCrc32w:
100 return "crc32w";
101 case kDmb:
102 return "dmb";
103 case kDsb:
104 return "dsb";
105 case kEor:
106 return "eor";
107 case kEors:
108 return "eors";
109 case kFldmdbx:
110 return "fldmdbx";
111 case kFldmiax:
112 return "fldmiax";
113 case kFstmdbx:
114 return "fstmdbx";
115 case kFstmiax:
116 return "fstmiax";
117 case kHlt:
118 return "hlt";
119 case kHvc:
120 return "hvc";
121 case kIsb:
122 return "isb";
123 case kIt:
124 return "it";
125 case kLda:
126 return "lda";
127 case kLdab:
128 return "ldab";
129 case kLdaex:
130 return "ldaex";
131 case kLdaexb:
132 return "ldaexb";
133 case kLdaexd:
134 return "ldaexd";
135 case kLdaexh:
136 return "ldaexh";
137 case kLdah:
138 return "ldah";
139 case kLdm:
140 return "ldm";
141 case kLdmda:
142 return "ldmda";
143 case kLdmdb:
144 return "ldmdb";
145 case kLdmea:
146 return "ldmea";
147 case kLdmed:
148 return "ldmed";
149 case kLdmfa:
150 return "ldmfa";
151 case kLdmfd:
152 return "ldmfd";
153 case kLdmib:
154 return "ldmib";
155 case kLdr:
156 return "ldr";
157 case kLdrb:
158 return "ldrb";
159 case kLdrd:
160 return "ldrd";
161 case kLdrex:
162 return "ldrex";
163 case kLdrexb:
164 return "ldrexb";
165 case kLdrexd:
166 return "ldrexd";
167 case kLdrexh:
168 return "ldrexh";
169 case kLdrh:
170 return "ldrh";
171 case kLdrsb:
172 return "ldrsb";
173 case kLdrsh:
174 return "ldrsh";
175 case kLsl:
176 return "lsl";
177 case kLsls:
178 return "lsls";
179 case kLsr:
180 return "lsr";
181 case kLsrs:
182 return "lsrs";
183 case kMla:
184 return "mla";
185 case kMlas:
186 return "mlas";
187 case kMls:
188 return "mls";
189 case kMov:
190 return "mov";
191 case kMovs:
192 return "movs";
193 case kMovt:
194 return "movt";
195 case kMovw:
196 return "movw";
197 case kMrs:
198 return "mrs";
199 case kMsr:
200 return "msr";
201 case kMul:
202 return "mul";
203 case kMuls:
204 return "muls";
205 case kMvn:
206 return "mvn";
207 case kMvns:
208 return "mvns";
209 case kNop:
210 return "nop";
211 case kOrn:
212 return "orn";
213 case kOrns:
214 return "orns";
215 case kOrr:
216 return "orr";
217 case kOrrs:
218 return "orrs";
219 case kPkhbt:
220 return "pkhbt";
221 case kPkhtb:
222 return "pkhtb";
223 case kPld:
224 return "pld";
225 case kPldw:
226 return "pldw";
227 case kPli:
228 return "pli";
229 case kPop:
230 return "pop";
231 case kPush:
232 return "push";
233 case kQadd:
234 return "qadd";
235 case kQadd16:
236 return "qadd16";
237 case kQadd8:
238 return "qadd8";
239 case kQasx:
240 return "qasx";
241 case kQdadd:
242 return "qdadd";
243 case kQdsub:
244 return "qdsub";
245 case kQsax:
246 return "qsax";
247 case kQsub:
248 return "qsub";
249 case kQsub16:
250 return "qsub16";
251 case kQsub8:
252 return "qsub8";
253 case kRbit:
254 return "rbit";
255 case kRev:
256 return "rev";
257 case kRev16:
258 return "rev16";
259 case kRevsh:
260 return "revsh";
261 case kRor:
262 return "ror";
263 case kRors:
264 return "rors";
265 case kRrx:
266 return "rrx";
267 case kRrxs:
268 return "rrxs";
269 case kRsb:
270 return "rsb";
271 case kRsbs:
272 return "rsbs";
273 case kRsc:
274 return "rsc";
275 case kRscs:
276 return "rscs";
277 case kSadd16:
278 return "sadd16";
279 case kSadd8:
280 return "sadd8";
281 case kSasx:
282 return "sasx";
283 case kSbc:
284 return "sbc";
285 case kSbcs:
286 return "sbcs";
287 case kSbfx:
288 return "sbfx";
289 case kSdiv:
290 return "sdiv";
291 case kSel:
292 return "sel";
293 case kShadd16:
294 return "shadd16";
295 case kShadd8:
296 return "shadd8";
297 case kShasx:
298 return "shasx";
299 case kShsax:
300 return "shsax";
301 case kShsub16:
302 return "shsub16";
303 case kShsub8:
304 return "shsub8";
305 case kSmlabb:
306 return "smlabb";
307 case kSmlabt:
308 return "smlabt";
309 case kSmlad:
310 return "smlad";
311 case kSmladx:
312 return "smladx";
313 case kSmlal:
314 return "smlal";
315 case kSmlalbb:
316 return "smlalbb";
317 case kSmlalbt:
318 return "smlalbt";
319 case kSmlald:
320 return "smlald";
321 case kSmlaldx:
322 return "smlaldx";
323 case kSmlals:
324 return "smlals";
325 case kSmlaltb:
326 return "smlaltb";
327 case kSmlaltt:
328 return "smlaltt";
329 case kSmlatb:
330 return "smlatb";
331 case kSmlatt:
332 return "smlatt";
333 case kSmlawb:
334 return "smlawb";
335 case kSmlawt:
336 return "smlawt";
337 case kSmlsd:
338 return "smlsd";
339 case kSmlsdx:
340 return "smlsdx";
341 case kSmlsld:
342 return "smlsld";
343 case kSmlsldx:
344 return "smlsldx";
345 case kSmmla:
346 return "smmla";
347 case kSmmlar:
348 return "smmlar";
349 case kSmmls:
350 return "smmls";
351 case kSmmlsr:
352 return "smmlsr";
353 case kSmmul:
354 return "smmul";
355 case kSmmulr:
356 return "smmulr";
357 case kSmuad:
358 return "smuad";
359 case kSmuadx:
360 return "smuadx";
361 case kSmulbb:
362 return "smulbb";
363 case kSmulbt:
364 return "smulbt";
365 case kSmull:
366 return "smull";
367 case kSmulls:
368 return "smulls";
369 case kSmultb:
370 return "smultb";
371 case kSmultt:
372 return "smultt";
373 case kSmulwb:
374 return "smulwb";
375 case kSmulwt:
376 return "smulwt";
377 case kSmusd:
378 return "smusd";
379 case kSmusdx:
380 return "smusdx";
381 case kSsat:
382 return "ssat";
383 case kSsat16:
384 return "ssat16";
385 case kSsax:
386 return "ssax";
387 case kSsub16:
388 return "ssub16";
389 case kSsub8:
390 return "ssub8";
391 case kStl:
392 return "stl";
393 case kStlb:
394 return "stlb";
395 case kStlex:
396 return "stlex";
397 case kStlexb:
398 return "stlexb";
399 case kStlexd:
400 return "stlexd";
401 case kStlexh:
402 return "stlexh";
403 case kStlh:
404 return "stlh";
405 case kStm:
406 return "stm";
407 case kStmda:
408 return "stmda";
409 case kStmdb:
410 return "stmdb";
411 case kStmea:
412 return "stmea";
413 case kStmed:
414 return "stmed";
415 case kStmfa:
416 return "stmfa";
417 case kStmfd:
418 return "stmfd";
419 case kStmib:
420 return "stmib";
421 case kStr:
422 return "str";
423 case kStrb:
424 return "strb";
425 case kStrd:
426 return "strd";
427 case kStrex:
428 return "strex";
429 case kStrexb:
430 return "strexb";
431 case kStrexd:
432 return "strexd";
433 case kStrexh:
434 return "strexh";
435 case kStrh:
436 return "strh";
437 case kSub:
438 return "sub";
439 case kSubs:
440 return "subs";
441 case kSubw:
442 return "subw";
443 case kSvc:
444 return "svc";
445 case kSxtab:
446 return "sxtab";
447 case kSxtab16:
448 return "sxtab16";
449 case kSxtah:
450 return "sxtah";
451 case kSxtb:
452 return "sxtb";
453 case kSxtb16:
454 return "sxtb16";
455 case kSxth:
456 return "sxth";
457 case kTbb:
458 return "tbb";
459 case kTbh:
460 return "tbh";
461 case kTeq:
462 return "teq";
463 case kTst:
464 return "tst";
465 case kUadd16:
466 return "uadd16";
467 case kUadd8:
468 return "uadd8";
469 case kUasx:
470 return "uasx";
471 case kUbfx:
472 return "ubfx";
473 case kUdf:
474 return "udf";
475 case kUdiv:
476 return "udiv";
477 case kUhadd16:
478 return "uhadd16";
479 case kUhadd8:
480 return "uhadd8";
481 case kUhasx:
482 return "uhasx";
483 case kUhsax:
484 return "uhsax";
485 case kUhsub16:
486 return "uhsub16";
487 case kUhsub8:
488 return "uhsub8";
489 case kUmaal:
490 return "umaal";
491 case kUmlal:
492 return "umlal";
493 case kUmlals:
494 return "umlals";
495 case kUmull:
496 return "umull";
497 case kUmulls:
498 return "umulls";
499 case kUqadd16:
500 return "uqadd16";
501 case kUqadd8:
502 return "uqadd8";
503 case kUqasx:
504 return "uqasx";
505 case kUqsax:
506 return "uqsax";
507 case kUqsub16:
508 return "uqsub16";
509 case kUqsub8:
510 return "uqsub8";
511 case kUsad8:
512 return "usad8";
513 case kUsada8:
514 return "usada8";
515 case kUsat:
516 return "usat";
517 case kUsat16:
518 return "usat16";
519 case kUsax:
520 return "usax";
521 case kUsub16:
522 return "usub16";
523 case kUsub8:
524 return "usub8";
525 case kUxtab:
526 return "uxtab";
527 case kUxtab16:
528 return "uxtab16";
529 case kUxtah:
530 return "uxtah";
531 case kUxtb:
532 return "uxtb";
533 case kUxtb16:
534 return "uxtb16";
535 case kUxth:
536 return "uxth";
537 case kVaba:
538 return "vaba";
539 case kVabal:
540 return "vabal";
541 case kVabd:
542 return "vabd";
543 case kVabdl:
544 return "vabdl";
545 case kVabs:
546 return "vabs";
547 case kVacge:
548 return "vacge";
549 case kVacgt:
550 return "vacgt";
551 case kVacle:
552 return "vacle";
553 case kVaclt:
554 return "vaclt";
555 case kVadd:
556 return "vadd";
557 case kVaddhn:
558 return "vaddhn";
559 case kVaddl:
560 return "vaddl";
561 case kVaddw:
562 return "vaddw";
563 case kVand:
564 return "vand";
565 case kVbic:
566 return "vbic";
567 case kVbif:
568 return "vbif";
569 case kVbit:
570 return "vbit";
571 case kVbsl:
572 return "vbsl";
573 case kVceq:
574 return "vceq";
575 case kVcge:
576 return "vcge";
577 case kVcgt:
578 return "vcgt";
579 case kVcle:
580 return "vcle";
581 case kVcls:
582 return "vcls";
583 case kVclt:
584 return "vclt";
585 case kVclz:
586 return "vclz";
587 case kVcmp:
588 return "vcmp";
589 case kVcmpe:
590 return "vcmpe";
591 case kVcnt:
592 return "vcnt";
593 case kVcvt:
594 return "vcvt";
595 case kVcvta:
596 return "vcvta";
597 case kVcvtb:
598 return "vcvtb";
599 case kVcvtm:
600 return "vcvtm";
601 case kVcvtn:
602 return "vcvtn";
603 case kVcvtp:
604 return "vcvtp";
605 case kVcvtr:
606 return "vcvtr";
607 case kVcvtt:
608 return "vcvtt";
609 case kVdiv:
610 return "vdiv";
611 case kVdup:
612 return "vdup";
613 case kVeor:
614 return "veor";
615 case kVext:
616 return "vext";
617 case kVfma:
618 return "vfma";
619 case kVfms:
620 return "vfms";
621 case kVfnma:
622 return "vfnma";
623 case kVfnms:
624 return "vfnms";
625 case kVhadd:
626 return "vhadd";
627 case kVhsub:
628 return "vhsub";
629 case kVld1:
630 return "vld1";
631 case kVld2:
632 return "vld2";
633 case kVld3:
634 return "vld3";
635 case kVld4:
636 return "vld4";
637 case kVldm:
638 return "vldm";
639 case kVldmdb:
640 return "vldmdb";
641 case kVldmia:
642 return "vldmia";
643 case kVldr:
644 return "vldr";
645 case kVmax:
646 return "vmax";
647 case kVmaxnm:
648 return "vmaxnm";
649 case kVmin:
650 return "vmin";
651 case kVminnm:
652 return "vminnm";
653 case kVmla:
654 return "vmla";
655 case kVmlal:
656 return "vmlal";
657 case kVmls:
658 return "vmls";
659 case kVmlsl:
660 return "vmlsl";
661 case kVmov:
662 return "vmov";
663 case kVmovl:
664 return "vmovl";
665 case kVmovn:
666 return "vmovn";
667 case kVmrs:
668 return "vmrs";
669 case kVmsr:
670 return "vmsr";
671 case kVmul:
672 return "vmul";
673 case kVmull:
674 return "vmull";
675 case kVmvn:
676 return "vmvn";
677 case kVneg:
678 return "vneg";
679 case kVnmla:
680 return "vnmla";
681 case kVnmls:
682 return "vnmls";
683 case kVnmul:
684 return "vnmul";
685 case kVorn:
686 return "vorn";
687 case kVorr:
688 return "vorr";
689 case kVpadal:
690 return "vpadal";
691 case kVpadd:
692 return "vpadd";
693 case kVpaddl:
694 return "vpaddl";
695 case kVpmax:
696 return "vpmax";
697 case kVpmin:
698 return "vpmin";
699 case kVpop:
700 return "vpop";
701 case kVpush:
702 return "vpush";
703 case kVqabs:
704 return "vqabs";
705 case kVqadd:
706 return "vqadd";
707 case kVqdmlal:
708 return "vqdmlal";
709 case kVqdmlsl:
710 return "vqdmlsl";
711 case kVqdmulh:
712 return "vqdmulh";
713 case kVqdmull:
714 return "vqdmull";
715 case kVqmovn:
716 return "vqmovn";
717 case kVqmovun:
718 return "vqmovun";
719 case kVqneg:
720 return "vqneg";
721 case kVqrdmulh:
722 return "vqrdmulh";
723 case kVqrshl:
724 return "vqrshl";
725 case kVqrshrn:
726 return "vqrshrn";
727 case kVqrshrun:
728 return "vqrshrun";
729 case kVqshl:
730 return "vqshl";
731 case kVqshlu:
732 return "vqshlu";
733 case kVqshrn:
734 return "vqshrn";
735 case kVqshrun:
736 return "vqshrun";
737 case kVqsub:
738 return "vqsub";
739 case kVraddhn:
740 return "vraddhn";
741 case kVrecpe:
742 return "vrecpe";
743 case kVrecps:
744 return "vrecps";
745 case kVrev16:
746 return "vrev16";
747 case kVrev32:
748 return "vrev32";
749 case kVrev64:
750 return "vrev64";
751 case kVrhadd:
752 return "vrhadd";
753 case kVrinta:
754 return "vrinta";
755 case kVrintm:
756 return "vrintm";
757 case kVrintn:
758 return "vrintn";
759 case kVrintp:
760 return "vrintp";
761 case kVrintr:
762 return "vrintr";
763 case kVrintx:
764 return "vrintx";
765 case kVrintz:
766 return "vrintz";
767 case kVrshl:
768 return "vrshl";
769 case kVrshr:
770 return "vrshr";
771 case kVrshrn:
772 return "vrshrn";
773 case kVrsqrte:
774 return "vrsqrte";
775 case kVrsqrts:
776 return "vrsqrts";
777 case kVrsra:
778 return "vrsra";
779 case kVrsubhn:
780 return "vrsubhn";
781 case kVseleq:
782 return "vseleq";
783 case kVselge:
784 return "vselge";
785 case kVselgt:
786 return "vselgt";
787 case kVselvs:
788 return "vselvs";
789 case kVshl:
790 return "vshl";
791 case kVshll:
792 return "vshll";
793 case kVshr:
794 return "vshr";
795 case kVshrn:
796 return "vshrn";
797 case kVsli:
798 return "vsli";
799 case kVsqrt:
800 return "vsqrt";
801 case kVsra:
802 return "vsra";
803 case kVsri:
804 return "vsri";
805 case kVst1:
806 return "vst1";
807 case kVst2:
808 return "vst2";
809 case kVst3:
810 return "vst3";
811 case kVst4:
812 return "vst4";
813 case kVstm:
814 return "vstm";
815 case kVstmdb:
816 return "vstmdb";
817 case kVstmia:
818 return "vstmia";
819 case kVstr:
820 return "vstr";
821 case kVsub:
822 return "vsub";
823 case kVsubhn:
824 return "vsubhn";
825 case kVsubl:
826 return "vsubl";
827 case kVsubw:
828 return "vsubw";
829 case kVswp:
830 return "vswp";
831 case kVtbl:
832 return "vtbl";
833 case kVtbx:
834 return "vtbx";
835 case kVtrn:
836 return "vtrn";
837 case kVtst:
838 return "vtst";
839 case kVuzp:
840 return "vuzp";
841 case kVzip:
842 return "vzip";
843 case kYield:
844 return "yield";
845 case kUndefInstructionType:
846 VIXL_UNREACHABLE();
847 return "";
848 }
849 VIXL_UNREACHABLE();
850 return "";
851 } // NOLINT(readability/fn_size)
852 // End of generated code.
853
854 } // namespace aarch32
855 } // namespace vixl
856