simd128: inline _mm_set_ps

This commit is contained in:
myfreeer
2023-03-19 11:56:59 +08:00
parent 03c7bee863
commit be76d96e8f
4 changed files with 5 additions and 12 deletions

View File

@@ -153,7 +153,7 @@ glm_mat4_det_wasm(mat4 mat) {
_mm_shuffle_ps(x0, x1, _MM_SHUFFLE(2, 2, 3, 1)),
x2);
x2 = wasm_v128_xor(x2, _mm_set_ps(-0.f, 0.f, -0.f, 0.f));
x2 = wasm_v128_xor(x2, wasm_f32x4_const(0.f, -0.f, 0.f, -0.f));
return glmm_hadd(wasm_f32x4_mul(x2, r0));
}
@@ -166,7 +166,7 @@ glm_mat4_inv_fast_wasm(mat4 mat, mat4 dest) {
t0, t1, t2, t3, t4, t5,
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9;
x8 = wasm_f32x4_make(-0.f, 0.f, -0.f, 0.f);
x8 = wasm_f32x4_const(-0.f, 0.f, -0.f, 0.f);
x9 = glmm_shuff1(x8, 2, 1, 2, 1);
/* 127 <- 0 */
@@ -302,7 +302,7 @@ glm_mat4_inv_wasm(mat4 mat, mat4 dest) {
t0, t1, t2, t3, t4, t5,
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9;
x8 = _mm_set_ps(-0.f, 0.f, -0.f, 0.f);
x8 = wasm_f32x4_const(0.f, -0.f, 0.f, -0.f);
x9 = glmm_shuff1(x8, 2, 1, 2, 1);
/* 127 <- 0 */