|
From: | Rajalakshmi Srinivasaraghavan |
Subject: | Re: [Qemu-ppc] [PATCH v2 1/5] target-ppc: add vector insert instructions |
Date: | Wed, 10 Aug 2016 09:35:40 +0530 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 |
On 08/09/2016 11:50 PM, Richard Henderson wrote:
On 08/09/2016 03:42 PM, Rajalakshmi Srinivasaraghavan wrote:+ for (i = 0; i < ARRAY_SIZE(r->element); i++) { \ + result.element[i] = r->element[i]; \+ } \memcpy, or assignment.+ for (i = 0; i < sizeof(r->element[0]); i++) { \ + result.u8[SPLAT(element) + i] = b->u8[s + i]; \+ } \Also memcpy.
Do you mean memcpy is preferred here?
David pointed not to use SPLAT_ELEMENT which I have corrected in the last patch.(v2)I think your mistake is in your definition of SPLAT, as pointed out by David(?) elsewhere. Any conditional should take place at translate time.
If an exception isn't legal for halfword splat=15, then forcing splat=14 (or 0, or...) would be legal, since splat=15 is undefined.
Yes. I have done the same here. #define SPLAT(element) \((splat > (16 - sizeof(r->element[0]))) ? 16 - sizeof(r->element[0]) : splat)
r~
-- Thanks Rajalakshmi S
[Prev in Thread] | Current Thread | [Next in Thread] |