@@ -14647,67 +14647,86 @@ static __inline__ void __ATTRS_o_ai vec_stvrxl(vector float __a, int __b,
14647
14647
14648
14648
static __inline__ vector signed char __ATTRS_o_ai vec_promote(signed char __a,
14649
14649
int __b) {
14650
- vector signed char __res = (vector signed char)(0);
14650
+ const vector signed char __zero = (vector signed char)0;
14651
+ vector signed char __res =
14652
+ __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1,
14653
+ -1, -1, -1, -1, -1, -1, -1, -1);
14651
14654
__res[__b & 0xf] = __a;
14652
14655
return __res;
14653
14656
}
14654
14657
14655
14658
static __inline__ vector unsigned char __ATTRS_o_ai
14656
14659
vec_promote(unsigned char __a, int __b) {
14657
- vector unsigned char __res = (vector unsigned char)(0);
14660
+ const vector unsigned char __zero = (vector unsigned char)(0);
14661
+ vector unsigned char __res =
14662
+ __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1,
14663
+ -1, -1, -1, -1, -1, -1, -1, -1);
14658
14664
__res[__b & 0xf] = __a;
14659
14665
return __res;
14660
14666
}
14661
14667
14662
14668
static __inline__ vector short __ATTRS_o_ai vec_promote(short __a, int __b) {
14663
- vector short __res = (vector short)(0);
14669
+ const vector short __zero = (vector short)(0);
14670
+ vector short __res =
14671
+ __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1);
14664
14672
__res[__b & 0x7] = __a;
14665
14673
return __res;
14666
14674
}
14667
14675
14668
14676
static __inline__ vector unsigned short __ATTRS_o_ai
14669
14677
vec_promote(unsigned short __a, int __b) {
14670
- vector unsigned short __res = (vector unsigned short)(0);
14678
+ const vector unsigned short __zero = (vector unsigned short)(0);
14679
+ vector unsigned short __res =
14680
+ __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1);
14671
14681
__res[__b & 0x7] = __a;
14672
14682
return __res;
14673
14683
}
14674
14684
14675
14685
static __inline__ vector int __ATTRS_o_ai vec_promote(int __a, int __b) {
14676
- vector int __res = (vector int)(0);
14686
+ const vector int __zero = (vector int)(0);
14687
+ vector int __res = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14677
14688
__res[__b & 0x3] = __a;
14678
14689
return __res;
14679
14690
}
14680
14691
14681
14692
static __inline__ vector unsigned int __ATTRS_o_ai vec_promote(unsigned int __a,
14682
14693
int __b) {
14683
- vector unsigned int __res = (vector unsigned int)(0);
14694
+ const vector unsigned int __zero = (vector unsigned int)(0);
14695
+ vector unsigned int __res =
14696
+ __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14684
14697
__res[__b & 0x3] = __a;
14685
14698
return __res;
14686
14699
}
14687
14700
14688
14701
static __inline__ vector float __ATTRS_o_ai vec_promote(float __a, int __b) {
14689
- vector float __res = (vector float)(0);
14702
+ const vector float __zero = (vector float)(0);
14703
+ vector float __res = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14690
14704
__res[__b & 0x3] = __a;
14691
14705
return __res;
14692
14706
}
14693
14707
14694
14708
#ifdef __VSX__
14695
14709
static __inline__ vector double __ATTRS_o_ai vec_promote(double __a, int __b) {
14696
- vector double __res = (vector double)(0);
14710
+ const vector double __zero = (vector double)(0);
14711
+ vector double __res = __builtin_shufflevector(__zero, __zero, -1, -1);
14697
14712
__res[__b & 0x1] = __a;
14698
14713
return __res;
14699
14714
}
14700
14715
14701
14716
static __inline__ vector signed long long __ATTRS_o_ai
14702
14717
vec_promote(signed long long __a, int __b) {
14703
- vector signed long long __res = (vector signed long long)(0);
14718
+ const vector signed long long __zero = (vector signed long long)(0);
14719
+ vector signed long long __res =
14720
+ __builtin_shufflevector(__zero, __zero, -1, -1);
14704
14721
__res[__b & 0x1] = __a;
14705
14722
return __res;
14706
14723
}
14707
14724
14708
14725
static __inline__ vector unsigned long long __ATTRS_o_ai
14709
14726
vec_promote(unsigned long long __a, int __b) {
14710
- vector unsigned long long __res = (vector unsigned long long)(0);
14727
+ const vector unsigned long long __zero = (vector unsigned long long)(0);
14728
+ vector unsigned long long __res =
14729
+ __builtin_shufflevector(__zero, __zero, -1, -1);
14711
14730
__res[__b & 0x1] = __a;
14712
14731
return __res;
14713
14732
}
0 commit comments