Re: [Qemu-devel] [PATCH 5/5] tcg/i386: Use SHLX/SHRX/SARX instructions

2014-02-17 Thread Richard Henderson
On 02/16/2014 08:21 AM, Paolo Bonzini wrote: > Il 31/01/2014 15:43, Richard Henderson ha scritto: >> +gen_shift_maybe_vex: >> +if (have_bmi2 && !const_args[2]) { >> +tcg_out_vex_modrm(s, vexop + rexw, args[0], args[2], args[1]); >> +break; >> +} >> +

Re: [Qemu-devel] [PATCH 5/5] tcg/i386: Use SHLX/SHRX/SARX instructions

2014-02-16 Thread Aurelien Jarno
On Fri, Jan 31, 2014 at 08:43:38AM -0600, Richard Henderson wrote: > These three-operand shift instructions do not require the shift count > to be placed into ECX. This reduces the number of mov insns required, > with the mere addition of a new register constraint. > > Don't attempt to get rid of

Re: [Qemu-devel] [PATCH 5/5] tcg/i386: Use SHLX/SHRX/SARX instructions

2014-02-16 Thread Richard Henderson
On 02/16/2014 06:21 AM, Paolo Bonzini wrote: > Il 31/01/2014 15:43, Richard Henderson ha scritto: >> +gen_shift_maybe_vex: >> +if (have_bmi2 && !const_args[2]) { >> +tcg_out_vex_modrm(s, vexop + rexw, args[0], args[2], args[1]); >> +break; >> +} >> +

Re: [Qemu-devel] [PATCH 5/5] tcg/i386: Use SHLX/SHRX/SARX instructions

2014-02-16 Thread Paolo Bonzini
Il 31/01/2014 15:43, Richard Henderson ha scritto: +gen_shift_maybe_vex: +if (have_bmi2 && !const_args[2]) { +tcg_out_vex_modrm(s, vexop + rexw, args[0], args[2], args[1]); +break; +} +/* FALLTHRU */ What if args[2] happens to be ECX? Apart f

[Qemu-devel] [PATCH 5/5] tcg/i386: Use SHLX/SHRX/SARX instructions

2014-01-31 Thread Richard Henderson
These three-operand shift instructions do not require the shift count to be placed into ECX. This reduces the number of mov insns required, with the mere addition of a new register constraint. Don't attempt to get rid of the matching constraint, as that's impossible to manipulate with just a new