aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2021-11-24 01:47:26 +0000
committerWarner Losh <imp@FreeBSD.org>2021-11-24 04:21:17 +0000
commitd2bf8c544adc4b080d3ab15d4f08f501b689d964 (patch)
tree83865ab826698a0b00434ab661d513de8e2c16b6
parent8ee8271e22975f77f8c147c81470b8eaee3bbab9 (diff)
downloadsrc-d2bf8c544adc4b080d3ab15d4f08f501b689d964.tar.gz
src-d2bf8c544adc4b080d3ab15d4f08f501b689d964.zip
riscv: Make machine/regs.h self-contained
Make sys/reg.h self-contained by making riscv's machine/reg.h self-contained. Sponsored by: Netflix
-rw-r--r--sys/riscv/include/reg.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/sys/riscv/include/reg.h b/sys/riscv/include/reg.h
index 003e696e30e3..d76b500bce1b 100644
--- a/sys/riscv/include/reg.h
+++ b/sys/riscv/include/reg.h
@@ -37,21 +37,23 @@
#ifndef _MACHINE_REG_H_
#define _MACHINE_REG_H_
+#include <sys/_types.h>
+
struct reg {
- uint64_t ra; /* return address */
- uint64_t sp; /* stack pointer */
- uint64_t gp; /* global pointer */
- uint64_t tp; /* thread pointer */
- uint64_t t[7]; /* temporaries */
- uint64_t s[12]; /* saved registers */
- uint64_t a[8]; /* function arguments */
- uint64_t sepc; /* exception program counter */
- uint64_t sstatus; /* status register */
+ __uint64_t ra; /* return address */
+ __uint64_t sp; /* stack pointer */
+ __uint64_t gp; /* global pointer */
+ __uint64_t tp; /* thread pointer */
+ __uint64_t t[7]; /* temporaries */
+ __uint64_t s[12]; /* saved registers */
+ __uint64_t a[8]; /* function arguments */
+ __uint64_t sepc; /* exception program counter */
+ __uint64_t sstatus; /* status register */
};
struct fpreg {
- uint64_t fp_x[32][2]; /* Floating point registers */
- uint64_t fp_fcsr; /* Floating point control reg */
+ __uint64_t fp_x[32][2]; /* Floating point registers */
+ __uint64_t fp_fcsr; /* Floating point control reg */
};
struct dbreg {