aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/machine/riscv/xlenint.h
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/machine/riscv/xlenint.h')
-rw-r--r--newlib/libc/machine/riscv/xlenint.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/newlib/libc/machine/riscv/xlenint.h b/newlib/libc/machine/riscv/xlenint.h
new file mode 100644
index 0000000..86363a8
--- /dev/null
+++ b/newlib/libc/machine/riscv/xlenint.h
@@ -0,0 +1,14 @@
+#ifndef _XLENINT_H
+#define _XLENINT_H
+
+#include <stdint.h>
+
+#if __riscv_xlen == 64
+typedef uint64_t uintxlen_t;
+#elif __riscv_xlen == 32
+typedef uint32_t uintxlen_t;
+#else
+# error __riscv_xlen must equal 32 or 64
+#endif
+
+#endif /* _XLENINT_H */