rts: Allow profile output path to be specified on RTS command line
[ghc.git] / includes / rts / Bytecodes.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 1998-2009
4 *
5 * Bytecode definitions.
6 *
7 * ---------------------------------------------------------------------------*/
8
9 /* --------------------------------------------------------------------------
10 * Instructions
11 *
12 * Notes:
13 * o CASEFAIL is generated by the compiler whenever it tests an "irrefutable"
14 * pattern which fails. If we don't see too many of these, we could
15 * optimise out the redundant test.
16 * ------------------------------------------------------------------------*/
17
18 /* NOTE:
19
20 THIS FILE IS INCLUDED IN HASKELL SOURCES (ghc/compiler/ghci/ByteCodeAsm.hs).
21 DO NOT PUT C-SPECIFIC STUFF IN HERE!
22
23 I hope that's clear :-)
24 */
25
26 #define bci_STKCHECK 1
27 #define bci_PUSH_L 2
28 #define bci_PUSH_LL 3
29 #define bci_PUSH_LLL 4
30 #define bci_PUSH_G 5
31 #define bci_PUSH_ALTS 6
32 #define bci_PUSH_ALTS_P 7
33 #define bci_PUSH_ALTS_N 8
34 #define bci_PUSH_ALTS_F 9
35 #define bci_PUSH_ALTS_D 10
36 #define bci_PUSH_ALTS_L 11
37 #define bci_PUSH_ALTS_V 12
38 #define bci_PUSH_UBX 13
39 #define bci_PUSH_APPLY_N 14
40 #define bci_PUSH_APPLY_F 15
41 #define bci_PUSH_APPLY_D 16
42 #define bci_PUSH_APPLY_L 17
43 #define bci_PUSH_APPLY_V 18
44 #define bci_PUSH_APPLY_P 19
45 #define bci_PUSH_APPLY_PP 20
46 #define bci_PUSH_APPLY_PPP 21
47 #define bci_PUSH_APPLY_PPPP 22
48 #define bci_PUSH_APPLY_PPPPP 23
49 #define bci_PUSH_APPLY_PPPPPP 24
50 /* #define bci_PUSH_APPLY_PPPPPPP 25 */
51 #define bci_SLIDE 26
52 #define bci_ALLOC_AP 27
53 #define bci_ALLOC_AP_NOUPD 28
54 #define bci_ALLOC_PAP 29
55 #define bci_MKAP 30
56 #define bci_MKPAP 31
57 #define bci_UNPACK 32
58 #define bci_PACK 33
59 #define bci_TESTLT_I 34
60 #define bci_TESTEQ_I 35
61 #define bci_TESTLT_F 36
62 #define bci_TESTEQ_F 37
63 #define bci_TESTLT_D 38
64 #define bci_TESTEQ_D 39
65 #define bci_TESTLT_P 40
66 #define bci_TESTEQ_P 41
67 #define bci_CASEFAIL 42
68 #define bci_JMP 43
69 #define bci_CCALL 44
70 #define bci_SWIZZLE 45
71 #define bci_ENTER 46
72 #define bci_RETURN 47
73 #define bci_RETURN_P 48
74 #define bci_RETURN_N 49
75 #define bci_RETURN_F 50
76 #define bci_RETURN_D 51
77 #define bci_RETURN_L 52
78 #define bci_RETURN_V 53
79 #define bci_BRK_FUN 54
80 #define bci_TESTLT_W 55
81 #define bci_TESTEQ_W 56
82 /* If you need to go past 255 then you will run into the flags */
83
84 /* If you need to go below 0x0100 then you will run into the instructions */
85 #define bci_FLAG_LARGE_ARGS 0x8000
86
87 /* If a BCO definitely requires less than this many words of stack,
88 don't include an explicit STKCHECK insn in it. The interpreter
89 will check for this many words of stack before running each BCO,
90 rendering an explicit check unnecessary in the majority of
91 cases. */
92 #define INTERP_STACK_CHECK_THRESH 50
93
94 /*-------------------------------------------------------------------------*/