Home | History | Annotate | Download | only in arm

Lines Matching refs:format

104   int FormatVFPRegister(Instruction* instr, const char* format);
106 int FormatVFPinstruction(Instruction* instr, const char* format);
119 void Format(Instruction* instr, const char* format);
328 int Decoder::FormatRegister(Instruction* instr, const char* format) {
329 ASSERT(format[0] == 'r');
330 if (format[1] == 'n') { // 'rn: Rn register
334 } else if (format[1] == 'd') { // 'rd: Rd register
338 } else if (format[1] == 's') { // 'rs: Rs register
342 } else if (format[1] == 'm') { // 'rm: Rm register
346 } else if (format[1] == 't') { // 'rt: Rt register
350 } else if (format[1] == 'l') {
352 ASSERT(STRING_STARTS_WITH(format, "rlist"));
377 int Decoder::FormatVFPRegister(Instruction* instr, const char* format) {
378 ASSERT((format[0] == 'S') || (format[0] == 'D'));
381 format[0] == 'D' ? kDoublePrecision : kSinglePrecision;
385 if (format[1] == 'n') {
387 } else if (format[1] == 'm') {
389 } else if (format[1] == 'd') {
400 if (format[2] == '+') {
402 if (format[0] == 'S') reg += immed8 - 1;
403 if (format[0] == 'D') reg += (immed8 / 2 - 1);
405 if (format[2] == '+') retval = 3;
420 int Decoder::FormatVFPinstruction(Instruction* instr, const char* format) {
421 Print(format);
472 // the current instructions. The format string points to the first
476 int Decoder::FormatOption(Instruction* instr, const char* format) {
477 switch (format[0]) {
493 ASSERT(STRING_STARTS_WITH(format, "cond"));
527 int width = (format[3] - '0') * 10 + (format[4] - '0');
528 int lsb = (format[6] - '0') * 10 + (format[7] - '0');
546 if (format[1] == 'w') {
551 if (format[1] == 'e') { // 'memop: load/store instructions.
552 ASSERT(STRING_STARTS_WITH(format, "memop"));
570 ASSERT(STRING_STARTS_WITH(format, "msg"));
578 if ((format[3] == '1') && (format[4] == '2')) {
580 ASSERT(STRING_STARTS_WITH(format, "off12"));
584 } else if (format[3] == '0') {
586 ASSERT(STRING_STARTS_WITH(format, "off0to3and8to19"));
594 ASSERT(STRING_STARTS_WITH(format, "off8"));
601 ASSERT(STRING_STARTS_WITH(format, "pu"));
606 return FormatRegister(instr, format);
609 if (format[1] == 'h') { // 'shift_op or 'shift_rm or 'shift_sat.
610 if (format[6] == 'o') { // 'shift_op
611 ASSERT(STRING_STARTS_WITH(format, "shift_op"));
619 } else if (format[6] == 's') { // 'shift_sat.
620 ASSERT(STRING_STARTS_WITH(format, "shift_sat"));
624 ASSERT(STRING_STARTS_WITH(format, "shift_rm"));
628 } else if (format[1] == 'v') { // 'svc
629 ASSERT(STRING_STARTS_WITH(format, "svc"));
632 } else if (format[1] == 'i') { // 'sign: signed extra loads and stores
633 ASSERT(STRING_STARTS_WITH(format, "sign"));
646 ASSERT(STRING_STARTS_WITH(format, "target"));
676 return FormatVFPinstruction(instr, format);
680 return FormatVFPRegister(instr, format);
698 // Format takes a formatting string for a whole instruction and prints it into
701 void Decoder::Format(Instruction* instr, const char* format) {
702 char cur = *format++;
705 format += FormatOption(instr, format);
709 cur = *format++;
727 Format(instr, "unknown");
743 Format(instr, "mul'cond's 'rn, 'rm, 'rs");
750 Format(instr, "mla'cond's 'rn, 'rm, 'rs, 'rd");
756 Format(instr, "mls'cond's 'rn, 'rm, 'rs, 'rd");
766 Format(instr, "'um'al'cond's 'rd, 'rn, 'rm, 'rs");
776 Format(instr, "'memop'cond's 'rd, ['rn], -'rm");
778 Format(instr, "'memop'cond's 'rd, ['rn], #-'off8");
784 Format(instr, "'memop'cond's 'rd, ['rn], +'rm");
786 Format(instr, "'memop'cond's 'rd, ['rn], #+'off8");
792 Format(instr, "'memop'cond's 'rd, ['rn, -'rm]'w");
794 Format(instr, "'memop'cond's 'rd, ['rn, #-'off8]'w");
800 Format(instr, "'memop'cond's 'rd, ['rn, +'rm]'w");
802 Format(instr, "'memop'cond's 'rd, ['rn, #+'off8]'w");
817 Format(instr, "'memop'cond'sign'h 'rd, ['rn], -'rm");
819 Format(instr, "'memop'cond'sign'h 'rd, ['rn], #-'off8");
825 Format(instr, "'memop'cond'sign'h 'rd, ['rn], +'rm");
827 Format(instr, "'memop'cond'sign'h 'rd, ['rn], #+'off8");
833 Format(instr, "'memop'cond'sign'h 'rd, ['rn, -'rm]'w");
835 Format(instr, "'memop'cond'sign'h 'rd, ['rn, #-'off8]'w");
841 Format(instr, "'memop'cond'sign'h 'rd, ['rn, +'rm]'w");
843 Format(instr, "'memop'cond'sign'h 'rd, ['rn, #+'off8]'w");
859 Format(instr, "bx'cond 'rm");
862 Format(instr, "blx'cond 'rm");
865 Format(instr, "bkpt 'off0to3and8to19");
874 Format(instr, "clz'cond 'rd, 'rm");
884 Format(instr, "nop'cond");
888 Format(instr, "and'cond's 'rd, 'rn, 'shift_op");
892 Format(instr, "eor'cond's 'rd, 'rn, 'shift_op");
896 Format(instr, "sub'cond's 'rd, 'rn, 'shift_op");
900 Format(instr, "rsb'cond's 'rd, 'rn, 'shift_op");
904 Format(instr, "add'cond's 'rd, 'rn, 'shift_op");
908 Format(instr, "adc'cond's 'rd, 'rn, 'shift_op");
912 Format(instr, "sbc'cond's 'rd, 'rn, 'shift_op");
916 Format(instr, "rsc'cond's 'rd, 'rn, 'shift_op");
921 Format(instr, "tst'cond 'rn, 'shift_op");
923 Format(instr, "movw'cond 'mw");
929 Format(instr, "teq'cond 'rn, 'shift_op");
939 Format(instr, "cmp'cond 'rn, 'shift_op");
941 Format(instr, "movt'cond 'mw");
947 Format(instr, "cmn'cond 'rn, 'shift_op");
956 Format(instr, "orr'cond's 'rd, 'rn, 'shift_op");
960 Format(instr, "mov'cond's 'rd, 'shift_op");
964 Format(instr, "bic'cond's 'rd, 'rn, 'shift_op");
968 Format(instr, "mvn'cond's 'rd, 'shift_op");
988 Format(instr, "'memop'cond'b 'rd, ['rn], #-'off12");
996 Format(instr, "'memop'cond'b 'rd, ['rn], #+'off12");
1000 Format(instr, "'memop'cond'b 'rd, ['rn, #-'off12]'w");
1004 Format(instr, "'memop'cond'b 'rd, ['rn, #+'off12]'w");
1020 Format(instr, "'memop'cond'b 'rd, ['rn], -'shift_rm");
1025 Format(instr, "'memop'cond'b 'rd, ['rn], +'shift_rm");
1032 Format(instr, "pkhbt'cond 'rd, 'rn, 'rm, lsl #'imm05@07");
1035 Format(instr, "pkhtb'cond 'rd, 'rn, 'rm, asr #32");
1037 Format(instr, "pkhtb'cond 'rd, 'rn, 'rm, asr #'imm05@07");
1051 Format(instr, "usat 'rd, #'imm05@16, 'rm'shift_sat");
1067 Format(instr, "uxtb16'cond 'rd, 'rm, ror #0");
1070 Format(instr, "uxtb16'cond 'rd, 'rm, ror #8");
1073 Format(instr, "uxtb16'cond 'rd, 'rm, ror #16");
1076 Format(instr, "uxtb16'cond 'rd, 'rm, ror #24");
1091 Format(instr, "uxtb'cond 'rd, 'rm, ror #0");
1094 Format(instr, "uxtb'cond 'rd, 'rm, ror #8");
1097 Format(instr, "uxtb'cond 'rd, 'rm, ror #16");
1100 Format(instr, "uxtb'cond 'rd, 'rm, ror #24");
1106 Format(instr, "uxtab'cond 'rd, 'rn, 'rm, ror #0");
1109 Format(instr, "uxtab'cond 'rd, 'rn, 'rm, ror #8");
1112 Format(instr, "uxtab'cond 'rd, 'rn, 'rm, ror #16");
1115 Format(instr, "uxtab'cond 'rd, 'rn, 'rm, ror #24");
1133 // SDIV (in V8 notation matching ARM ISA format) rn = rm/rs
1134 Format(instr, "sdiv'cond'b 'rn, 'rm, 'rs");
1140 Format(instr, "'memop'cond'b 'rd, ['rn, -'shift_rm]'w");
1150 Format(instr, "ubfx'cond 'rd, 'rm, 'f");
1152 Format(instr, "sbfx'cond 'rd, 'rm, 'f");
1162 Format(instr, "bfc'cond 'rd, 'f");
1164 Format(instr, "bfi'cond 'rd, 'rm, 'f");
1170 Format(instr, "'memop'cond'b 'rd, ['rn, +'shift_rm]'w");
1189 Format(instr, "ldm'cond'pu 'rn'w, 'rlist");
1191 Format(instr, "stm'cond'pu 'rn'w, 'rlist");
1198 Format(instr, "b'l'cond 'target");
1210 Format(instr, "stop'cond 'svc");
1224 Format(instr, "svc'cond 'svc");
1261 Format(instr, "vmov'cond.f64 'Dd, 'Dm");
1263 Format(instr, "vmov'cond.f32 'Sd, 'Sm");
1267 Format(instr, "vabs'cond.f64 'Dd, 'Dm");
1270 Format(instr, "vneg'cond.f64 'Dd, 'Dm");
1279 Format(instr, "vcvt'cond.f64.s32 'Dd, 'Dd");
1289 Format(instr, "vsqrt'cond.f64 'Dd, 'Dm");
1292 Format(instr, "vmov'cond.f64 'Dd, 'd");
1302 Format(instr, "vsub'cond.f64 'Dd, 'Dn, 'Dm");
1304 Format(instr, "vadd'cond.f64 'Dd, 'Dn, 'Dm");
1311 Format(instr, "vmul'cond.f64 'Dd, 'Dn, 'Dm");
1317 Format(instr, "vmla'cond.f64 'Dd, 'Dn, 'Dm");
1323 Format(instr, "vmls'cond.f64 'Dd, 'Dn, 'Dm");
1329 Format(instr, "vdiv'cond.f64 'Dd, 'Dn, 'Dm");
1344 Format(instr, "vmov'cond.32 'Dd[0], 'rt");
1346 Format(instr, "vmov'cond.32 'Dd[1], 'rt");
1352 Format(instr, "vmov'cond.32 'rt, 'Dd[0]");
1354 Format(instr, "vmov'cond.32 'rt, 'Dd[1]");
1361 Format(instr, "vmsr'cond FPSCR, APSR");
1363 Format(instr, "vmsr'cond FPSCR, 'rt");
1367 Format(instr, "vmrs'cond APSR, FPSCR");
1369 Format(instr, "vmrs'cond 'rt, FPSCR");
1385 Format(instr, "vmov'cond 'rt, 'Sn");
1387 Format(instr, "vmov'cond 'Sn, 'rt");
1403 Format(instr, "vcmp'cond.f64 'Dd, 'Dm");
1405 Format(instr, "vcmp'cond.f64 'Dd, #0.0");
1422 Format(instr, "vcvt'cond.f32.f64 'Sd, 'Dm");
1424 Format(instr, "vcvt'cond.f64.f32 'Dd, 'Sm");
1441 Format(instr, "vcvt'cond.u32.f64 'Sd, 'Dm");
1443 Format(instr, "vcvt'cond.s32.f64 'Sd, 'Dm");
1447 Format(instr, "vcvt'cond.u32.f32 'Sd, 'Sm");
1449 Format(instr, "vcvt'cond.s32.f32 'Sd, 'Sm");
1457 Format(instr, "vcvt'cond.f64.u32 'Dd, 'Sm");
1459 Format(instr, "vcvt'cond.f64.s32 'Dd, 'Sm");
1463 Format(instr, "vcvt'cond.f32.u32 'Sd, 'Sm");
1465 Format(instr, "vcvt'cond.f32.s32 'Sd, 'Sm");
1485 Format(instr, "vldr'cond 'Sd, ['rn - 4*'imm08@00]");
1487 Format(instr, "vstr'cond 'Sd, ['rn - 4*'imm08@00]");
1493 Format(instr, "vldr'cond 'Sd, ['rn + 4*'imm08@00]");
1495 Format(instr, "vstr'cond 'Sd, ['rn + 4*'imm08@00]");
1506 Format(instr, "vldm'cond'pu 'rn'w, {'Sd-'Sd+}");
1508 Format(instr, "vstm'cond'pu 'rn'w, {'Sd-'Sd+}");
1522 Format(instr, "vmov'cond 'rt, 'rn, 'Dm");
1524 Format(instr, "vmov'cond 'Dm, 'rt, 'rn");
1530 Format(instr, "vldr'cond 'Dd, ['rn - 4*'imm08@00]");
1532 Format(instr, "vstr'cond 'Dd, ['rn - 4*'imm08@00]");
1538 Format(instr, "vldr'cond 'Dd, ['rn + 4*'imm08@00]");
1540 Format(instr, "vstr'cond 'Dd, ['rn + 4*'imm08@00]");
1551 Format(instr, "vldm'cond'pu 'rn'w, {'Dd-'Dd+}");
1553 Format(instr, "vstm'cond'pu 'rn'w, {'Dd-'Dd+}");