Lines Matching +refs:pause +refs:get +refs:op
223 struct opcode op[8]; member
312 #define __FOP_START(op, align) \ argument
313 extern void em_##op(struct fastop *fake); \
315 ".global em_" #op " \n\t" \
317 "em_" #op ":\n\t"
319 #define FOP_START(op) __FOP_START(op, FASTOP_SIZE) argument
331 #define FOP1E(op, dst) \ argument
332 __FOP_FUNC(#op "_" #dst) \
333 "10: " #op " %" #dst " \n\t" \
334 __FOP_RET(#op "_" #dst)
336 #define FOP1EEX(op, dst) \ argument
337 FOP1E(op, dst) _ASM_EXTABLE_TYPE_REG(10b, 11b, EX_TYPE_ZERO_REG, %%esi)
339 #define FASTOP1(op) \ argument
340 FOP_START(op) \
341 FOP1E(op##b, al) \
342 FOP1E(op##w, ax) \
343 FOP1E(op##l, eax) \
344 ON64(FOP1E(op##q, rax)) \
348 #define FASTOP1SRC2(op, name) \ argument
350 FOP1E(op, cl) \
351 FOP1E(op, cx) \
352 FOP1E(op, ecx) \
353 ON64(FOP1E(op, rcx)) \
357 #define FASTOP1SRC2EX(op, name) \ argument
359 FOP1EEX(op, cl) \
360 FOP1EEX(op, cx) \
361 FOP1EEX(op, ecx) \
362 ON64(FOP1EEX(op, rcx)) \
365 #define FOP2E(op, dst, src) \ argument
366 __FOP_FUNC(#op "_" #dst "_" #src) \
367 #op " %" #src ", %" #dst " \n\t" \
368 __FOP_RET(#op "_" #dst "_" #src)
370 #define FASTOP2(op) \ argument
371 FOP_START(op) \
372 FOP2E(op##b, al, dl) \
373 FOP2E(op##w, ax, dx) \
374 FOP2E(op##l, eax, edx) \
375 ON64(FOP2E(op##q, rax, rdx)) \
379 #define FASTOP2W(op) \ argument
380 FOP_START(op) \
382 FOP2E(op##w, ax, dx) \
383 FOP2E(op##l, eax, edx) \
384 ON64(FOP2E(op##q, rax, rdx)) \
388 #define FASTOP2CL(op) \ argument
389 FOP_START(op) \
390 FOP2E(op##b, al, cl) \
391 FOP2E(op##w, ax, cl) \
392 FOP2E(op##l, eax, cl) \
393 ON64(FOP2E(op##q, rax, cl)) \
397 #define FASTOP2R(op, name) \ argument
399 FOP2E(op##b, dl, al) \
400 FOP2E(op##w, dx, ax) \
401 FOP2E(op##l, edx, eax) \
402 ON64(FOP2E(op##q, rdx, rax)) \
405 #define FOP3E(op, dst, src, src2) \ argument
406 __FOP_FUNC(#op "_" #dst "_" #src "_" #src2) \
407 #op " %" #src2 ", %" #src ", %" #dst " \n\t"\
408 __FOP_RET(#op "_" #dst "_" #src "_" #src2)
411 #define FASTOP3WCL(op) \ argument
412 FOP_START(op) \
414 FOP3E(op##w, ax, dx, cl) \
415 FOP3E(op##l, eax, edx, cl) \
416 ON64(FOP3E(op##q, rax, rdx, cl)) \
420 #define FOP_SETCC(op) \ argument
421 FOP_FUNC(op) \
422 #op " %al \n\t" \
423 FOP_RET(op)
1076 static void fetch_register_operand(struct operand *op) in fetch_register_operand() argument
1078 switch (op->bytes) { in fetch_register_operand()
1080 op->val = *(u8 *)op->addr.reg; in fetch_register_operand()
1083 op->val = *(u16 *)op->addr.reg; in fetch_register_operand()
1086 op->val = *(u32 *)op->addr.reg; in fetch_register_operand()
1089 op->val = *(u64 *)op->addr.reg; in fetch_register_operand()
1138 struct operand *op) in decode_register_operand() argument
1148 op->type = OP_XMM; in decode_register_operand()
1149 op->bytes = 16; in decode_register_operand()
1150 op->addr.xmm = reg; in decode_register_operand()
1151 kvm_read_sse_reg(reg, &op->vec_val); in decode_register_operand()
1156 op->type = OP_MM; in decode_register_operand()
1157 op->bytes = 8; in decode_register_operand()
1158 op->addr.mm = reg; in decode_register_operand()
1162 op->type = OP_REG; in decode_register_operand()
1163 op->bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes; in decode_register_operand()
1164 op->addr.reg = decode_register(ctxt, reg, ctxt->d & ByteOp); in decode_register_operand()
1166 fetch_register_operand(op); in decode_register_operand()
1167 op->orig_val = op->val; in decode_register_operand()
1177 struct operand *op) in decode_modrm() argument
1194 op->type = OP_REG; in decode_modrm()
1195 op->bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes; in decode_modrm()
1196 op->addr.reg = decode_register(ctxt, ctxt->modrm_rm, in decode_modrm()
1199 op->type = OP_XMM; in decode_modrm()
1200 op->bytes = 16; in decode_modrm()
1201 op->addr.xmm = ctxt->modrm_rm; in decode_modrm()
1202 kvm_read_sse_reg(ctxt->modrm_rm, &op->vec_val); in decode_modrm()
1206 op->type = OP_MM; in decode_modrm()
1207 op->bytes = 8; in decode_modrm()
1208 op->addr.mm = ctxt->modrm_rm & 7; in decode_modrm()
1211 fetch_register_operand(op); in decode_modrm()
1215 op->type = OP_MEM; in decode_modrm()
1305 op->addr.mem.ea = modrm_ea; in decode_modrm()
1314 struct operand *op) in decode_abs() argument
1318 op->type = OP_MEM; in decode_abs()
1321 op->addr.mem.ea = insn_fetch(u16, ctxt); in decode_abs()
1324 op->addr.mem.ea = insn_fetch(u32, ctxt); in decode_abs()
1327 op->addr.mem.ea = insn_fetch(u64, ctxt); in decode_abs()
1780 static void write_register_operand(struct operand *op) in write_register_operand() argument
1782 return assign_register(op->addr.reg, op->val, op->bytes); in write_register_operand()
1785 static int writeback(struct x86_emulate_ctxt *ctxt, struct operand *op) in writeback() argument
1787 switch (op->type) { in writeback()
1789 write_register_operand(op); in writeback()
1794 op->addr.mem, in writeback()
1795 &op->orig_val, in writeback()
1796 &op->val, in writeback()
1797 op->bytes); in writeback()
1800 op->addr.mem, in writeback()
1801 &op->val, in writeback()
1802 op->bytes); in writeback()
1805 op->addr.mem, in writeback()
1806 op->data, in writeback()
1807 op->bytes * op->count); in writeback()
1809 kvm_write_sse_reg(op->addr.xmm, &op->vec_val); in writeback()
1812 kvm_write_mmx_reg(op->addr.mm, &op->mm_val); in writeback()
3042 struct operand *op) in string_addr_inc() argument
3044 int df = (ctxt->eflags & X86_EFLAGS_DF) ? -op->count : op->count; in string_addr_inc()
3046 register_address_increment(ctxt, reg, df * op->bytes); in string_addr_inc()
3047 op->addr.mem.ea = register_address(ctxt, reg); in string_addr_inc()
3479 void (*get)(struct x86_emulate_ctxt *ctxt, in emulate_store_desc_ptr()
3490 get(ctxt, &desc_ptr); in emulate_store_desc_ptr()
4334 DI(SrcAcc | DstReg, pause), X7(D(SrcAcc | DstReg)),
4557 static int decode_imm(struct x86_emulate_ctxt *ctxt, struct operand *op, in decode_imm() argument
4562 op->type = OP_IMM; in decode_imm()
4563 op->bytes = size; in decode_imm()
4564 op->addr.mem.ea = ctxt->_eip; in decode_imm()
4566 switch (op->bytes) { in decode_imm()
4568 op->val = insn_fetch(s8, ctxt); in decode_imm()
4571 op->val = insn_fetch(s16, ctxt); in decode_imm()
4574 op->val = insn_fetch(s32, ctxt); in decode_imm()
4577 op->val = insn_fetch(s64, ctxt); in decode_imm()
4581 switch (op->bytes) { in decode_imm()
4583 op->val &= 0xff; in decode_imm()
4586 op->val &= 0xffff; in decode_imm()
4589 op->val &= 0xffffffff; in decode_imm()
4597 static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op, in decode_operand() argument
4604 decode_register_operand(ctxt, op); in decode_operand()
4607 rc = decode_imm(ctxt, op, 1, false); in decode_operand()
4612 *op = ctxt->memop; in decode_operand()
4613 ctxt->memopp = op; in decode_operand()
4616 op->orig_val = op->val; in decode_operand()
4622 op->type = OP_REG; in decode_operand()
4623 op->bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes; in decode_operand()
4624 op->addr.reg = reg_rmw(ctxt, VCPU_REGS_RAX); in decode_operand()
4625 fetch_register_operand(op); in decode_operand()
4626 op->orig_val = op->val; in decode_operand()
4629 op->type = OP_REG; in decode_operand()
4630 op->bytes = (ctxt->d & ByteOp) ? 2 : ctxt->op_bytes; in decode_operand()
4631 op->addr.reg = reg_rmw(ctxt, VCPU_REGS_RAX); in decode_operand()
4632 fetch_register_operand(op); in decode_operand()
4633 op->orig_val = op->val; in decode_operand()
4637 op->type = OP_NONE; in decode_operand()
4640 op->type = OP_REG; in decode_operand()
4641 op->bytes = ctxt->op_bytes; in decode_operand()
4642 op->addr.reg = reg_rmw(ctxt, VCPU_REGS_RDX); in decode_operand()
4643 fetch_register_operand(op); in decode_operand()
4644 op->orig_val = op->val; in decode_operand()
4647 op->type = OP_MEM; in decode_operand()
4648 op->bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes; in decode_operand()
4649 op->addr.mem.ea = in decode_operand()
4651 op->addr.mem.seg = VCPU_SREG_ES; in decode_operand()
4652 op->val = 0; in decode_operand()
4653 op->count = 1; in decode_operand()
4656 op->type = OP_REG; in decode_operand()
4657 op->bytes = 2; in decode_operand()
4658 op->addr.reg = reg_rmw(ctxt, VCPU_REGS_RDX); in decode_operand()
4659 fetch_register_operand(op); in decode_operand()
4662 op->type = OP_IMM; in decode_operand()
4663 op->bytes = 1; in decode_operand()
4664 op->val = reg_read(ctxt, VCPU_REGS_RCX) & 0xff; in decode_operand()
4667 rc = decode_imm(ctxt, op, 1, true); in decode_operand()
4670 op->type = OP_IMM; in decode_operand()
4671 op->bytes = 1; in decode_operand()
4672 op->val = 1; in decode_operand()
4675 rc = decode_imm(ctxt, op, imm_size(ctxt), true); in decode_operand()
4678 rc = decode_imm(ctxt, op, ctxt->op_bytes, true); in decode_operand()
4695 rc = decode_imm(ctxt, op, 2, false); in decode_operand()
4698 rc = decode_imm(ctxt, op, imm_size(ctxt), false); in decode_operand()
4701 op->type = OP_MEM; in decode_operand()
4702 op->bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes; in decode_operand()
4703 op->addr.mem.ea = in decode_operand()
4705 op->addr.mem.seg = ctxt->seg_override; in decode_operand()
4706 op->val = 0; in decode_operand()
4707 op->count = 1; in decode_operand()
4710 op->type = OP_MEM; in decode_operand()
4711 op->bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes; in decode_operand()
4712 op->addr.mem.ea = in decode_operand()
4716 op->addr.mem.seg = ctxt->seg_override; in decode_operand()
4717 op->val = 0; in decode_operand()
4720 op->type = OP_IMM; in decode_operand()
4721 op->addr.mem.ea = ctxt->_eip; in decode_operand()
4722 op->bytes = ctxt->op_bytes + 2; in decode_operand()
4723 insn_fetch_arr(op->valptr, op->bytes, ctxt); in decode_operand()
4729 op->type = OP_IMM; in decode_operand()
4730 op->val = VCPU_SREG_ES; in decode_operand()
4733 op->type = OP_IMM; in decode_operand()
4734 op->val = VCPU_SREG_CS; in decode_operand()
4737 op->type = OP_IMM; in decode_operand()
4738 op->val = VCPU_SREG_SS; in decode_operand()
4741 op->type = OP_IMM; in decode_operand()
4742 op->val = VCPU_SREG_DS; in decode_operand()
4745 op->type = OP_IMM; in decode_operand()
4746 op->val = VCPU_SREG_FS; in decode_operand()
4749 op->type = OP_IMM; in decode_operand()
4750 op->val = VCPU_SREG_GS; in decode_operand()
4755 op->type = OP_NONE; /* Disable writeback. */ in decode_operand()
4945 opcode = opcode.u.esc->op[(ctxt->modrm >> 3) & 7]; in x86_decode_insn()
5101 static void fetch_possible_mmx_operand(struct operand *op) in fetch_possible_mmx_operand() argument
5103 if (op->type == OP_MM) in fetch_possible_mmx_operand()
5104 kvm_read_mmx_reg(op->addr.mm, &op->mm_val); in fetch_possible_mmx_operand()