Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / docs / ir-desc
1 Mono Intermediate Representation Documentation
2
3 Operation: OP_ADDCC_IMM
4
5         Add immediate that will set the carry flag.  
6
7         dreg:
8                 Destination register
9         inst_imm
10                 Immediate value to add.
11         sreg1:
12                 Source register to add.
13
14 Operation: OP_CALL_HANDLER.
15
16         cil_code: 
17                 Points to the CIL where the LEAVE or LEAVE_S
18                 instruction was found.
19
20         inst_target_bb:
21                 The target basic block for this invocation.
22
23         This instruction must call the target basic block.
24         
25 Operation: OP_CISINST
26
27         Implements the CEE_MONO_CISINST opcode that is decoded from
28         the CIL stream.
29
30         This opcode takes as input an object reference and a class,
31         and leaves on the assigned register:
32
33                 0. if the object is an instance of the class,
34                 1. if the object is not instance of the class,
35                 2. if the object is a proxy whose type cannot be determined.
36
37 Operation: OP_CCASTCLASS
38
39         Implements the CEE_MONO_CCASTCLASS opcode that is decoded from
40         the CIL stream.
41
42         This opcode takes as input an object reference and a class,
43         and leaves on the assigned register:
44
45                 0. if the object is an instance of the class,
46                 1. if the object is a proxy whose type cannot be determined
47
48                 throws an InvalidCastException exception otherwise.
49
50 Operation: OP_LOCALLOC
51         inst_left:
52                 The value 
53                                 ins->inst_left = *sp;
54                                 ins->cil_code = ip;
55
56         This is the equivalent of alloca() in a C implementation: it
57         allocates a bunch of bytes on the stack dynamically. Local
58         variables are allocated statically in the stack instead.
59         
60         It is implemented by moving the stack pointer according to the
61         platform ABI: you may need to keep a specific frame register
62         to address local variables when LOCALLOC is used (the PPC code
63         does this, for example: ifyou're doing the s390 port I suggest
64         starting from that)
65
66 Operation: OP_SUBCC_IMM
67
68         Substract immediate that will set the borrow flag.
69
70         dreg:
71                 Destination register
72         inst_imm
73                 Immediate value to add.
74         sreg1:
75                 Source register to add.