/usr/lib/ocaml/compiler-libs/x86_ast.mli is in ocaml-compiler-libs 4.05.0-10ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Fabrice Le Fessant, projet Gallium, INRIA Rocquencourt *)
(* *)
(* Copyright 2014 Institut National de Recherche en Informatique et *)
(* en Automatique. *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
(* the GNU Lesser General Public License version 2.1, with the *)
(* special exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)
(** Structured representation of Intel assembly language (32 and 64 bit). *)
type condition =
| L | GE (* signed comparisons: less/greater *)
| LE | G
| B | AE (* unsigned comparisons: below/above *)
| BE | A
| E | NE (* equal *)
| O | NO (* overflow *)
| S | NS (* sign *)
| P | NP (* parity *)
type rounding =
| RoundUp
| RoundDown
| RoundNearest
| RoundTruncate
type constant =
| Const of int64
| ConstThis
| ConstLabel of string
| ConstAdd of constant * constant
| ConstSub of constant * constant
(* data_type is used mainly on memory addressing to specify
the size of the addressed memory chunk. It is directly
used by the MASM emitter and indirectly by the GAS emitter
to infer the instruction suffix. *)
type data_type =
| NONE
| REAL4 | REAL8 (* floating point values *)
| BYTE | WORD | DWORD | QWORD | OWORD (* integer values *)
| NEAR | PROC
type reg64 =
| RAX | RBX | RCX | RDX | RSP | RBP | RSI | RDI
| R8 | R9 | R10 | R11 | R12 | R13 | R14 | R15
type reg8h =
| AH | BH | CH | DH
type registerf = XMM of int | TOS | ST of int
type arch = X64 | X86
type addr =
{
arch: arch;
typ: data_type;
idx: reg64;
scale: int;
base: reg64 option;
sym: string option;
displ: int;
}
(** Addressing modes:
displ + sym + base + idx * scale
(if scale = 0, idx is ignored and base must be None)
*)
type arg =
| Imm of int64
(** Operand is an immediate constant integer *)
| Sym of string
(** Address of a symbol (absolute address except for call/jmp target
where it is interpreted as a relative displacement *)
| Reg8L of reg64
| Reg8H of reg8h
| Reg16 of reg64
| Reg32 of reg64
| Reg64 of reg64
| Regf of registerf
| Mem of addr
| Mem64_RIP of data_type * string * int
type instruction =
| ADD of arg * arg
| ADDSD of arg * arg
| AND of arg * arg
| ANDPD of arg * arg
| BSWAP of arg
| CALL of arg
| CDQ
| CMOV of condition * arg * arg
| CMP of arg * arg
| COMISD of arg * arg
| CQO
| CVTSD2SI of arg * arg
| CVTSD2SS of arg * arg
| CVTSI2SD of arg * arg
| CVTSS2SD of arg * arg
| CVTTSD2SI of arg * arg
| DEC of arg
| DIVSD of arg * arg
| FABS
| FADD of arg
| FADDP of arg * arg
| FCHS
| FCOMP of arg
| FCOMPP
| FCOS
| FDIV of arg
| FDIVP of arg * arg
| FDIVR of arg
| FDIVRP of arg * arg
| FILD of arg
| FISTP of arg
| FLD of arg
| FLD1
| FLDCW of arg
| FLDLG2
| FLDLN2
| FLDZ
| FMUL of arg
| FMULP of arg * arg
| FNSTCW of arg
| FNSTSW of arg
| FPATAN
| FPTAN
| FSIN
| FSQRT
| FSTP of arg
| FSUB of arg
| FSUBP of arg * arg
| FSUBR of arg
| FSUBRP of arg * arg
| FXCH of arg
| FYL2X
| HLT
| IDIV of arg
| IMUL of arg * arg option
| INC of arg
| J of condition * arg
| JMP of arg
| LEA of arg * arg
| LEAVE
| MOV of arg * arg
| MOVAPD of arg * arg
| MOVLPD of arg * arg
| MOVSD of arg * arg
| MOVSS of arg * arg
| MOVSX of arg * arg
| MOVSXD of arg * arg
| MOVZX of arg * arg
| MULSD of arg * arg
| NEG of arg
| NOP
| OR of arg * arg
| POP of arg
| PUSH of arg
| RET
| ROUNDSD of rounding * arg * arg
| SAL of arg * arg
| SAR of arg * arg
| SET of condition * arg
| SHR of arg * arg
| SQRTSD of arg * arg
| SUB of arg * arg
| SUBSD of arg * arg
| TEST of arg * arg
| UCOMISD of arg * arg
| XCHG of arg * arg
| XOR of arg * arg
| XORPD of arg * arg
type asm_line =
| Ins of instruction
| Align of bool * int
| Byte of constant
| Bytes of string
| Comment of string
| Global of string
| Long of constant
| NewLabel of string * data_type
| Quad of constant
| Section of string list * string option * string list
| Space of int
| Word of constant
(* masm only (the gas emitter will fail on them) *)
| External of string * data_type
| Mode386
| Model of string
(* gas only (the masm emitter will fail on them) *)
| Cfi_adjust_cfa_offset of int
| Cfi_endproc
| Cfi_startproc
| File of int * string (* (file_num, file_name) *)
| Indirect_symbol of string
| Loc of int * int * int (* (file_num, line, col) *)
| Private_extern of string
| Set of string * constant
| Size of string * constant
| Type of string * string
type asm_program = asm_line list
|