mirror of git://git.musl-libc.org/musl
fix vector types in aarch64 register file structures
the ABI type for the vector registers in fpregset_t, struct fpsimd_context, and struct user_fpsimd_struct is __uint128_t, which was presumably originally not used because it's a nonstandard type, but its existence is mandated by the aarch64 psABI. use of the wrong type here broke software using these structures, and encouraged incorrect fixes with casts rather than reinterpretation of representation.
This commit is contained in:
parent
d91a6cf6e3
commit
4ffa706899
|
@ -11,7 +11,7 @@ typedef unsigned long greg_t;
|
||||||
typedef unsigned long gregset_t[34];
|
typedef unsigned long gregset_t[34];
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
long double vregs[32];
|
__uint128_t vregs[32];
|
||||||
unsigned int fpsr;
|
unsigned int fpsr;
|
||||||
unsigned int fpcr;
|
unsigned int fpcr;
|
||||||
} fpregset_t;
|
} fpregset_t;
|
||||||
|
@ -34,7 +34,7 @@ struct fpsimd_context {
|
||||||
struct _aarch64_ctx head;
|
struct _aarch64_ctx head;
|
||||||
unsigned int fpsr;
|
unsigned int fpsr;
|
||||||
unsigned int fpcr;
|
unsigned int fpcr;
|
||||||
long double vregs[32];
|
__uint128_t vregs[32];
|
||||||
};
|
};
|
||||||
struct esr_context {
|
struct esr_context {
|
||||||
struct _aarch64_ctx head;
|
struct _aarch64_ctx head;
|
||||||
|
|
|
@ -6,7 +6,7 @@ struct user_regs_struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct user_fpsimd_struct {
|
struct user_fpsimd_struct {
|
||||||
long double vregs[32];
|
__uint128_t vregs[32];
|
||||||
unsigned int fpsr;
|
unsigned int fpsr;
|
||||||
unsigned int fpcr;
|
unsigned int fpcr;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue