static vector float appbones (State *s, struct skin *skin, vector float x, vector float y, vector float z, vector float nx, vector float ny, vector float nz, vector float *np) { int j; int num_bones; int bone_index; struct abone *b; vector float vz = (vector float) vec_splat_u32 (0); vector float v, w, n; vector unsigned char S = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4<<3}; v = n = vz; w = vec_ld (0, skin->weights); num_bones = skin->boneinfo & 3; bone_index = skin->boneinfo >> 2; for (j = 0; j < num_bones; ++j) { vector float t0, t1, t2, t3, t4, t5, r0, r1, r2, r3, vw; b = &s->abones[bone_index & 0x3ff]; bone_index >>= 10; vw = vec_splat (w, 0); w = vec_slo (w, S); r0 = vec_ld ( 0, b->cm); r1 = vec_ld (16, b->cm); r2 = vec_ld (32, b->cm); r3 = vec_ld (48, b->cm); t0 = vec_madd (r0, x, r3); t1 = vec_madd (r1, y, t0); t2 = vec_madd (r2, z, t1); v = vec_madd (t2, vw, v); t3 = vec_madd (r0, nx, vz); t4 = vec_madd (r1, ny, t3); t5 = vec_madd (r2, nz, t4); n = vec_madd (t5, vw, n); } *np = n; return v; }
vector unsigned long long test_slo_vull_slo_vull_vuc (vector unsigned long long x, vector unsigned char y) { return vec_slo (x, y); }
vector signed long long test_slo_vsll_slo_vsll_vsc (vector signed long long x, vector signed char y) { return vec_slo (x, y); }