|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH 07/18] tcg: add vector addition operations |
Date: | Tue, 17 Jan 2017 13:56:01 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
On 01/17/2017 01:07 AM, Kirill Batuzov wrote:
+/***************************************/ +/* 64-bit and 128-bit vector arithmetic. */ + +static inline void *tcg_v128_swap_slot(int n) +{ + return &tcg_ctx.v128_swap[n * 16]; +} + +/* Find a memory location for 128-bit TCG variable. */ +static inline void tcg_v128_to_ptr(TCGv_v128 tmp, TCGv_ptr base, int slot, + TCGv_ptr *real_base, intptr_t *real_offset, + int is_read)
None of this needs to be inline in tcg-op.h. All of it should be out-of-line in tcg-op.c.
@@ -750,6 +778,7 @@ struct TCGContext { void *code_gen_buffer; size_t code_gen_buffer_size; void *code_gen_ptr; + uint8_t v128_swap[16 * 3];
This is not thread-safe. Shouldn't use space in TCGContext; should use space on stack.Since there is no function call that is live, you can re-use the space for on-stack arguments. There is TCG_STATIC_CALL_ARGS_SIZE (128) bytes allocated for that. Which should be more than enough.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |