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);
117 void Format(Instruction* instr, const char* format);
322 int Decoder::FormatRegister(Instruction* instr, const char* format) {
323 ASSERT(format[0] == 'r');
324 if (format[1] == 'n') { // 'rn: Rn register
328 } else if (format[1] == 'd') { // 'rd: Rd register
332 } else if (format[1] == 's') { // 'rs: Rs register
336 } else if (format[1] == 'm') { // 'rm: Rm register
340 } else if (format[1] == 't') { // 'rt: Rt register
344 } else if (format[1] == 'l') {
346 ASSERT(STRING_STARTS_WITH(format, "rlist"));
371 int Decoder::FormatVFPRegister(Instruction* instr, const char* format) {
372 ASSERT((format[0] == 'S') || (format[0] == 'D'));
375 format[0] == 'D' ? kDoublePrecision : kSinglePrecision;
379 if (format[1] == 'n') {
381 } else if (format[1] == 'm') {
383 } else if (format[1] == 'd') {
385 if (format[2] == '+') {
387 if (format[0] == 'S') reg += immed8 - 1;
388 if (format[0] == 'D') reg += (immed8 / 2 - 1);
390 if (format[2] == '+') retval = 3;
405 int Decoder::FormatVFPinstruction(Instruction* instr, const char* format) {
406 Print(format);
422 // the current instructions. The format string points to the first
426 int Decoder::FormatOption(Instruction* instr, const char* format) {
427 switch (format[0]) {
443 ASSERT(STRING_STARTS_WITH(format, "cond"));
477 int width = (format[3] - '0') * 10 + (format[4] - '0');
478 int lsb = (format[6] - '0') * 10 + (format[7] - '0');
496 if (format[1] == 'w') {
501 if (format[1] == 'e') { // 'memop: load/store instructions.
502 ASSERT(STRING_STARTS_WITH(format, "memop"));
517 ASSERT(STRING_STARTS_WITH(format, "msg"));
525 if ((format[3] == '1') && (format[4] == '2')) {
527 ASSERT(STRING_STARTS_WITH(format, "off12"));
531 } else if (format[3] == '0') {
533 ASSERT(STRING_STARTS_WITH(format, "off0to3and8to19"));
541 ASSERT(STRING_STARTS_WITH(format, "off8"));
548 ASSERT(STRING_STARTS_WITH(format, "pu"));
553 return FormatRegister(instr, format);
556 if (format[1] == 'h') { // 'shift_op or 'shift_rm or 'shift_sat.
557 if (format[6] == 'o') { // 'shift_op
558 ASSERT(STRING_STARTS_WITH(format, "shift_op"));
566 } else if (format[6] == 's') { // 'shift_sat.
567 ASSERT(STRING_STARTS_WITH(format, "shift_sat"));
571 ASSERT(STRING_STARTS_WITH(format, "shift_rm"));
575 } else if (format[1] == 'v') { // 'svc
576 ASSERT(STRING_STARTS_WITH(format, "svc"));
579 } else if (format[1] == 'i') { // 'sign: signed extra loads and stores
580 ASSERT(STRING_STARTS_WITH(format, "sign"));
593 ASSERT(STRING_STARTS_WITH(format, "target"));
623 return FormatVFPinstruction(instr, format);
627 return FormatVFPRegister(instr, format);
645 // Format takes a formatting string for a whole instruction and prints it into
648 void Decoder::Format(Instruction* instr, const char* format) {
649 char cur = *format++;
652 format += FormatOption(instr, format);
656 cur = *format++;
665 Format(instr, "unknown");
681 Format(instr, "mul'cond's 'rn, 'rm, 'rs");
687 Format(instr, "mla'cond's 'rn, 'rm, 'rs, 'rd");
696 Format(instr, "'um'al'cond's 'rd, 'rn, 'rm, 'rs");
706 Format(instr, "'memop'cond's 'rd, ['rn], -'rm");
708 Format(instr, "'memop'cond's 'rd, ['rn], #-'off8");
714 Format(instr, "'memop'cond's 'rd, ['rn], +'rm");
716 Format(instr, "'memop'cond's 'rd, ['rn], #+'off8");
722 Format(instr, "'memop'cond's 'rd, ['rn, -'rm]'w");
724 Format(instr, "'memop'cond's 'rd, ['rn, #-'off8]'w");
730 Format(instr, "'memop'cond's 'rd, ['rn, +'rm]'w");
732 Format(instr, "'memop'cond's 'rd, ['rn, #+'off8]'w");
747 Format(instr, "'memop'cond'sign'h 'rd, ['rn], -'rm");
749 Format(instr, "'memop'cond'sign'h 'rd, ['rn], #-'off8");
755 Format(instr, "'memop'cond'sign'h 'rd, ['rn], +'rm");
757 Format(instr, "'memop'cond'sign'h 'rd, ['rn], #+'off8");
763 Format(instr, "'memop'cond'sign'h 'rd, ['rn, -'rm]'w");
765 Format(instr, "'memop'cond'sign'h 'rd, ['rn, #-'off8]'w");
771 Format(instr, "'memop'cond'sign'h 'rd, ['rn, +'rm]'w");
773 Format(instr, "'memop'cond'sign'h 'rd, ['rn, #+'off8]'w");
789 Format(instr, "bx'cond 'rm");
792 Format(instr, "blx'cond 'rm");
795 Format(instr, "bkpt 'off0to3and8to19");
804 Format(instr, "clz'cond 'rd, 'rm");
816 Format(instr, "and'cond's 'rd, 'rn, 'shift_op");
820 Format(instr, "eor'cond's 'rd, 'rn, 'shift_op");
824 Format(instr, "sub'cond's 'rd, 'rn, 'shift_op");
828 Format(instr, "rsb'cond's 'rd, 'rn, 'shift_op");
832 Format(instr, "add'cond's 'rd, 'rn, 'shift_op");
836 Format(instr, "adc'cond's 'rd, 'rn, 'shift_op");
840 Format(instr, "sbc'cond's 'rd, 'rn, 'shift_op");
844 Format(instr, "rsc'cond's 'rd, 'rn, 'shift_op");
849 Format(instr, "tst'cond 'rn, 'shift_op");
851 Format(instr, "movw'cond 'mw");
857 Format(instr, "teq'cond 'rn, 'shift_op");
867 Format(instr, "cmp'cond 'rn, 'shift_op");
869 Format(instr, "movt'cond 'mw");
875 Format(instr, "cmn'cond 'rn, 'shift_op");
884 Format(instr, "orr'cond's 'rd, 'rn, 'shift_op");
888 Format(instr, "mov'cond's 'rd, 'shift_op");
892 Format(instr, "bic'cond's 'rd, 'rn, 'shift_op");
896 Format(instr, "mvn'cond's 'rd, 'shift_op");
916 Format(instr, "'memop'cond'b 'rd, ['rn], #-'off12");
924 Format(instr, "'memop'cond'b 'rd, ['rn], #+'off12");
928 Format(instr, "'memop'cond'b 'rd, ['rn, #-'off12]'w");
932 Format(instr, "'memop'cond'b 'rd, ['rn, #+'off12]'w");
948 Format(instr, "'memop'cond'b 'rd, ['rn], -'shift_rm");
955 Format(instr, "usat 'rd, #'imm05@16, 'rm'shift_sat");
960 Format(instr, "'memop'cond'b 'rd, ['rn], +'shift_rm");
965 Format(instr, "'memop'cond'b 'rd, ['rn, -'shift_rm]'w");
975 Format(instr, "ubfx'cond 'rd, 'rm, 'f");
977 Format(instr, "sbfx'cond 'rd, 'rm, 'f");
987 Format(instr, "bfc'cond 'rd, 'f");
989 Format(instr, "bfi'cond 'rd, 'rm, 'f");
995 Format(instr, "'memop'cond'b 'rd, ['rn, +'shift_rm]'w");
1014 Format(instr, "ldm'cond'pu 'rn'w, 'rlist");
1016 Format(instr, "stm'cond'pu 'rn'w, 'rlist");
1023 Format(instr, "b'l'cond 'target");
1035 Format(instr, "stop'cond 'svc");
1049 Format(instr, "svc'cond 'svc");
1083 Format(instr, "vmov.f64'cond 'Dd, 'Dm");
1085 Format(instr, "vmov.f32'cond 'Sd, 'Sm");
1089 Format(instr, "vabs'cond 'Dd, 'Dm");
1092 Format(instr, "vneg'cond 'Dd, 'Dm");
1104 Format(instr, "vsqrt.f64'cond 'Dd, 'Dm");
1107 Format(instr, "vmov.f64'cond 'Dd, 'd");
1117 Format(instr, "vsub.f64'cond 'Dd, 'Dn, 'Dm");
1119 Format(instr, "vadd.f64'cond 'Dd, 'Dn, 'Dm");
1126 Format(instr, "vmul.f64'cond 'Dd, 'Dn, 'Dm");
1132 Format(instr, "vdiv.f64'cond 'Dd, 'Dn, 'Dm");
1148 Format(instr, "vmsr'cond FPSCR, APSR");
1150 Format(instr, "vmsr'cond FPSCR, 'rt");
1154 Format(instr, "vmrs'cond APSR, FPSCR");
1156 Format(instr, "vmrs'cond 'rt, FPSCR");
1172 Format(instr, "vmov'cond 'rt, 'Sn");
1174 Format(instr, "vmov'cond 'Sn, 'rt");
1190 Format(instr, "vcmp.f64'cond 'Dd, 'Dm");
1192 Format(instr, "vcmp.f64'cond 'Dd, #0.0");
1209 Format(instr, "vcvt.f32.f64'cond 'Sd, 'Dm");
1211 Format(instr, "vcvt.f64.f32'cond 'Dd, 'Sm");
1228 Format(instr, "vcvt.u32.f64'cond 'Sd, 'Dm");
1230 Format(instr, "vcvt.s32.f64'cond 'Sd, 'Dm");
1234 Format(instr, "vcvt.u32.f32'cond 'Sd, 'Sm");
1236 Format(instr, "vcvt.s32.f32'cond 'Sd, 'Sm");
1244 Format(instr, "vcvt.f64.u32'cond 'Dd, 'Sm");
1246 Format(instr, "vcvt.f64.s32'cond 'Dd, 'Sm");
1250 Format(instr, "vcvt.f32.u32'cond 'Sd, 'Sm");
1252 Format(instr, "vcvt.f32.s32'cond 'Sd, 'Sm");
1272 Format(instr, "vldr'cond 'Sd, ['rn - 4*'imm08@00]");
1274 Format(instr, "vstr'cond 'Sd, ['rn - 4*'imm08@00]");
1280 Format(instr, "vldr'cond 'Sd, ['rn + 4*'imm08@00]");
1282 Format(instr, "vstr'cond 'Sd, ['rn + 4*'imm08@00]");
1293 Format(instr, "vldm'cond'pu 'rn'w, {'Sd-'Sd+}");
1295 Format(instr, "vstm'cond'pu 'rn'w, {'Sd-'Sd+}");
1309 Format(instr, "vmov'cond 'rt, 'rn, 'Dm");
1311 Format(instr, "vmov'cond 'Dm, 'rt, 'rn");
1316 Format(instr, "vldr'cond 'Dd, ['rn - 4*'imm08@00]");
1318 Format(instr, "vstr'cond 'Dd, ['rn - 4*'imm08@00]");
1323 Format(instr, "vldr'cond 'Dd, ['rn + 4*'imm08@00]");
1325 Format(instr, "vstr'cond 'Dd, ['rn + 4*'imm08@00]");
1333 Format(instr, "vldm'cond'pu 'rn'w, {'Dd-'Dd+}");
1335 Format(instr, "vstm'cond'pu 'rn'w, {'Dd-'Dd+}");