Home | History | Annotate | Download | only in arm

Lines Matching defs: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);
301 int Decoder::FormatRegister(Instruction* instr, const char* format) {
302 ASSERT(format[0] == 'r');
303 if (format[1] == 'n') { // 'rn: Rn register
307 } else if (format[1] == 'd') { // 'rd: Rd register
311 } else if (format[1] == 's') { // 'rs: Rs register
315 } else if (format[1] == 'm') { // 'rm: Rm register
319 } else if (format[1] == 't') { // 'rt: Rt register
323 } else if (format[1] == 'l') {
325 ASSERT(STRING_STARTS_WITH(format, "rlist"));
350 int Decoder::FormatVFPRegister(Instruction* instr, const char* format) {
351 ASSERT((format[0] == 'S') || (format[0] == 'D'));
354 format[0] == 'D' ? kDoublePrecision : kSinglePrecision;
358 if (format[1] == 'n') {
360 } else if (format[1] == 'm') {
362 } else if (format[1] == 'd') {
373 if (format[2] == '+') {
375 if (format[0] == 'S') reg += immed8 - 1;
376 if (format[0] == 'D') reg += (immed8 / 2 - 1);
378 if (format[2] == '+') retval = 3;
393 int Decoder::FormatVFPinstruction(Instruction* instr, const char* format) {
394 Print(format);
444 // the current instructions. The format string points to the first
448 int Decoder::FormatOption(Instruction* instr, const char* format) {
449 switch (format[0]) {
465 ASSERT(STRING_STARTS_WITH(format, "cond"));
498 int width = (format[3] - '0') * 10 + (format[4] - '0');
499 int lsb = (format[6] - '0') * 10 + (format[7] - '0');
517 if (format[1] == 'w') {
522 if (format[1] == 'e') { // 'memop: load/store instructions.
523 ASSERT(STRING_STARTS_WITH(format, "memop"));
541 ASSERT(STRING_STARTS_WITH(format, "msg"));
549 if ((format[3] == '1') && (format[4] == '2')) {
551 ASSERT(STRING_STARTS_WITH(format, "off12"));
555 } else if (format[3] == '0') {
557 ASSERT(STRING_STARTS_WITH(format, "off0to3and8to19"));
565 ASSERT(STRING_STARTS_WITH(format, "off8"));
571 ASSERT(STRING_STARTS_WITH(format, "pu"));
576 return FormatRegister(instr, format);
579 if (format[1] == 'h') { // 'shift_op or 'shift_rm or 'shift_sat.
580 if (format[6] == 'o') { // 'shift_op
581 ASSERT(STRING_STARTS_WITH(format, "shift_op"));
589 } else if (format[6] == 's') { // 'shift_sat.
590 ASSERT(STRING_STARTS_WITH(format, "shift_sat"));
594 ASSERT(STRING_STARTS_WITH(format, "shift_rm"));
598 } else if (format[1] == 'v') { // 'svc
599 ASSERT(STRING_STARTS_WITH(format, "svc"));
602 } else if (format[1] == 'i') { // 'sign: signed extra loads and stores
603 ASSERT(STRING_STARTS_WITH(format, "sign"));
616 ASSERT(STRING_STARTS_WITH(format, "target"));
646 return FormatVFPinstruction(instr, format);
650 return FormatVFPRegister(instr, format);
668 // Format takes a formatting string for a whole instruction and prints it into
671 void Decoder::Format(Instruction* instr, const char* format) {
672 char cur = *format++;
675 format += FormatOption(instr, format);
679 cur = *format++;
697 Format(instr, "unknown");
713 Format(instr, "mul'cond's 'rn, 'rm, 'rs");
720 Format(instr, "mla'cond's 'rn, 'rm, 'rs, 'rd");
726 Format(instr, "mls'cond's 'rn, 'rm, 'rs, 'rd");
736 Format(instr, "'um'al'cond's 'rd, 'rn, 'rm, 'rs");
746 Format(instr, "'memop'cond's 'rd, ['rn], -'rm");
748 Format(instr, "'memop'cond's 'rd, ['rn], #-'off8");
754 Format(instr, "'memop'cond's 'rd, ['rn], +'rm");
756 Format(instr, "'memop'cond's 'rd, ['rn], #+'off8");
762 Format(instr, "'memop'cond's 'rd, ['rn, -'rm]'w");
764 Format(instr, "'memop'cond's 'rd, ['rn, #-'off8]'w");
770 Format(instr, "'memop'cond's 'rd, ['rn, +'rm]'w");
772 Format(instr, "'memop'cond's 'rd, ['rn, #+'off8]'w");
787 Format(instr, "'memop'cond'sign'h 'rd, ['rn], -'rm");
789 Format(instr, "'memop'cond'sign'h 'rd, ['rn], #-'off8");
795 Format(instr, "'memop'cond'sign'h 'rd, ['rn], +'rm");
797 Format(instr, "'memop'cond'sign'h 'rd, ['rn], #+'off8");
803 Format(instr, "'memop'cond'sign'h 'rd, ['rn, -'rm]'w");
805 Format(instr, "'memop'cond'sign'h 'rd, ['rn, #-'off8]'w");
811 Format(instr, "'memop'cond'sign'h 'rd, ['rn, +'rm]'w");
813 Format(instr, "'memop'cond'sign'h 'rd, ['rn, #+'off8]'w");
829 Format(instr, "bx'cond 'rm");
832 Format(instr, "blx'cond 'rm");
835 Format(instr, "bkpt 'off0to3and8to19");
844 Format(instr, "clz'cond 'rd, 'rm");
854 Format(instr, "nop'cond");
858 Format(instr, "and'cond's 'rd, 'rn, 'shift_op");
862 Format(instr, "eor'cond's 'rd, 'rn, 'shift_op");
866 Format(instr, "sub'cond's 'rd, 'rn, 'shift_op");
870 Format(instr, "rsb'cond's 'rd, 'rn, 'shift_op");
874 Format(instr, "add'cond's 'rd, 'rn, 'shift_op");
878 Format(instr, "adc'cond's 'rd, 'rn, 'shift_op");
882 Format(instr, "sbc'cond's 'rd, 'rn, 'shift_op");
886 Format(instr, "rsc'cond's 'rd, 'rn, 'shift_op");
891 Format(instr, "tst'cond 'rn, 'shift_op");
893 Format(instr, "movw'cond 'mw");
899 Format(instr, "teq'cond 'rn, 'shift_op");
909 Format(instr, "cmp'cond 'rn, 'shift_op");
911 Format(instr, "movt'cond 'mw");
917 Format(instr, "cmn'cond 'rn, 'shift_op");
926 Format(instr, "orr'cond's 'rd, 'rn, 'shift_op");
930 Format(instr, "mov'cond's 'rd, 'shift_op");
934 Format(instr, "bic'cond's 'rd, 'rn, 'shift_op");
938 Format(instr, "mvn'cond's 'rd, 'shift_op");
958 Format(instr, "'memop'cond'b 'rd, ['rn], #-'off12");
966 Format(instr, "'memop'cond'b 'rd, ['rn], #+'off12");
970 Format(instr, "'memop'cond'b 'rd, ['rn, #-'off12]'w");
974 Format(instr, "'memop'cond'b 'rd, ['rn, #+'off12]'w");
990 Format(instr, "'memop'cond'b 'rd, ['rn], -'shift_rm");
995 Format(instr, "'memop'cond'b 'rd, ['rn], +'shift_rm");
1002 Format(instr, "pkhbt'cond 'rd, 'rn, 'rm, lsl #'imm05@07");
1005 Format(instr, "pkhtb'cond 'rd, 'rn, 'rm, asr #32");
1007 Format(instr, "pkhtb'cond 'rd, 'rn, 'rm, asr #'imm05@07");
1021 Format(instr, "usat 'rd, #'imm05@16, 'rm'shift_sat");
1037 Format(instr, "uxtb16'cond 'rd, 'rm");
1040 Format(instr, "uxtb16'cond 'rd, 'rm, ror #8");
1043 Format(instr, "uxtb16'cond 'rd, 'rm, ror #16");
1046 Format(instr, "uxtb16'cond 'rd, 'rm, ror #24");
1061 Format(instr, "uxtb'cond 'rd, 'rm");
1064 Format(instr, "uxtb'cond 'rd, 'rm, ror #8");
1067 Format(instr, "uxtb'cond 'rd, 'rm, ror #16");
1070 Format(instr, "uxtb'cond 'rd, 'rm, ror #24");
1076 Format(instr, "uxtab'cond 'rd, 'rn, 'rm");
1079 Format(instr, "uxtab'cond 'rd, 'rn, 'rm, ror #8");
1082 Format(instr, "uxtab'cond 'rd, 'rn, 'rm, ror #16");
1085 Format(instr, "uxtab'cond 'rd, 'rn, 'rm, ror #24");
1103 // SDIV (in V8 notation matching ARM ISA format) rn = rm/rs
1104 Format(instr, "sdiv'cond'b 'rn, 'rm, 'rs");
1110 Format(instr, "'memop'cond'b 'rd, ['rn, -'shift_rm]'w");
1120 Format(instr, "ubfx'cond 'rd, 'rm, 'f");
1122 Format(instr, "sbfx'cond 'rd, 'rm, 'f");
1132 Format(instr, "bfc'cond 'rd, 'f");
1134 Format(instr, "bfi'cond 'rd, 'rm, 'f");
1140 Format(instr, "'memop'cond'b 'rd, ['rn, +'shift_rm]'w");
1159 Format(instr, "ldm'cond'pu 'rn'w, 'rlist");
1161 Format(instr, "stm'cond'pu 'rn'w, 'rlist");
1168 Format(instr, "b'l'cond 'target");
1180 Format(instr, "stop'cond 'svc");
1194 Format(instr, "svc'cond 'svc");
1231 Format(instr, "vmov'cond.f64 'Dd, 'Dm");
1233 Format(instr, "vmov'cond.f32 'Sd, 'Sm");
1237 Format(instr, "vabs'cond.f64 'Dd, 'Dm");
1240 Format(instr, "vneg'cond.f64 'Dd, 'Dm");
1249 Format(instr, "vcvt'cond.f64.s32 'Dd, 'Dd");
1259 Format(instr, "vsqrt'cond.f64 'Dd, 'Dm");
1262 Format(instr, "vmov'cond.f64 'Dd, 'd");
1272 Format(instr, "vsub'cond.f64 'Dd, 'Dn, 'Dm");
1274 Format(instr, "vadd'cond.f64 'Dd, 'Dn, 'Dm");
1281 Format(instr, "vmul'cond.f64 'Dd, 'Dn, 'Dm");
1287 Format(instr, "vmla'cond.f64 'Dd, 'Dn, 'Dm");
1293 Format(instr, "vmls'cond.f64 'Dd, 'Dn, 'Dm");
1299 Format(instr, "vdiv'cond.f64 'Dd, 'Dn, 'Dm");
1314 Format(instr, "vmov'cond.32 'Dd[0], 'rt");
1316 Format(instr, "vmov'cond.32 'Dd[1], 'rt");
1322 Format(instr, "vmov'cond.32 'rt, 'Dd[0]");
1324 Format(instr, "vmov'cond.32 'rt, 'Dd[1]");
1331 Format(instr, "vmsr'cond FPSCR, APSR");
1333 Format(instr, "vmsr'cond FPSCR, 'rt");
1337 Format(instr, "vmrs'cond APSR, FPSCR");
1339 Format(instr, "vmrs'cond 'rt, FPSCR");
1355 Format(instr, "vmov'cond 'rt, 'Sn");
1357 Format(instr, "vmov'cond 'Sn, 'rt");
1373 Format(instr, "vcmp'cond.f64 'Dd, 'Dm");
1375 Format(instr, "vcmp'cond.f64 'Dd, #0.0");
1392 Format(instr, "vcvt'cond.f32.f64 'Sd, 'Dm");
1394 Format(instr, "vcvt'cond.f64.f32 'Dd, 'Sm");
1411 Format(instr, "vcvt'cond.u32.f64 'Sd, 'Dm");
1413 Format(instr, "vcvt'cond.s32.f64 'Sd, 'Dm");
1417 Format(instr, "vcvt'cond.u32.f32 'Sd, 'Sm");
1419 Format(instr, "vcvt'cond.s32.f32 'Sd, 'Sm");
1427 Format(instr, "vcvt'cond.f64.u32 'Dd, 'Sm");
1429 Format(instr, "vcvt'cond.f64.s32 'Dd, 'Sm");
1433 Format(instr, "vcvt'cond.f32.u32 'Sd, 'Sm");
1435 Format(instr, "vcvt'cond.f32.s32 'Sd, 'Sm");
1455 Format(instr, "vldr'cond 'Sd, ['rn - 4*'imm08@00]");
1457 Format(instr, "vstr'cond 'Sd, ['rn - 4*'imm08@00]");
1463 Format(instr, "vldr'cond 'Sd, ['rn + 4*'imm08@00]");
1465 Format(instr, "vstr'cond 'Sd, ['rn + 4*'imm08@00]");
1476 Format(instr, "vldm'cond'pu 'rn'w, {'Sd-'Sd+}");
1478 Format(instr, "vstm'cond'pu 'rn'w, {'Sd-'Sd+}");
1492 Format(instr, "vmov'cond 'rt, 'rn, 'Dm");
1494 Format(instr, "vmov'cond 'Dm, 'rt, 'rn");
1500 Format(instr, "vldr'cond 'Dd, ['rn - 4*'imm08@00]");
1502 Format(instr, "vstr'cond 'Dd, ['rn - 4*'imm08@00]");
1508 Format(instr, "vldr'cond 'Dd, ['rn + 4*'imm08@00]");
1510 Format(instr, "vstr'cond 'Dd, ['rn + 4*'imm08@00]");
1521 Format(instr, "vldm'cond'pu 'rn'w, {'Dd-'Dd+}");
1523 Format(instr, "vstm'cond'pu 'rn'w, {'Dd-'Dd+}");