Skip to content

Commit b0b7b43

Browse files
committed
s390/vx: add 64 and 128 bit members to __vector128 struct
Add 64 and 128 bit members to __vector128 struct in order to allow reading of the complete value, or the higher or lower part of vector register contents instead of having to use casts. Add an explicit __aligned(4) statement to avoid that the alignment of the structure changes from 4 to 8. This should make sure that no breakage happens because of this change. Reviewed-by: Alexander Gordeev <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent 1306711 commit b0b7b43

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

arch/s390/include/uapi/asm/types.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,15 @@ typedef unsigned long addr_t;
1919
typedef __signed__ long saddr_t;
2020

2121
typedef struct {
22-
__u32 u[4];
23-
} __vector128;
22+
union {
23+
struct {
24+
__u64 high;
25+
__u64 low;
26+
};
27+
__uint128_t v;
28+
__u32 u[4];
29+
};
30+
} __attribute__((packed, aligned(4))) __vector128;
2431

2532
#endif /* __ASSEMBLY__ */
2633

0 commit comments

Comments
 (0)