|
| From: | Richard Henderson |
| Subject: | Re: [Qemu-ppc] [PATCH 6/6] target-ppc: add stxvb16x and stxvh8x |
| Date: | Mon, 8 Aug 2016 10:57:49 +0530 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 08/07/2016 11:06 PM, Nikunj A Dadhania wrote:
+#define STXV(name, access, swap, type, elems) \
+void helper_##name(CPUPPCState *env, uint64_t vsr, \
+ target_ulong addr) \
+{ \
+ type *r; \
+ int i, index, bound, step; \
+ if (msr_le) { \
+ index = elems - 1; \
+ bound = -1; \
+ step = -1; \
+ } else { \
+ index = 0; \
+ bound = elems; \
+ step = 1; \
+ } \
+ r = (type *) &vsr; \
+ for (i = index; i != bound; i += step) { \
+ if (needs_byteswap(env)) { \
+ access(env, addr, swap(r[i]), GETPC()); \
+ } else { \
+ access(env, addr, r[i], GETPC()); \
+ } \
+ addr = addr_add(env, addr, sizeof(type)); \
+ } \
+}
Similarly, with the same helpers as for load. r~
| [Prev in Thread] | Current Thread | [Next in Thread] |