Displaying 5 results from an estimated 5 matches for "exc_ud".
Did you mean:
ec_up
2007 Dec 19
3
x86_emulate(): forgot to generate_exception_if() for 0xff?
Hi all,
In arch/x86/x86_emulate.c: x86_emulate():
1716 case 0xfe: /* Grp4 */
1717 generate_exception_if((m odrm_reg & 7) >= 2, EXC_UD);
1718 case 0xff: /* Grp5 */
1719 switch ( modrm_reg & 7 )
1720 {
1721 case 0: /* inc */
1722 emulate_1op("inc", dst, _regs.eflags);
1723 break;
1724 case 1: /* dec */
1725 emulate_1op(&quo...
2008 Apr 21
1
[PATCH] x86-64: emulation support for cmpxchg16b
...-3346,60 +3346,64 @@ x86_emulate(
src.val = x86_seg_gs;
goto pop_seg;
- case 0xc7: /* Grp9 (cmpxchg8b) */
-#if defined(__i386__)
- {
- unsigned long old_lo, old_hi;
+ case 0xc7: /* Grp9 (cmpxchg{8,16}b) */
generate_exception_if((modrm_reg & 7) != 1, EXC_UD, -1);
generate_exception_if(ea.type != OP_MEM, EXC_UD, -1);
- if ( (rc = ops->read(ea.mem.seg, ea.mem.off+0, &old_lo, 4, ctxt)) ||
- (rc = ops->read(ea.mem.seg, ea.mem.off+4, &old_hi, 4, ctxt)) )
- goto done;
- if ( (old_lo != _regs.eax) |...
2013 Nov 19
1
[PATCH] x86: fix emulation of indirect far calls and jumps
...- break;
case 4: /* jmp (near) */
_regs.eip = src.val;
dst.type = OP_NONE;
@@ -3580,9 +3579,9 @@ x86_emulate(
case 5: /* jmp (far, absolute indirect) */ {
unsigned long sel;
- generate_exception_if(dst.type != OP_MEM, EXC_UD, -1);
+ generate_exception_if(src.type != OP_MEM, EXC_UD, -1);
- if ( (rc = read_ulong(dst.mem.seg, dst.mem.off+dst.bytes,
+ if ( (rc = read_ulong(src.mem.seg, src.mem.off + op_bytes,
&sel, 2, ctxt, ops)) )
g...
2011 Nov 30
0
[PATCH 3/4] x86/emulator: properly handle lzcnt and tzcnt
...ic bool_t vcpu_has(
return rc == X86EMUL_OKAY;
}
+#define vcpu_has_lzcnt() vcpu_has(0x80000001, ECX, 5, ctxt, ops)
+#define vcpu_has_bmi1() vcpu_has(0x00000007, EBX, 3, ctxt, ops)
+
#define vcpu_must_have(leaf, reg, bit) \
generate_exception_if(!vcpu_has(leaf, reg, bit, ctxt, ops), EXC_UD, -1)
#define vcpu_must_have_mmx() vcpu_must_have(0x00000001, EDX, 23)
@@ -4357,13 +4360,24 @@ x86_emulate(
dst.val = (uint8_t)src.val;
break;
- case 0xbc: /* bsf */ {
- int zf;
+ case 0xbc: /* bsf or tzcnt */ {
+ bool_t zf;
asm ( "bsf %2,%0;...
2013 Aug 28
3
[PATCH] x86: AVX instruction emulation fixes
...kipped\n");
+
for ( j = 1; j <= 2; j++ )
{
#if defined(__i386__)
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -1454,10 +1454,10 @@ x86_emulate(
/* VEX */
generate_exception_if(rex_prefix || vex.pfx, EXC_UD, -1);
- vex.raw[0] = b;
+ vex.raw[0] = modrm;
if ( b & 1 )
{
- vex.raw[1] = b;
+ vex.raw[1] = modrm;
vex.opcx = vex_0f;
vex.x = 1;...