2 * vxeh2_vcvt: vector-enhancements facility 2 vector convert *
11 static inline void vcfps(S390Vector
*v1
, S390Vector
*v2
,
12 const uint8_t m3
, const uint8_t m4
, const uint8_t m5
)
14 asm volatile("vcfps %[v1], %[v2], %[m3], %[m4], %[m5]\n"
22 static inline void vcfpl(S390Vector
*v1
, S390Vector
*v2
,
23 const uint8_t m3
, const uint8_t m4
, const uint8_t m5
)
25 asm volatile("vcfpl %[v1], %[v2], %[m3], %[m4], %[m5]\n"
33 static inline void vcsfp(S390Vector
*v1
, S390Vector
*v2
,
34 const uint8_t m3
, const uint8_t m4
, const uint8_t m5
)
36 asm volatile("vcsfp %[v1], %[v2], %[m3], %[m4], %[m5]\n"
44 static inline void vclfp(S390Vector
*v1
, S390Vector
*v2
,
45 const uint8_t m3
, const uint8_t m4
, const uint8_t m5
)
47 asm volatile("vclfp %[v1], %[v2], %[m3], %[m4], %[m5]\n"
55 int main(int argc
, char *argv
[])
58 S390Vector vs_i32
= { .w
[0] = 1, .w
[1] = 64, .w
[2] = 1024, .w
[3] = -10 };
59 S390Vector vs_u32
= { .w
[0] = 2, .w
[1] = 32, .w
[2] = 4096, .w
[3] = 8888 };
60 S390Vector vs_f32
= { .f
[0] = 3.987, .f
[1] = 5.123,
61 .f
[2] = 4.499, .f
[3] = 0.512 };
63 vd
.d
[0] = vd
.d
[1] = 0;
64 vcfps(&vd
, &vs_i32
, 2, M4_def
, 0);
65 if (1 != vd
.f
[0] || 1024 != vd
.f
[2] || 64 != vd
.f
[1] || -10 != vd
.f
[3]) {
69 vd
.d
[0] = vd
.d
[1] = 0;
70 vcfpl(&vd
, &vs_u32
, 2, M4_def
, 0);
71 if (2 != vd
.f
[0] || 4096 != vd
.f
[2] || 32 != vd
.f
[1] || 8888 != vd
.f
[3]) {
75 vd
.d
[0] = vd
.d
[1] = 0;
76 vcsfp(&vd
, &vs_f32
, 2, M4_def
, 0);
77 if (4 != vd
.w
[0] || 4 != vd
.w
[2] || 5 != vd
.w
[1] || 1 != vd
.w
[3]) {
81 vd
.d
[0] = vd
.d
[1] = 0;
82 vclfp(&vd
, &vs_f32
, 2, M4_def
, 0);
83 if (4 != vd
.w
[0] || 4 != vd
.w
[2] || 5 != vd
.w
[1] || 1 != vd
.w
[3]) {