summaryrefslogtreecommitdiff
path: root/lib_nios2/math.h
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-10-10 21:27:30 +0000
committerwdenk <wdenk>2004-10-10 21:27:30 +0000
commit5c952cf0245421feb4644f2e71487c0b2e1dbd13 (patch)
tree47b80e839d339fe11dabd01ec8c89b46b791f797 /lib_nios2/math.h
parent03f5c55021c2d6297e66cc11bfea75f149a5d71c (diff)
Patches by Scott McNutt, 24 Aug 2004:
- Add support for Altera Nios-II processors. - Add support for Psyent PCI-5441 board. - Add support for Psyent PK1C20 board.
Diffstat (limited to 'lib_nios2/math.h')
-rw-r--r--lib_nios2/math.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib_nios2/math.h b/lib_nios2/math.h
new file mode 100644
index 00000000000..ccffbbc2e70
--- /dev/null
+++ b/lib_nios2/math.h
@@ -0,0 +1,16 @@
+#define BITS_PER_UNIT 8
+
+typedef int HItype __attribute__ ((mode (HI)));
+typedef unsigned int UHItype __attribute__ ((mode (HI)));
+
+typedef int SItype __attribute__ ((mode (SI)));
+typedef unsigned int USItype __attribute__ ((mode (SI)));
+
+typedef int word_type __attribute__ ((mode (__word__)));
+
+struct SIstruct {HItype low, high;};
+
+typedef union {
+ struct SIstruct s;
+ SItype ll;
+} SIunion;