void __x86_uinst_new_mem(struct x86_ctx_t *ctx, enum x86_uinst_opcode_t opcode, uint32_t address, int size, enum x86_dep_t idep0, enum x86_dep_t idep1, enum x86_dep_t idep2, enum x86_dep_t odep0, enum x86_dep_t odep1, enum x86_dep_t odep2, enum x86_dep_t odep3) { struct x86_uinst_t *uinst; int i; /* Do nothing for functional simulation */ if (x86_emu_kind == x86_emu_kind_functional) return; /* Create uinst */ uinst = x86_uinst_create(); uinst->opcode = opcode; uinst->idep[0] = idep0; uinst->idep[1] = idep1; uinst->idep[2] = idep2; uinst->odep[0] = odep0; uinst->odep[1] = odep1; uinst->odep[2] = odep2; uinst->odep[3] = odep3; uinst->address = address; uinst->size = size; /* Emit effective address computation if needed. */ for (i = 0; !x86_uinst_effaddr_emitted && i < X86_UINST_MAX_DEPS; i++) x86_uinst_emit_effaddr(uinst, i, ctx); /* Parse input dependences */ for (i = 0; i < X86_UINST_MAX_IDEPS; i++) x86_uinst_parse_idep(uinst, i, ctx); /* Add micro-instruction */ list_add(x86_uinst_list, uinst); /* Parse output dependences */ for (i = 0; i < X86_UINST_MAX_ODEPS; i++) x86_uinst_parse_odep(uinst, i + X86_UINST_MAX_IDEPS, ctx); }
void __x86_uinst_new_mem(X86Context *ctx, enum x86_uinst_opcode_t opcode, unsigned int address, int size, enum x86_dep_t idep0, enum x86_dep_t idep1, enum x86_dep_t idep2, enum x86_dep_t odep0, enum x86_dep_t odep1, enum x86_dep_t odep2, enum x86_dep_t odep3) { struct x86_uinst_t *uinst; int i; /* Create micro-instruction */ assert(arch_x86->sim_kind == arch_sim_kind_detailed); uinst = x86_uinst_create(); uinst->opcode = opcode; uinst->idep[0] = idep0; uinst->idep[1] = idep1; uinst->idep[2] = idep2; uinst->odep[0] = odep0; uinst->odep[1] = odep1; uinst->odep[2] = odep2; uinst->odep[3] = odep3; uinst->address = address; uinst->size = size; /* Emit effective address computation if needed. */ for (i = 0; !x86_uinst_effaddr_emitted && i < X86_UINST_MAX_DEPS; i++) x86_uinst_emit_effaddr(uinst, i, ctx); /* Parse input dependences */ for (i = 0; i < X86_UINST_MAX_IDEPS; i++) x86_uinst_parse_idep(uinst, i, ctx); /* Add micro-instruction */ list_add(x86_uinst_list, uinst); /* Parse output dependences */ for (i = 0; i < X86_UINST_MAX_ODEPS; i++) x86_uinst_parse_odep(uinst, i + X86_UINST_MAX_IDEPS, ctx); }