@@ -28,6 +28,88 @@ interp_v128_i4_all_bits_set (gpointer res)
28
28
memset (res , 0xff , SIZEOF_V128 );
29
29
}
30
30
31
+ // Vector2 AsVector2(Vector128<float> v1)
32
+ static void
33
+ interp_v128_as_v2 (gpointer res , gpointer v1 )
34
+ {
35
+ float * res_typed = (float * )res ;
36
+ float * v1_typed = (float * )v1 ;
37
+
38
+ res_typed [0 ] = v1_typed [0 ];
39
+ res_typed [1 ] = v1_typed [1 ];
40
+ }
41
+
42
+ // Vector3 AsVector3(Vector128<float> v1)
43
+ static void
44
+ interp_v128_as_v3 (gpointer res , gpointer v1 )
45
+ {
46
+ float * res_typed = (float * )res ;
47
+ float * v1_typed = (float * )v1 ;
48
+
49
+ res_typed [0 ] = v1_typed [0 ];
50
+ res_typed [1 ] = v1_typed [1 ];
51
+ res_typed [2 ] = v1_typed [2 ];
52
+ }
53
+
54
+ // Vector128<TTo> As<TFrom, TTo>(Vector128<TFrom> v1)
55
+ static void
56
+ interp_v128_bitcast (gpointer res , gpointer v1 )
57
+ {
58
+ * (v128_i1 * )res = * (v128_i1 * )v1 ;
59
+ }
60
+
61
+ // Vector128<float> AsVector128(Vector2 v1)
62
+ static void
63
+ interp_v128_from_v2 (gpointer res , gpointer v1 )
64
+ {
65
+ float * res_typed = (float * )res ;
66
+ float * v1_typed = (float * )v1 ;
67
+
68
+ res_typed [0 ] = v1_typed [0 ];
69
+ res_typed [1 ] = v1_typed [1 ];
70
+ res_typed [2 ] = 0 ;
71
+ res_typed [3 ] = 0 ;
72
+ }
73
+
74
+ // Vector128<float> AsVector128Unsafe(Vector2 v1)
75
+ static void
76
+ interp_v128_from_v2_unsafe (gpointer res , gpointer v1 )
77
+ {
78
+ float * res_typed = (float * )res ;
79
+ float * v1_typed = (float * )v1 ;
80
+
81
+ res_typed [0 ] = v1_typed [0 ];
82
+ res_typed [1 ] = v1_typed [1 ];
83
+ res_typed [2 ] = 0 ;
84
+ res_typed [3 ] = 0 ;
85
+ }
86
+
87
+ // Vector128<float> AsVector128(Vector3 v1)
88
+ static void
89
+ interp_v128_from_v3 (gpointer res , gpointer v1 )
90
+ {
91
+ float * res_typed = (float * )res ;
92
+ float * v1_typed = (float * )v1 ;
93
+
94
+ res_typed [0 ] = v1_typed [0 ];
95
+ res_typed [1 ] = v1_typed [1 ];
96
+ res_typed [2 ] = v1_typed [2 ];
97
+ res_typed [3 ] = 0 ;
98
+ }
99
+
100
+ // Vector128<float> AsVector128Unsafe(Vector3 v1)
101
+ static void
102
+ interp_v128_from_v3_unsafe (gpointer res , gpointer v1 )
103
+ {
104
+ float * res_typed = (float * )res ;
105
+ float * v1_typed = (float * )v1 ;
106
+
107
+ res_typed [0 ] = v1_typed [0 ];
108
+ res_typed [1 ] = v1_typed [1 ];
109
+ res_typed [2 ] = v1_typed [2 ];
110
+ res_typed [3 ] = 0 ;
111
+ }
112
+
31
113
// op_Addition
32
114
static void
33
115
interp_v128_i1_op_addition (gpointer res , gpointer v1 , gpointer v2 )
0 commit comments