Revision 1dd9ffb9 target-ppc/op_helper.c

b/target-ppc/op_helper.c
2195 2195
#else
2196 2196
#define PKBIG 0
2197 2197
#endif
2198
void helper_vpkpx (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
2199
{
2200
    int i, j;
2201
    ppc_avr_t result;
2202
#if defined(WORDS_BIGENDIAN)
2203
    const ppc_avr_t *x[2] = { a, b };
2204
#else
2205
    const ppc_avr_t *x[2] = { b, a };
2206
#endif
2207

  
2208
    VECTOR_FOR_INORDER_I (i, u64) {
2209
        VECTOR_FOR_INORDER_I (j, u32){
2210
            uint32_t e = x[i]->u32[j];
2211
            result.u16[4*i+j] = (((e >> 9) & 0xfc00) |
2212
                                 ((e >> 6) & 0x3e0) |
2213
                                 ((e >> 3) & 0x1f));
2214
        }
2215
    }
2216
    *r = result;
2217
}
2218

  
2198 2219
#define VPK(suffix, from, to, cvt, dosat)       \
2199 2220
    void helper_vpk##suffix (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)  \
2200 2221
    {                                                                   \

Also available in: Unified diff