Re: [Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type

2017-01-24 Thread Kirill Batuzov
On Mon, 23 Jan 2017, Richard Henderson wrote: > On 01/23/2017 02:30 AM, Kirill Batuzov wrote: > > Because 4 adds on 4 i32 registers work good only when the size of > > vector elements matches the size of scalar variables we use for > > representation of a vector. add_i16x8 will not be that great

Re: [Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type

2017-01-23 Thread Richard Henderson
On 01/23/2017 02:30 AM, Kirill Batuzov wrote: > Because 4 adds on 4 i32 registers work good only when the size of > vector elements matches the size of scalar variables we use for > representation of a vector. add_i16x8 will not be that great if we use > 4 i32 variables: each will need to be split

Re: [Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type

2017-01-23 Thread Kirill Batuzov
On Sat, 21 Jan 2017, Richard Henderson wrote: > On 01/19/2017 08:54 AM, Kirill Batuzov wrote: > > > > Wrappers issue emulation code instead of operation if it is not supported by > > host. > > > > tcg_gen_add_i32x4 looks like this: > > > > if (TCG_TARGET_HAS_add_i32x4) { > >

Re: [Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type

2017-01-21 Thread Richard Henderson
On 01/19/2017 08:54 AM, Kirill Batuzov wrote: Wrappers issue emulation code instead of operation if it is not supported by host. tcg_gen_add_i32x4 looks like this: if (TCG_TARGET_HAS_add_i32x4) { tcg_gen_op3_v128(INDEX_op_add_i32x4, args[0], args[1], args[2]); } else { for (i = 0; i

Re: [Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type

2017-01-19 Thread Kirill Batuzov
On 19.01.2017 18:09, Richard Henderson wrote: On 01/19/2017 05:04 AM, Kirill Batuzov wrote: On Wed, 18 Jan 2017, Richard Henderson wrote: On 01/17/2017 01:07 AM, Kirill Batuzov wrote: +static inline TCGv_v128 tcg_global_mem_new_v128(TCGv_ptr reg, intptr_t offset, +

Re: [Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type

2017-01-19 Thread Richard Henderson
On 01/19/2017 05:04 AM, Kirill Batuzov wrote: On Wed, 18 Jan 2017, Richard Henderson wrote: On 01/17/2017 01:07 AM, Kirill Batuzov wrote: +static inline TCGv_v128 tcg_global_mem_new_v128(TCGv_ptr reg, intptr_t offset, +const char *name) +{ +

Re: [Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type

2017-01-19 Thread Kirill Batuzov
On Wed, 18 Jan 2017, Richard Henderson wrote: > On 01/17/2017 01:07 AM, Kirill Batuzov wrote: > > +static inline TCGv_v128 tcg_global_mem_new_v128(TCGv_ptr reg, intptr_t > > offset, > > +const char *name) > > +{ > > +int idx =

Re: [Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type

2017-01-18 Thread Richard Henderson
On 01/17/2017 01:07 AM, Kirill Batuzov wrote: +static inline TCGv_v128 tcg_global_mem_new_v128(TCGv_ptr reg, intptr_t offset, +const char *name) +{ +int idx = tcg_global_mem_new_internal(TCG_TYPE_V128, reg, offset, name); +return

[Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type

2017-01-17 Thread Kirill Batuzov
Introduce TCG_TYPE_V128 and corresponding TCGv_v128 for TCG temps. Add hepler functions that work with temps of this new type. Signed-off-by: Kirill Batuzov --- tcg/tcg-op.h | 24 tcg/tcg.c| 13 + tcg/tcg.h| 34