MCPcopy Create free account
hub / github.com/F-Stack/f-stack / db_disasm_esc

Function db_disasm_esc

freebsd/i386/i386/db_disasm.c:1061–1150  ·  view source on GitHub ↗

* Disassemble floating-point ("escape") instruction * and return updated location. */

(loc, inst, short_addr, size, seg)

Source from the content-addressed store, hash-verified

1059 * and return updated location.
1060 */
1061static db_addr_t
1062db_disasm_esc(loc, inst, short_addr, size, seg)
1063 db_addr_t loc;
1064 int inst;
1065 int short_addr;
1066 int size;
1067 const char * seg;
1068{
1069 int regmodrm;
1070 const struct finst * fp;
1071 int mod;
1072 struct i_addr address;
1073 const char * name;
1074
1075 get_value_inc(regmodrm, loc, 1, FALSE);
1076 fp = &db_Esc_inst[inst - 0xd8][f_reg(regmodrm)];
1077 mod = f_mod(regmodrm);
1078 if (mod != 3) {
1079 if (*fp->f_name == '\0') {
1080 db_printf("<bad instruction>");
1081 return (loc);
1082 }
1083 /*
1084 * Normal address modes.
1085 */
1086 loc = db_read_address(loc, short_addr, regmodrm, &address);
1087 db_printf("%s", fp->f_name);
1088 switch(fp->f_size) {
1089 case SNGL:
1090 db_printf("s");
1091 break;
1092 case DBLR:
1093 db_printf("l");
1094 break;
1095 case EXTR:
1096 db_printf("t");
1097 break;
1098 case WORD:
1099 db_printf("s");
1100 break;
1101 case LONG:
1102 db_printf("l");
1103 break;
1104 case QUAD:
1105 db_printf("q");
1106 break;
1107 default:
1108 break;
1109 }
1110 db_printf("\t");
1111 db_print_address(seg, BYTE, &address);
1112 }
1113 else {
1114 /*
1115 * 'reg-reg' - special formats
1116 */
1117 switch (fp->f_rrmode) {
1118 case op2(ST,STI):

Callers 1

db_disasmFunction · 0.70

Calls 3

db_printfFunction · 0.85
db_read_addressFunction · 0.70
db_print_addressFunction · 0.70

Tested by

no test coverage detected