summaryrefslogtreecommitdiff
path: root/arch/loongarch64/bits/user.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/loongarch64/bits/user.h')
-rw-r--r--arch/loongarch64/bits/user.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/loongarch64/bits/user.h b/arch/loongarch64/bits/user.h
new file mode 100644
index 00000000..e4aee0d3
--- /dev/null
+++ b/arch/loongarch64/bits/user.h
@@ -0,0 +1,38 @@
+#define ELF_NGREG 45
+#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 union {
+ double d;
+ float f;
+} elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
+typedef union
+{
+ __attribute__((__aligned__(16)))
+ double d[2];
+ float f[4];
+} elf_lsxregset_t[32];
+
+typedef union
+{
+ __attribute__((__aligned__(32)))
+ double d[4];
+ float f[8];
+} elf_lasxregset_t[32];