@@ -14024,49 +14024,71 @@ static __inline__ void __ATTRS_o_ai vec_stvrxl(vector float __a, int __b,
14024
14024
static __inline__ vector signed char __ATTRS_o_ai vec_promote(signed char __a,
14025
14025
int __b) {
14026
14026
vector signed char __res = (vector signed char)(0);
14027
- __res[__b] = __a;
14027
+ __res[__b & 0x7 ] = __a;
14028
14028
return __res;
14029
14029
}
14030
14030
14031
14031
static __inline__ vector unsigned char __ATTRS_o_ai
14032
14032
vec_promote(unsigned char __a, int __b) {
14033
14033
vector unsigned char __res = (vector unsigned char)(0);
14034
- __res[__b] = __a;
14034
+ __res[__b & 0x7 ] = __a;
14035
14035
return __res;
14036
14036
}
14037
14037
14038
14038
static __inline__ vector short __ATTRS_o_ai vec_promote(short __a, int __b) {
14039
14039
vector short __res = (vector short)(0);
14040
- __res[__b] = __a;
14040
+ __res[__b & 0x7 ] = __a;
14041
14041
return __res;
14042
14042
}
14043
14043
14044
14044
static __inline__ vector unsigned short __ATTRS_o_ai
14045
14045
vec_promote(unsigned short __a, int __b) {
14046
14046
vector unsigned short __res = (vector unsigned short)(0);
14047
- __res[__b] = __a;
14047
+ __res[__b & 0x7 ] = __a;
14048
14048
return __res;
14049
14049
}
14050
14050
14051
14051
static __inline__ vector int __ATTRS_o_ai vec_promote(int __a, int __b) {
14052
14052
vector int __res = (vector int)(0);
14053
- __res[__b] = __a;
14053
+ __res[__b & 0x3 ] = __a;
14054
14054
return __res;
14055
14055
}
14056
14056
14057
14057
static __inline__ vector unsigned int __ATTRS_o_ai vec_promote(unsigned int __a,
14058
14058
int __b) {
14059
14059
vector unsigned int __res = (vector unsigned int)(0);
14060
- __res[__b] = __a;
14060
+ __res[__b & 0x3 ] = __a;
14061
14061
return __res;
14062
14062
}
14063
14063
14064
14064
static __inline__ vector float __ATTRS_o_ai vec_promote(float __a, int __b) {
14065
14065
vector float __res = (vector float)(0);
14066
- __res[__b] = __a;
14066
+ __res[__b & 0x3 ] = __a;
14067
14067
return __res;
14068
14068
}
14069
14069
14070
+ #ifdef __VSX__
14071
+ static __inline__ vector double __ATTRS_o_ai vec_promote(double __a, int __b) {
14072
+ vector double __res = (vector double)(0);
14073
+ __res[__b & 0x1] = __a;
14074
+ return __res;
14075
+ }
14076
+
14077
+ static __inline__ vector signed long long __ATTRS_o_ai
14078
+ vec_promote(signed long long __a, int __b) {
14079
+ vector signed long long __res = (vector signed long long)(0);
14080
+ __res[__b & 0x1] = __a;
14081
+ return __res;
14082
+ }
14083
+
14084
+ static __inline__ vector unsigned long long __ATTRS_o_ai
14085
+ vec_promote(unsigned long long __a, int __b) {
14086
+ vector unsigned long long __res = (vector unsigned long long)(0);
14087
+ __res[__b & 0x1] = __a;
14088
+ return __res;
14089
+ }
14090
+ #endif
14091
+
14070
14092
/* vec_splats */
14071
14093
14072
14094
static __inline__ vector signed char __ATTRS_o_ai vec_splats(signed char __a) {
0 commit comments