1 (***********************************************************************)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
7 (* Copyright 1996 Institut National de Recherche en Informatique et *)
8 (* en Automatique. All rights reserved. This file is distributed *)
9 (* under the terms of the Q Public License version 1.0. *)
11 (***********************************************************************)
15 (* Representation of machine code by sequences of pseudoinstructions *)
17 type integer_comparison
=
18 Isigned
of Cmm.comparison
19 | Iunsigned
of Cmm.comparison
21 type integer_operation
=
22 Iadd
| Isub
| Imul
| Idiv
| Imod
23 | Iand
| Ior
| Ixor
| Ilsl
| Ilsr
| Iasr
24 | Icomp
of integer_comparison
30 | Iinttest
of integer_comparison
31 | Iinttest_imm
of integer_comparison
* int
32 | Ifloattest
of Cmm.comparison
* bool
40 | Iconst_int
of nativeint
41 | Iconst_float
of string
42 | Iconst_symbol
of string
46 | Itailcall_imm
of string
47 | Iextcall
of string * bool
49 | Iload
of Cmm.memory_chunk
* Arch.addressing_mode
50 | Istore
of Cmm.memory_chunk
* Arch.addressing_mode
52 | Iintop
of integer_operation
53 | Iintop_imm
of integer_operation
* int
54 | Inegf
| Iabsf
| Iaddf
| Isubf
| Imulf
| Idivf
55 | Ifloatofint
| Iintoffloat
56 | Ispecific
of Arch.specific_operation
59 { desc
: instruction_desc
;
64 mutable live
: Reg.Set.t
}
66 and instruction_desc
=
70 | Iifthenelse
of test
* instruction
* instruction
71 | Iswitch
of int array
* instruction array
72 | Iloop
of instruction
73 | Icatch
of int * instruction
* instruction
75 | Itrywith
of instruction
* instruction
80 fun_args
: Reg.t array
;
81 fun_body
: instruction
;
84 val dummy_instr
: instruction
85 val end_instr
: unit -> instruction
87 instruction_desc
-> Reg.t array
-> Reg.t array
-> instruction
->
90 instruction_desc
-> Reg.t array
-> Reg.t array
-> Debuginfo.t
->
91 instruction
-> instruction
92 val instr_iter
: (instruction
-> unit) -> instruction
-> unit