diff options
author | Hongliang Wang <wanghongliang@loongson.cn> | 2024-02-26 16:04:26 +0800 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2024-02-26 15:22:58 -0500 |
commit | ec325b3828772b5b75ea90f8544f5548c80ff087 (patch) | |
tree | e2d417689fff065d167c7ba175a2dbfe7f1292be /arch | |
parent | f2c9350543c5cd51a43288248370a41784d89e55 (diff) | |
download | musl-ec325b3828772b5b75ea90f8544f5548c80ff087.tar.gz musl-ec325b3828772b5b75ea90f8544f5548c80ff087.tar.xz musl-ec325b3828772b5b75ea90f8544f5548c80ff087.zip |
add loongarch64 user.h structs; adjust elf_fpreg_t and ELF_NFPREG
user_regs_struct and user_fp_struct were missing from the initial commit of the port. the union type for elf_fpreg_t and the new value of ELF_NFPREG are made consistent with glibc.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/loongarch64/bits/user.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/arch/loongarch64/bits/user.h b/arch/loongarch64/bits/user.h index 5a71d132..fd9b7b22 100644 --- a/arch/loongarch64/bits/user.h +++ b/arch/loongarch64/bits/user.h @@ -1,5 +1,24 @@ #define ELF_NGREG 45 -#define ELF_NFPREG 33 +#define ELF_NFPREG 34 + +struct user_regs_struct { + unsigned long regs[32]; + unsigned long orig_a0; + unsigned long csr_era; + unsigned long csr_badv; + unsigned long reserved[10]; +}; + +struct user_fp_struct { + unsigned long fpr[32]; + unsigned long fcc; + unsigned int fcsr; +}; typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; -typedef double elf_fpreg_t, elf_fpregset_t[ELF_NFPREG]; + +typedef union { + double d; + float f; +} elf_fpreg_t; +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; |