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

Function db_disasm_esc

freebsd/amd64/amd64/db_disasm.c:1147–1237  ·  view source on GitHub ↗

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

(loc, inst, rex, short_addr, size, seg)

Source from the content-addressed store, hash-verified

1145 * and return updated location.
1146 */
1147static db_addr_t
1148db_disasm_esc(loc, inst, rex, short_addr, size, seg)
1149 db_addr_t loc;
1150 int inst;
1151 int rex;
1152 int short_addr;
1153 int size;
1154 const char * seg;
1155{
1156 int regmodrm;
1157 const struct finst * fp;
1158 int mod;
1159 struct i_addr address;
1160 const char * name;
1161
1162 get_value_inc(regmodrm, loc, 1, FALSE);
1163 fp = &db_Esc_inst[inst - 0xd8][f_reg(rex, regmodrm)];
1164 mod = f_mod(rex, regmodrm);
1165 if (mod != 3) {
1166 if (*fp->f_name == '\0') {
1167 db_printf("<bad instruction>");
1168 return (loc);
1169 }
1170 /*
1171 * Normal address modes.
1172 */
1173 loc = db_read_address(loc, short_addr, rex, regmodrm, &address);
1174 db_printf("%s", fp->f_name);
1175 switch(fp->f_size) {
1176 case SNGL:
1177 db_printf("s");
1178 break;
1179 case DBLR:
1180 db_printf("l");
1181 break;
1182 case EXTR:
1183 db_printf("t");
1184 break;
1185 case WORD:
1186 db_printf("s");
1187 break;
1188 case LONG:
1189 db_printf("l");
1190 break;
1191 case QUAD:
1192 db_printf("q");
1193 break;
1194 default:
1195 break;
1196 }
1197 db_printf("\t");
1198 db_print_address(seg, BYTE, rex, &address);
1199 }
1200 else {
1201 /*
1202 * 'reg-reg' - special formats
1203 */
1204 switch (fp->f_rrmode) {

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