[project @ 2000-12-08 15:45:55 by sewardj]
[ghc-hetmet.git] / ghc / includes / Bytecodes.h
diff --git a/ghc/includes/Bytecodes.h b/ghc/includes/Bytecodes.h
new file mode 100644 (file)
index 0000000..fc44f26
--- /dev/null
@@ -0,0 +1,58 @@
+
+/* -----------------------------------------------------------------------------
+ * $Id: Bytecodes.h,v 1.2 2000/12/08 15:45:55 sewardj Exp $
+ *
+ * (c) The GHC Team, 1998-2000
+ *
+ * Bytecode definitions.
+ *
+ * ---------------------------------------------------------------------------*/
+
+/* --------------------------------------------------------------------------
+ * Instructions
+ *
+ * Notes:
+ * o CASEFAIL is generated by the compiler whenever it tests an "irrefutable"
+ *   pattern which fails.  If we don't see too many of these, we could
+ *   optimise out the redundant test.
+ * ------------------------------------------------------------------------*/
+
+/* NOTE:
+
+   THIS FILE IS INCLUDED IN HASKELL SOURCES (ghc/compiler/ghci/ByteCodeGen.lhs).
+   DO NOT PUT C-SPECIFIC STUFF IN HERE!
+
+   I hope that's clear :-)
+*/
+
+#define bci_ARGCHECK  1
+#define bci_PUSH_L    2
+#define bci_PUSH_LL   28
+#define bci_PUSH_LLL  29
+#define bci_PUSH_G    3
+#define bci_PUSH_AS   26
+#define bci_PUSHT_I   4
+#define bci_PUSHT_F   5
+#define bci_PUSHT_D   6
+#define bci_PUSHU_I   7
+#define bci_PUSHU_F   8
+#define bci_PUSHU_D   9
+#define bci_SLIDE     10
+#define bci_ALLOC     11
+#define bci_MKAP      12
+#define bci_UNPACK    13
+#define bci_PACK      14
+#define bci_LABEL     15
+#define bci_TESTLT_I  16 
+#define bci_TESTEQ_I  17
+#define bci_TESTLT_F  18
+#define bci_TESTEQ_F  19
+#define bci_TESTLT_D  20
+#define bci_TESTEQ_D  21
+#define bci_TESTLT_P  22
+#define bci_TESTEQ_P  23
+#define bci_CASEFAIL  24
+#define bci_ENTER     25
+#define bci_RETURN    27
+
+/*-------------------------------------------------------------------------*/