summaryrefslogtreecommitdiff
path: root/bits.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2010-11-11 11:21:40 +0100
committerTobias Klauser <tklauser@distanz.ch>2010-11-11 11:21:40 +0100
commite0330d9534d8cfeffff81f426df1d3277702b835 (patch)
treeba90c33bf555a4921a1279105beb54e9a9064ce5 /bits.h
parent556c8e0600546b4edf49d6a70adb5b831cd4e25a (diff)
Implement basic instruction handling
Diffstat (limited to 'bits.h')
-rw-r--r--bits.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/bits.h b/bits.h
new file mode 100644
index 0000000..8374527
--- /dev/null
+++ b/bits.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2010 Tobias Klauser <tklauser@distanz.ch>
+ *
+ * This file is part of nios2sim-ng.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#ifndef _BITS_H_
+#define _BITS_H_
+
+#define BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL << (n))-1))
+
+#endif /* _BITS_H_ */