This commit was manufactured by cvs2svn to create branch 'mono-1-0'.
[mono.git] / docs / ir-desc
1 Mono Intermediate Representation Documentation
2
3 Operation: OP_LOCALLOC
4         inst_left:
5                 The value 
6                                 ins->inst_left = *sp;
7                                 ins->cil_code = ip;
8
9         This is the equivalent of alloca() in a C implementation: it
10         allocates a bunch of bytes on the stack dynamically. Local
11         variables are allocated statically in the stack instead.
12         
13         It is implemented by moving the stack pointer according to the
14         platform ABI: you may need to keep a specific frame register
15         to address local variables when LOCALLOC is used (the PPC code
16         does this, for example: ifyou're doing the s390 port I suggest
17         starting from that)
18
19 Operation: OP_CALL_HANDLER.
20
21         cil_code: 
22                 Points to the CIL where the LEAVE or LEAVE_S
23                 instruction was found.
24
25         inst_target_bb:
26                 The target basic block for this invocation.
27
28         This instruction must call the target basic block.
29         
30 Operation: OP_CISINST
31
32         Implements the CEE_MONO_CISINST opcode that is decoded from
33         the CIL stream.
34
35         This opcode takes as input an object reference and a class,
36         and leaves on the assigned register:
37
38                 0. if the object is an instance of the class,
39                 1. if the object is not instance of the class,
40                 2. if the object is a proxy whose type cannot be determined.
41
42 Operation: OP_CCASTCLASS
43
44         Implements the CEE_MONO_CCASTCLASS opcode that is decoded from
45         the CIL stream.
46
47         This opcode takes as input an object reference and a class,
48         and leaves on the assigned register:
49
50                 0. if the object is an instance of the class,
51                 1. if the object is a proxy whose type cannot be determined
52
53                 throws an InvalidCastException exception otherwise.
54