From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1txV-0007Ol-Uv for qemu-devel@nongnu.org; Sat, 11 Jan 2014 03:30:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1txQ-0003HB-UP for qemu-devel@nongnu.org; Sat, 11 Jan 2014 03:30:21 -0500 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:60133 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1txQ-0003Gy-P4 for qemu-devel@nongnu.org; Sat, 11 Jan 2014 03:30:16 -0500 References: <1389373972-27686-1-git-send-email-peter.maydell@linaro.org> <1389373972-27686-7-git-send-email-peter.maydell@linaro.org> <52D04A0A.4010509@twiddle.net> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <52D04A0A.4010509@twiddle.net> Date: Sat, 11 Jan 2014 08:30:10 +0000 Message-ID: <87y52m2a5p.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 06/10] target-arm: A64: Add SIMD ZIP/UZP/TRN List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Peter Maydell , Laurent Desnogues , patches@linaro.org, Michael Matz , Alexander Graf , qemu-devel@nongnu.org, Claudio Fontana , Dirk Mueller , Will Newton , Alex =?utf-8?Q?Benn=C3=A9e?= , kvmarm@lists.cs.columbia.edu, Christoffer Dall rth@twiddle.net writes: > On 01/10/2014 09:12 AM, Peter Maydell wrote: >> + for (i = 0; i < elements; i++) { >> + switch (opcode) { >> + case 1: /* UZP1/2 */ >> + { >> + int midpoint = elements / 2; >> + if (i < midpoint) { >> + read_vec_element(s, tcg_res, rn, 2 * i + part, size); >> + } else { >> + read_vec_element(s, tcg_res, rm, >> + 2 * (i - midpoint) + part, size); >> + } >> + break; >> + } > > You're generating up to 16 * 3 + 2 = 50 opcodes here. I do wonder if it > wouldn't be better to implement these as helpers. But, What's the hit in terms of opcodes for calling a helper function? I would have thought you spend 10s of opcodes with messing around with stack frames and the like before you get to the helper. I was wondering if there is a demand for more SIMD like TCG opcodes but I suspect all the arches are subtly different enough to make it a pain to abstract. > > Reviewed-by: Richard Henderson > > > r~ -- Sent with my mu4e