int asm_operand_fetch_encoded(asm_operand *operand, u_char *opcode, int otype, asm_instr *ins) #endif { int len; operand->type = ASM_OTYPE_ENCODED; len = operand_rmv(operand, opcode, 4, ins->proc); operand->sbaser = get_reg_intel(operand->baser, operand->regset); operand->sindex = get_reg_intel(operand->indexr, operand->regset); return (len); }
int asm_operand_fetch_control(asm_operand *operand, u_char *opcode, int otype, asm_instr *ins) { struct s_modrm *modrm; modrm = (struct s_modrm *) opcode; operand->content = ASM_CONTENT_CONTROL; operand->type = ASM_OPTYPE_REG; operand->regset = ASM_REGSET_CREG; operand->baser = modrm->r; operand->ptr = opcode; operand->imm = 0; operand->len = 0; operand->sbaser = get_reg_intel(operand->baser, operand->regset); operand->sindex = get_reg_intel(operand->indexr, operand->regset); return (0); }
int asm_operand_fetch_xsrc(asm_operand *operand, u_char *opcode, int otype, asm_instr *ins) { operand->content = ASM_CONTENT_XSRC; operand->type = ASM_OPTYPE_MEM; operand->memtype = ASM_OP_BASE | ASM_OP_REFERENCE; operand->baser = ASM_REG_ESI; operand->regset = asm_proc_opsize(ins->proc) ? ASM_REGSET_R16 : ASM_REGSET_R32; operand->sbaser = get_reg_intel(operand->baser, operand->regset); operand->prefix = ASM_PREFIX_DS; return (0); }
int asm_operand_fetch_memory(asm_operand *operand, u_char *opcode, int otype, asm_instr *ins) { struct s_modrm *modrm; modrm = (struct s_modrm *) opcode; operand->content = ASM_CONTENT_MEMORY; operand->type = ASM_OPTYPE_REG; operand->regset = ASM_REGSET_R32; operand->baser = modrm->r; operand->sbaser = get_reg_intel(operand->baser, operand->regset); return (0); }
int asm_operand_fetch_opmod(asm_operand *operand, u_char *opcode, int type, asm_instr *ins) #endif { struct s_modrm *modrm; operand->regset = asm_proc_opsize(ins->proc) ? ASM_REGSET_R16 : ASM_REGSET_R32; operand->type = ASM_OTYPE_OPMOD; operand->content = ASM_OP_BASE; operand->regset = asm_proc_opsize(ins->proc) ? ASM_REGSET_R16 : ASM_REGSET_R32; modrm = (struct s_modrm *) opcode; operand->baser = modrm->m; operand->sbaser = get_reg_intel(operand->baser, operand->regset); return (0); }