search for: repe_prefix

Displaying 2 results from an estimated 2 matches for "repe_prefix".

Did you mean: rep_prefix
2011 Nov 30
0
[PATCH 4/4] x86/emulator: cleanup
...eral number) Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -304,6 +304,10 @@ union vex { ptr[1] = rex | REX_PREFIX; \ } while (0) +#define rep_prefix() (vex.pfx >= vex_f3) +#define repe_prefix() (vex.pfx == vex_f3) +#define repne_prefix() (vex.pfx == vex_f2) + /* Type, address-of, and value of an instruction''s operand. */ struct operand { enum { OP_REG, OP_MEM, OP_IMM, OP_NONE } type; @@ -734,7 +738,7 @@ static unsigned long __get_rep_prefix( #define get_rep_prefix()...
2011 Nov 30
0
[PATCH 3/4] x86/emulator: properly handle lzcnt and tzcnt
...asm ( "bsf %2,%0; setz %b1" : "=r" (dst.val), "=q" (zf) - : "r" (src.val), "1" (0) ); + : "r" (src.val) ); _regs.eflags &= ~EFLG_ZF; - if ( zf ) + if ( (rep_prefix == REPE_PREFIX) && vcpu_has_bmi1() ) + { + _regs.eflags &= ~EFLG_CF; + if ( zf ) + { + _regs.eflags |= EFLG_CF; + dst.val = op_bytes * 8; + } + else if ( !dst.val ) + _regs.eflags |= EFLG_ZF; +...