Home | History | Annotate | Download | only in arm

Lines Matching refs:Format

78   int FormatVFPRegister(Instruction* instr, const char* format);
80 int FormatVFPinstruction(Instruction* instr, const char* format);
93 void Format(Instruction* instr, const char* format);
303 int Decoder::FormatRegister(Instruction* instr, const char* format) {
304 DCHECK(format[0] == 'r');
305 if (format[1] == 'n') { // 'rn: Rn register
309 } else if (format[1] == 'd') { // 'rd: Rd register
313 } else if (format[1] == 's') { // 'rs: Rs register
317 } else if (format[1] == 'm') { // 'rm: Rm register
321 } else if (format[1] == 't') { // 'rt: Rt register
325 } else if (format[1] == 'l') {
327 DCHECK(STRING_STARTS_WITH(format, "rlist"));
352 int Decoder::FormatVFPRegister(Instruction* instr, const char* format) {
353 DCHECK((format[0] == 'S') || (format[0] == 'D'));
356 format[0] == 'D' ? kDoublePrecision : kSinglePrecision;
360 if (format[1] == 'n') {
362 } else if (format[1] == 'm') {
364 } else if (format[1] == 'd') {
375 if (format[2] == '+') {
377 if (format[0] == 'S') reg += immed8 - 1;
378 if (format[0] == 'D') reg += (immed8 / 2 - 1);
380 if (format[2] == '+') retval = 3;
395 int Decoder::FormatVFPinstruction(Instruction* instr, const char* format) {
396 Print(format);
446 // the current instructions. The format string points to the first
450 int Decoder::FormatOption(Instruction* instr, const char* format) {
451 switch (format[0]) {
467 DCHECK(STRING_STARTS_WITH(format, "cond"));
500 int width = (format[3] - '0') * 10 + (format[4] - '0');
501 int lsb = (format[6] - '0') * 10 + (format[7] - '0');
519 if (format[1] == 'w') {
524 if (format[1] == 'e') { // 'memop: load/store instructions.
525 DCHECK(STRING_STARTS_WITH(format, "memop"));
543 DCHECK(STRING_STARTS_WITH(format, "msg"));
551 if ((format[3] == '1') && (format[4] == '2')) {
553 DCHECK(STRING_STARTS_WITH(format, "off12"));
557 } else if (format[3] == '0') {
559 DCHECK(STRING_STARTS_WITH(format, "off0to3and8to19"));
567 DCHECK(STRING_STARTS_WITH(format, "off8"));
573 DCHECK(STRING_STARTS_WITH(format, "pu"));
578 return FormatRegister(instr, format);
581 if (format[1] == 'h') { // 'shift_op or 'shift_rm or 'shift_sat.
582 if (format[6] == 'o') { // 'shift_op
583 DCHECK(STRING_STARTS_WITH(format, "shift_op"));
591 } else if (format[6] == 's') { // 'shift_sat.
592 DCHECK(STRING_STARTS_WITH(format, "shift_sat"));
596 DCHECK(STRING_STARTS_WITH(format, "shift_rm"));
600 } else if (format[1] == 'v') { // 'svc
601 DCHECK(STRING_STARTS_WITH(format, "svc"));
604 } else if (format[1] == 'i') { // 'sign: signed extra loads and stores
605 DCHECK(STRING_STARTS_WITH(format, "sign"));
610 } else if (format[1] == 'p') {
611 if (format[8] == '_') { // 'spec_reg_fields
612 DCHECK(STRING_STARTS_WITH(format, "spec_reg_fields"));
622 DCHECK(STRING_STARTS_WITH(format, "spec_reg"));
638 DCHECK(STRING_STARTS_WITH(format, "target"));
668 return FormatVFPinstruction(instr, format);
672 return FormatVFPRegister(instr, format);
690 // Format takes a formatting string for a whole instruction and prints it into
693 void Decoder::Format(Instruction* instr, const char* format) {
694 char cur = *format++;
697 format += FormatOption(instr, format);
701 cur = *format++;
719 Format(instr, "unknown");
735 Format(instr, "mul'cond's 'rn, 'rm, 'rs");
742 Format(instr, "mla'cond's 'rn, 'rm, 'rs, 'rd");
748 Format(instr, "mls'cond's 'rn, 'rm, 'rs, 'rd");
758 Format(instr, "'um'al'cond's 'rd, 'rn, 'rm, 'rs");
766 Format(instr, "ldrex'cond 'rt, ['rn]");
769 Format(instr, "ldrexb'cond 'rt, ['rn]");
772 Format(instr, "ldrexh'cond 'rt, ['rn]");
784 Format(instr, "strex'cond 'rd, 'rm, ['rn]");
787 Format(instr, "strexb'cond 'rd, 'rm, ['rn]");
790 Format(instr, "strexh'cond 'rd, 'rm, ['rn]");
806 Format(instr, "'memop'cond's 'rd, ['rn], -'rm");
808 Format(instr, "'memop'cond's 'rd, ['rn], #-'off8");
814 Format(instr, "'memop'cond's 'rd, ['rn], +'rm");
816 Format(instr, "'memop'cond's 'rd, ['rn], #+'off8");
822 Format(instr, "'memop'cond's 'rd, ['rn, -'rm]'w");
824 Format(instr, "'memop'cond's 'rd, ['rn, #-'off8]'w");
830 Format(instr, "'memop'cond's 'rd, ['rn, +'rm]'w");
832 Format(instr, "'memop'cond's 'rd, ['rn, #+'off8]'w");
847 Format(instr, "'memop'cond'sign'h 'rd, ['rn], -'rm");
849 Format(instr, "'memop'cond'sign'h 'rd, ['rn], #-'off8");
855 Format(instr, "'memop'cond'sign'h 'rd, ['rn], +'rm");
857 Format(instr, "'memop'cond'sign'h 'rd, ['rn], #+'off8");
863 Format(instr, "'memop'cond'sign'h 'rd, ['rn, -'rm]'w");
865 Format(instr, "'memop'cond'sign'h 'rd, ['rn, #-'off8]'w");
871 Format(instr, "'memop'cond'sign'h 'rd, ['rn, +'rm]'w");
873 Format(instr, "'memop'cond'sign'h 'rd, ['rn, #+'off8]'w");
888 Format(instr, "msr'cond 'spec_reg'spec_reg_fields, 'rm");
891 Format(instr, "mrs'cond 'rd, 'spec_reg");
895 Format(instr, "bx'cond 'rm");
898 Format(instr, "blx'cond 'rm");
901 Format(instr, "bkpt 'off0to3and8to19");
910 Format(instr, "clz'cond 'rd, 'rm");
920 Format(instr, "nop'cond");
924 Format(instr, "and'cond's 'rd, 'rn, 'shift_op");
928 Format(instr, "eor'cond's 'rd, 'rn, 'shift_op");
932 Format(instr, "sub'cond's 'rd, 'rn, 'shift_op");
936 Format(instr, "rsb'cond's 'rd, 'rn, 'shift_op");
940 Format(instr, "add'cond's 'rd, 'rn, 'shift_op");
944 Format(instr, "adc'cond's 'rd, 'rn, 'shift_op");
948 Format(instr, "sbc'cond's 'rd, 'rn, 'shift_op");
952 Format(instr, "rsc'cond's 'rd, 'rn, 'shift_op");
957 Format(instr, "tst'cond 'rn, 'shift_op");
959 Format(instr, "movw'cond 'mw");
965 Format(instr, "teq'cond 'rn, 'shift_op");
975 Format(instr, "cmp'cond 'rn, 'shift_op");
977 Format(instr, "movt'cond 'mw");
983 Format(instr, "cmn'cond 'rn, 'shift_op");
992 Format(instr, "orr'cond's 'rd, 'rn, 'shift_op");
996 Format(instr, "mov'cond's 'rd, 'shift_op");
1000 Format(instr, "bic'cond's 'rd, 'rn, 'shift_op");
1004 Format(instr, "mvn'cond's 'rd, 'shift_op");
1024 Format(instr, "'memop'cond'b 'rd, ['rn], #-'off12");
1032 Format(instr, "'memop'cond'b 'rd, ['rn], #+'off12");
1036 Format(instr, "'memop'cond'b 'rd, ['rn, #-'off12]'w");
1040 Format(instr, "'memop'cond'b 'rd, ['rn, #+'off12]'w");
1056 Format(instr, "'memop'cond'b 'rd, ['rn], -'shift_rm");
1061 Format(instr, "'memop'cond'b 'rd, ['rn], +'shift_rm");
1068 Format(instr, "pkhbt'cond 'rd, 'rn, 'rm, lsl #'imm05@07");
1071 Format(instr, "pkhtb'cond 'rd, 'rn, 'rm, asr #32");
1073 Format(instr, "pkhtb'cond 'rd, 'rn, 'rm, asr #'imm05@07");
1087 Format(instr, "usat 'rd, #'imm05@16, 'rm'shift_sat");
1101 Format(instr, "sxtb'cond 'rd, 'rm");
1104 Format(instr, "sxtb'cond 'rd, 'rm, ror #8");
1107 Format(instr, "sxtb'cond 'rd, 'rm, ror #16");
1110 Format(instr, "sxtb'cond 'rd, 'rm, ror #24");
1116 Format(instr, "sxtab'cond 'rd, 'rn, 'rm");
1119 Format(instr, "sxtab'cond 'rd, 'rn, 'rm, ror #8");
1122 Format(instr, "sxtab'cond 'rd, 'rn, 'rm, ror #16");
1125 Format(instr, "sxtab'cond 'rd, 'rn, 'rm, ror #24");
1133 Format(instr, "sxth'cond 'rd, 'rm");
1136 Format(instr, "sxth'cond 'rd, 'rm, ror #8");
1139 Format(instr, "sxth'cond 'rd, 'rm, ror #16");
1142 Format(instr, "sxth'cond 'rd, 'rm, ror #24");
1148 Format(instr, "sxtah'cond 'rd, 'rn, 'rm");
1151 Format(instr, "sxtah'cond 'rd, 'rn, 'rm, ror #8");
1154 Format(instr, "sxtah'cond 'rd, 'rn, 'rm, ror #16");
1157 Format(instr, "sxtah'cond 'rd, 'rn, 'rm, ror #24");
1171 Format(instr, "uxtb16'cond 'rd, 'rm");
1174 Format(instr, "uxtb16'cond 'rd, 'rm, ror #8");
1177 Format(instr, "uxtb16'cond 'rd, 'rm, ror #16");
1180 Format(instr, "uxtb16'cond 'rd, 'rm, ror #24");
1196 Format(instr, "uxtb'cond 'rd, 'rm");
1199 Format(instr, "uxtb'cond 'rd, 'rm, ror #8");
1202 Format(instr, "uxtb'cond 'rd, 'rm, ror #16");
1205 Format(instr, "uxtb'cond 'rd, 'rm, ror #24");
1211 Format(instr, "uxtab'cond 'rd, 'rn, 'rm");
1214 Format(instr, "uxtab'cond 'rd, 'rn, 'rm, ror #8");
1217 Format(instr, "uxtab'cond 'rd, 'rn, 'rm, ror #16");
1220 Format(instr, "uxtab'cond 'rd, 'rn, 'rm, ror #24");
1228 Format(instr, "uxth'cond 'rd, 'rm");
1231 Format(instr, "uxth'cond 'rd, 'rm, ror #8");
1234 Format(instr, "uxth'cond 'rd, 'rm, ror #16");
1237 Format(instr, "uxth'cond 'rd, 'rm, ror #24");
1243 Format(instr, "uxtah'cond 'rd, 'rn, 'rm");
1246 Format(instr, "uxtah'cond 'rd, 'rn, 'rm, ror #8");
1249 Format(instr, "uxtah'cond 'rd, 'rn, 'rm, ror #16");
1252 Format(instr, "uxtah'cond 'rd, 'rn, 'rm, ror #24");
1261 Format(instr, "rbit'cond 'rd, 'rm");
1276 Format(instr, "smmul'cond 'rn, 'rm, 'rs");
1278 // SMMLA (in V8 notation matching ARM ISA format)
1279 Format(instr, "smmla'cond 'rn, 'rm, 'rs, 'rd");
1287 // UDIV (in V8 notation matching ARM ISA format) rn = rm/rs
1288 Format(instr, "udiv'cond'b 'rn, 'rm, 'rs");
1290 // SDIV (in V8 notation matching ARM ISA format) rn = rm/rs
1291 Format(instr, "sdiv'cond'b 'rn, 'rm, 'rs");
1296 Format(instr, "'memop'cond'b 'rd, ['rn, -'shift_rm]'w");
1306 Format(instr, "ubfx'cond 'rd, 'rm, 'f");
1308 Format(instr, "sbfx'cond 'rd, 'rm, 'f");
1318 Format(instr, "bfc'cond 'rd, 'f");
1320 Format(instr, "bfi'cond 'rd, 'rm, 'f");
1326 Format(instr, "'memop'cond'b 'rd, ['rn, +'shift_rm]'w");
1345 Format(instr, "ldm'cond'pu 'rn'w, 'rlist");
1347 Format(instr, "stm'cond'pu 'rn'w, 'rlist");
1354 Format(instr, "b'l'cond 'target");
1366 Format(instr, "stop'cond 'svc");
1374 Format(instr, "svc'cond 'svc");
1432 Format(instr, "vmov'cond.f64 'Dd, 'Dm");
1434 Format(instr, "vmov'cond.f32 'Sd, 'Sm");
1439 Format(instr, "vabs'cond.f64 'Dd, 'Dm");
1441 Format(instr, "vabs'cond.f32 'Sd, 'Sm");
1446 Format(instr, "vneg'cond.f64 'Dd, 'Dm");
1448 Format(instr, "vneg'cond.f32 'Sd, 'Sm");
1458 Format(instr, "vcvt'cond.f64.s32 'Dd, 'Dd");
1469 Format(instr, "vsqrt'cond.f64 'Dd, 'Dm");
1471 Format(instr, "vsqrt'cond.f32 'Sd, 'Sm");
1475 Format(instr, "vmov'cond.f64 'Dd, 'd");
1477 Format(instr, "vmov'cond.f32 'Sd, 'd");
1482 Format(instr, "vrintz'cond.f64.f64 'Dd, 'Dm");
1484 Format(instr, "vrintz'cond.f32.f32 'Sd, 'Sm");
1492 Format(instr, "vsub'cond.f64 'Dd, 'Dn, 'Dm");
1494 Format(instr, "vadd'cond.f64 'Dd, 'Dn, 'Dm");
1498 Format(instr, "vsub'cond.f32 'Sd, 'Sn, 'Sm");
1500 Format(instr, "vadd'cond.f32 'Sd, 'Sn, 'Sm");
1505 Format(instr, "vmul'cond.f64 'Dd, 'Dn, 'Dm");
1507 Format(instr, "vmul'cond.f32 'Sd, 'Sn, 'Sm");
1511 Format(instr, "vmla'cond.f64 'Dd, 'Dn, 'Dm");
1513 Format(instr, "vmla'cond.f32 'Sd, 'Sn, 'Sm");
1517 Format(instr, "vmls'cond.f64 'Dd, 'Dn, 'Dm");
1519 Format(instr, "vmls'cond.f32 'Sd, 'Sn, 'Sm");
1523 Format(instr, "vdiv'cond.f64 'Dd, 'Dn, 'Dm");
1525 Format(instr, "vdiv'cond.f32 'Sd, 'Sn, 'Sm");
1538 Format(instr, "vmov'cond.32 'Dd[0], 'rt");
1540 Format(instr, "vmov'cond.32 'Dd[1], 'rt");
1546 Format(instr, "vmov'cond.32 'rt, 'Dd[0]");
1548 Format(instr, "vmov'cond.32 'rt, 'Dd[1]");
1555 Format(instr, "vmsr'cond FPSCR, APSR");
1557 Format(instr, "vmsr'cond FPSCR, 'rt");
1561 Format(instr, "vmrs'cond APSR, FPSCR");
1563 Format(instr, "vmrs'cond 'rt, FPSCR");
1583 Format(instr, "mcr'cond (CP15DMB)");
1585 Format(instr, "mcr'cond (CP15DSB)");
1587 Format(instr, "mcr'cond (CP15ISB)");
1607 Format(instr, "vmov'cond 'rt, 'Sn");
1609 Format(instr, "vmov'cond 'Sn, 'rt");
1625 Format(instr, "vcmp'cond.f64 'Dd, 'Dm");
1627 Format(instr, "vcmp'cond.f64 'Dd, #0.0");
1633 Format(instr, "vcmp'cond.f32 'Sd, 'Sm");
1635 Format(instr, "vcmp'cond.f32 'Sd, #0.0");
1652 Format(instr, "vcvt'cond.f32.f64 'Sd, 'Dm");
1654 Format(instr, "vcvt'cond.f64.f32 'Dd, 'Sm");
1671 Format(instr, "vcvt'cond.u32.f64 'Sd, 'Dm");
1673 Format(instr, "vcvt'cond.s32.f64 'Sd, 'Dm");
1677 Format(instr, "vcvt'cond.u32.f32 'Sd, 'Sm");
1679 Format(instr, "vcvt'cond.s32.f32 'Sd, 'Sm");
1687 Format(instr, "vcvt'cond.f64.u32 'Dd, 'Sm");
1689 Format(instr, "vcvt'cond.f64.s32 'Dd, 'Sm");
1693 Format(instr, "vcvt'cond.f32.u32 'Sd, 'Sm");
1695 Format(instr, "vcvt'cond.f32.s32 'Sd, 'Sm");
1715 Format(instr, "vldr'cond 'Sd, ['rn - 4*'imm08@00]");
1717 Format(instr, "vstr'cond 'Sd, ['rn - 4*'imm08@00]");
1723 Format(instr, "vldr'cond 'Sd, ['rn + 4*'imm08@00]");
1725 Format(instr, "vstr'cond 'Sd, ['rn + 4*'imm08@00]");
1736 Format(instr, "vldm'cond'pu 'rn'w, {'Sd-'Sd+}");
1738 Format(instr, "vstm'cond'pu 'rn'w, {'Sd-'Sd+}");
1752 Format(instr, "vmov'cond 'rt, 'rn, 'Dm");
1754 Format(instr, "vmov'cond 'Dm, 'rt, 'rn");
1760 Format(instr, "vldr'cond 'Dd, ['rn - 4*'imm08@00]");
1762 Format(instr, "vstr'cond 'Dd, ['rn - 4*'imm08@00]");
1768 Format(instr, "vldr'cond 'Dd, ['rn + 4*'imm08@00]");
1770 Format(instr, "vstr'cond 'Dd, ['rn + 4*'imm08@00]");
1781 Format(instr, "vldm'cond'pu 'rn'w, {'Dd-'Dd+}");
1783 Format(instr, "vstm'cond'pu 'rn'w, {'Dd-'Dd+}");
1917 Format(instr, "vrinta.f64.f64 'Dd, 'Dm");
1919 Format(instr, "vrinta.f32.f32 'Sd, 'Sm");
1924 Format(instr, "vrintn.f64.f64 'Dd, 'Dm");
1926 Format(instr, "vrintn.f32.f32 'Sd, 'Sm");
1931 Format(instr, "vrintp.f64.f64 'Dd, 'Dm");
1933 Format(instr, "vrintp.f32.f32 'Sd, 'Sm");
1938 Format(instr, "vrintm.f64.f64 'Dd, 'Dm");
1940 Format(instr, "vrintm.f32.f32 'Sd, 'Sm");
1952 Format(instr, "vminnm.f64 'Dd, 'Dn, 'Dm");
1954 Format(instr, "vmaxnm.f64 'Dd, 'Dn, 'Dm");
1958 Format(instr, "vminnm.f32 'Sd, 'Sn, 'Sm");
1960 Format(instr, "vmaxnm.f32 'Sd, 'Sn, 'Sm");
1975 Format(instr, "vseleq.f64 'Dd, 'Dn, 'Dm");
1977 Format(instr, "vseleq.f32 'Sd, 'Sn, 'Sm");
1982 Format(instr, "vselvs.f64 'Dd, 'Dn, 'Dm");
1984 Format(instr, "vselvs.f32 'Sd, 'Sn, 'Sm");
1989 Format(instr, "vselge.f64 'Dd, 'Dn, 'Dm");
1991 Format(instr, "vselge.f32 'Sd, 'Sn, 'Sm");
1996 Format(instr, "vselgt.f64 'Dd, 'Dn, 'Dm");
1998 Format(instr, "vselgt.f32 'Sd, 'Sn, 'Sm");