qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type
Date: Thu, 19 Jan 2017 07:09:16 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

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)
+{
+    int idx = tcg_global_mem_new_internal(TCG_TYPE_V128, reg, offset,
name);
+    return MAKE_TCGV_V128(idx);
+}

You shouldn't allow a v128 type to be created if the host doesn't support it.

The idea here was to create it either way, but make sure no operation
will ever be issued if host does not support it (tcg_gen_* wrappers take
care of this).

Huh?  If you issue *no* operation, then how is the operation being emulated?

I'm not sure about this last part. The host may not have i64, so there
should be another case - 4 x i32. So we'll get 4 cases for v128:

Recursively you'd get 4 x i32, but at least they'll be tagged TCG_TYPE_I64, and be handled by the rest of the tcg code generator like it should be.


v128
2 x v64
2 x i64
4 x i32

3 cases will need to be added to tcg_temp_new_internal and
tcg_global_new_mem_internal, two of which are rather useless (2 x i64, 4 x i32).
Introduction of v256 will add 4 more cases two of which will be useless
again. This sounds like too much code that serves no purpose to me.

Useless?  Surely you mean "used by hosts that don't implement v128".

I think one of us is very confused about how you intend to generate fallback code. Perhaps any future patchset revision should update tcg/README first.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]