1#![allow(bad_style)]
2use libc::*;
3
4pub const JIT_NATIVE_INT64: u32 = 1;
7pub const JIT_MEMORY_OK: u32 = 0;
8pub const JIT_MEMORY_RESTART: u32 = 1;
9pub const JIT_MEMORY_TOO_BIG: u32 = 2;
10pub const JIT_MEMORY_ERROR: u32 = 3;
11pub const JIT_OPTION_CACHE_LIMIT: u32 = 10000;
12pub const JIT_OPTION_CACHE_PAGE_SIZE: u32 = 10001;
13pub const JIT_OPTION_PRE_COMPILE: u32 = 10002;
14pub const JIT_OPTION_DONT_FOLD: u32 = 10003;
15pub const JIT_OPTION_POSITION_INDEPENDENT: u32 = 10004;
16pub const JIT_OPTION_CACHE_MAX_PAGE_FACTOR: u32 = 10005;
17pub const JIT_TYPE_INVALID: i32 = -1;
18pub const JIT_TYPE_VOID: u32 = 0;
19pub const JIT_TYPE_SBYTE: u32 = 1;
20pub const JIT_TYPE_UBYTE: u32 = 2;
21pub const JIT_TYPE_SHORT: u32 = 3;
22pub const JIT_TYPE_USHORT: u32 = 4;
23pub const JIT_TYPE_INT: u32 = 5;
24pub const JIT_TYPE_UINT: u32 = 6;
25pub const JIT_TYPE_NINT: u32 = 7;
26pub const JIT_TYPE_NUINT: u32 = 8;
27pub const JIT_TYPE_LONG: u32 = 9;
28pub const JIT_TYPE_ULONG: u32 = 10;
29pub const JIT_TYPE_FLOAT32: u32 = 11;
30pub const JIT_TYPE_FLOAT64: u32 = 12;
31pub const JIT_TYPE_NFLOAT: u32 = 13;
32pub const JIT_TYPE_MAX_PRIMITIVE: u32 = 13;
33pub const JIT_TYPE_STRUCT: u32 = 14;
34pub const JIT_TYPE_UNION: u32 = 15;
35pub const JIT_TYPE_SIGNATURE: u32 = 16;
36pub const JIT_TYPE_PTR: u32 = 17;
37pub const JIT_TYPE_FIRST_TAGGED: u32 = 32;
38pub const JIT_TYPETAG_NAME: u32 = 10000;
39pub const JIT_TYPETAG_STRUCT_NAME: u32 = 10001;
40pub const JIT_TYPETAG_UNION_NAME: u32 = 10002;
41pub const JIT_TYPETAG_ENUM_NAME: u32 = 10003;
42pub const JIT_TYPETAG_CONST: u32 = 10004;
43pub const JIT_TYPETAG_VOLATILE: u32 = 10005;
44pub const JIT_TYPETAG_REFERENCE: u32 = 10006;
45pub const JIT_TYPETAG_OUTPUT: u32 = 10007;
46pub const JIT_TYPETAG_RESTRICT: u32 = 10008;
47pub const JIT_TYPETAG_SYS_BOOL: u32 = 10009;
48pub const JIT_TYPETAG_SYS_CHAR: u32 = 10010;
49pub const JIT_TYPETAG_SYS_SCHAR: u32 = 10011;
50pub const JIT_TYPETAG_SYS_UCHAR: u32 = 10012;
51pub const JIT_TYPETAG_SYS_SHORT: u32 = 10013;
52pub const JIT_TYPETAG_SYS_USHORT: u32 = 10014;
53pub const JIT_TYPETAG_SYS_INT: u32 = 10015;
54pub const JIT_TYPETAG_SYS_UINT: u32 = 10016;
55pub const JIT_TYPETAG_SYS_LONG: u32 = 10017;
56pub const JIT_TYPETAG_SYS_ULONG: u32 = 10018;
57pub const JIT_TYPETAG_SYS_LONGLONG: u32 = 10019;
58pub const JIT_TYPETAG_SYS_ULONGLONG: u32 = 10020;
59pub const JIT_TYPETAG_SYS_FLOAT: u32 = 10021;
60pub const JIT_TYPETAG_SYS_DOUBLE: u32 = 10022;
61pub const JIT_TYPETAG_SYS_LONGDOUBLE: u32 = 10023;
62pub const JIT_DEBUGGER_TYPE_QUIT: u32 = 0;
63pub const JIT_DEBUGGER_TYPE_HARD_BREAKPOINT: u32 = 1;
64pub const JIT_DEBUGGER_TYPE_SOFT_BREAKPOINT: u32 = 2;
65pub const JIT_DEBUGGER_TYPE_USER_BREAKPOINT: u32 = 3;
66pub const JIT_DEBUGGER_TYPE_ATTACH_THREAD: u32 = 4;
67pub const JIT_DEBUGGER_TYPE_DETACH_THREAD: u32 = 5;
68pub const JIT_DEBUGGER_FLAG_THREAD: u32 = 1;
69pub const JIT_DEBUGGER_FLAG_FUNCTION: u32 = 2;
70pub const JIT_DEBUGGER_FLAG_DATA1: u32 = 4;
71pub const JIT_DEBUGGER_FLAG_DATA2: u32 = 8;
72pub const JIT_DEBUGGER_DATA1_FIRST: u32 = 10000;
73pub const JIT_DEBUGGER_DATA1_LINE: u32 = 10000;
74pub const JIT_DEBUGGER_DATA1_ENTER: u32 = 10001;
75pub const JIT_DEBUGGER_DATA1_LEAVE: u32 = 10002;
76pub const JIT_DEBUGGER_DATA1_THROW: u32 = 10003;
77pub const JIT_READELF_FLAG_FORCE: u32 = 1;
78pub const JIT_READELF_FLAG_DEBUG: u32 = 2;
79pub const JIT_READELF_OK: u32 = 0;
80pub const JIT_READELF_CANNOT_OPEN: u32 = 1;
81pub const JIT_READELF_NOT_ELF: u32 = 2;
82pub const JIT_READELF_WRONG_ARCH: u32 = 3;
83pub const JIT_READELF_BAD_FORMAT: u32 = 4;
84pub const JIT_READELF_MEMORY: u32 = 5;
85pub const JIT_RESULT_OK: u32 = 1;
86pub const JIT_RESULT_OVERFLOW: u32 = 0;
87pub const JIT_RESULT_ARITHMETIC: i32 = -1;
88pub const JIT_RESULT_DIVISION_BY_ZERO: i32 = -2;
89pub const JIT_RESULT_COMPILE_ERROR: i32 = -3;
90pub const JIT_RESULT_OUT_OF_MEMORY: i32 = -4;
91pub const JIT_RESULT_NULL_REFERENCE: i32 = -5;
92pub const JIT_RESULT_NULL_FUNCTION: i32 = -6;
93pub const JIT_RESULT_CALLED_NESTED: i32 = -7;
94pub const JIT_RESULT_OUT_OF_BOUNDS: i32 = -8;
95pub const JIT_RESULT_UNDEFINED_LABEL: i32 = -9;
96pub const JIT_RESULT_MEMORY_FULL: i32 = -10000;
97pub const JIT_OPTLEVEL_NONE: u32 = 0;
98pub const JIT_OPTLEVEL_NORMAL: u32 = 1;
99pub const JIT_CALL_NOTHROW: u32 = 1;
100pub const JIT_CALL_NORETURN: u32 = 2;
101pub const JIT_CALL_TAIL: u32 = 4;
102pub const JITOM_MODIFIER_ACCESS_MASK: u32 = 7;
103pub const JITOM_MODIFIER_PUBLIC: u32 = 0;
104pub const JITOM_MODIFIER_PRIVATE: u32 = 1;
105pub const JITOM_MODIFIER_PROTECTED: u32 = 2;
106pub const JITOM_MODIFIER_PACKAGE: u32 = 3;
107pub const JITOM_MODIFIER_PACKAGE_OR_PROTECTED: u32 = 4;
108pub const JITOM_MODIFIER_PACKAGE_AND_PROTECTED: u32 = 5;
109pub const JITOM_MODIFIER_OTHER1: u32 = 6;
110pub const JITOM_MODIFIER_OTHER2: u32 = 7;
111pub const JITOM_MODIFIER_STATIC: u32 = 8;
112pub const JITOM_MODIFIER_VIRTUAL: u32 = 16;
113pub const JITOM_MODIFIER_NEW_SLOT: u32 = 32;
114pub const JITOM_MODIFIER_ABSTRACT: u32 = 64;
115pub const JITOM_MODIFIER_LITERAL: u32 = 128;
116pub const JITOM_MODIFIER_CTOR: u32 = 256;
117pub const JITOM_MODIFIER_STATIC_CTOR: u32 = 512;
118pub const JITOM_MODIFIER_DTOR: u32 = 1024;
119pub const JITOM_MODIFIER_INTERFACE: u32 = 2048;
120pub const JITOM_MODIFIER_VALUE: u32 = 4096;
121pub const JITOM_MODIFIER_FINAL: u32 = 8192;
122pub const JITOM_MODIFIER_DELETE: u32 = 16384;
123pub const JITOM_MODIFIER_REFERENCE_COUNTED: u32 = 32768;
124pub const JITOM_TYPETAG_CLASS: u32 = 11000;
125pub const JITOM_TYPETAG_VALUE: u32 = 11001;
126pub const JIT_OP_NOP: u32 = 0;
127pub const JIT_OP_TRUNC_SBYTE: u32 = 1;
128pub const JIT_OP_TRUNC_UBYTE: u32 = 2;
129pub const JIT_OP_TRUNC_SHORT: u32 = 3;
130pub const JIT_OP_TRUNC_USHORT: u32 = 4;
131pub const JIT_OP_TRUNC_INT: u32 = 5;
132pub const JIT_OP_TRUNC_UINT: u32 = 6;
133pub const JIT_OP_CHECK_SBYTE: u32 = 7;
134pub const JIT_OP_CHECK_UBYTE: u32 = 8;
135pub const JIT_OP_CHECK_SHORT: u32 = 9;
136pub const JIT_OP_CHECK_USHORT: u32 = 10;
137pub const JIT_OP_CHECK_INT: u32 = 11;
138pub const JIT_OP_CHECK_UINT: u32 = 12;
139pub const JIT_OP_LOW_WORD: u32 = 13;
140pub const JIT_OP_EXPAND_INT: u32 = 14;
141pub const JIT_OP_EXPAND_UINT: u32 = 15;
142pub const JIT_OP_CHECK_LOW_WORD: u32 = 16;
143pub const JIT_OP_CHECK_SIGNED_LOW_WORD: u32 = 17;
144pub const JIT_OP_CHECK_LONG: u32 = 18;
145pub const JIT_OP_CHECK_ULONG: u32 = 19;
146pub const JIT_OP_FLOAT32_TO_INT: u32 = 20;
147pub const JIT_OP_FLOAT32_TO_UINT: u32 = 21;
148pub const JIT_OP_FLOAT32_TO_LONG: u32 = 22;
149pub const JIT_OP_FLOAT32_TO_ULONG: u32 = 23;
150pub const JIT_OP_CHECK_FLOAT32_TO_INT: u32 = 24;
151pub const JIT_OP_CHECK_FLOAT32_TO_UINT: u32 = 25;
152pub const JIT_OP_CHECK_FLOAT32_TO_LONG: u32 = 26;
153pub const JIT_OP_CHECK_FLOAT32_TO_ULONG: u32 = 27;
154pub const JIT_OP_INT_TO_FLOAT32: u32 = 28;
155pub const JIT_OP_UINT_TO_FLOAT32: u32 = 29;
156pub const JIT_OP_LONG_TO_FLOAT32: u32 = 30;
157pub const JIT_OP_ULONG_TO_FLOAT32: u32 = 31;
158pub const JIT_OP_FLOAT32_TO_FLOAT64: u32 = 32;
159pub const JIT_OP_FLOAT64_TO_INT: u32 = 33;
160pub const JIT_OP_FLOAT64_TO_UINT: u32 = 34;
161pub const JIT_OP_FLOAT64_TO_LONG: u32 = 35;
162pub const JIT_OP_FLOAT64_TO_ULONG: u32 = 36;
163pub const JIT_OP_CHECK_FLOAT64_TO_INT: u32 = 37;
164pub const JIT_OP_CHECK_FLOAT64_TO_UINT: u32 = 38;
165pub const JIT_OP_CHECK_FLOAT64_TO_LONG: u32 = 39;
166pub const JIT_OP_CHECK_FLOAT64_TO_ULONG: u32 = 40;
167pub const JIT_OP_INT_TO_FLOAT64: u32 = 41;
168pub const JIT_OP_UINT_TO_FLOAT64: u32 = 42;
169pub const JIT_OP_LONG_TO_FLOAT64: u32 = 43;
170pub const JIT_OP_ULONG_TO_FLOAT64: u32 = 44;
171pub const JIT_OP_FLOAT64_TO_FLOAT32: u32 = 45;
172pub const JIT_OP_NFLOAT_TO_INT: u32 = 46;
173pub const JIT_OP_NFLOAT_TO_UINT: u32 = 47;
174pub const JIT_OP_NFLOAT_TO_LONG: u32 = 48;
175pub const JIT_OP_NFLOAT_TO_ULONG: u32 = 49;
176pub const JIT_OP_CHECK_NFLOAT_TO_INT: u32 = 50;
177pub const JIT_OP_CHECK_NFLOAT_TO_UINT: u32 = 51;
178pub const JIT_OP_CHECK_NFLOAT_TO_LONG: u32 = 52;
179pub const JIT_OP_CHECK_NFLOAT_TO_ULONG: u32 = 53;
180pub const JIT_OP_INT_TO_NFLOAT: u32 = 54;
181pub const JIT_OP_UINT_TO_NFLOAT: u32 = 55;
182pub const JIT_OP_LONG_TO_NFLOAT: u32 = 56;
183pub const JIT_OP_ULONG_TO_NFLOAT: u32 = 57;
184pub const JIT_OP_NFLOAT_TO_FLOAT32: u32 = 58;
185pub const JIT_OP_NFLOAT_TO_FLOAT64: u32 = 59;
186pub const JIT_OP_FLOAT32_TO_NFLOAT: u32 = 60;
187pub const JIT_OP_FLOAT64_TO_NFLOAT: u32 = 61;
188pub const JIT_OP_IADD: u32 = 62;
189pub const JIT_OP_IADD_OVF: u32 = 63;
190pub const JIT_OP_IADD_OVF_UN: u32 = 64;
191pub const JIT_OP_ISUB: u32 = 65;
192pub const JIT_OP_ISUB_OVF: u32 = 66;
193pub const JIT_OP_ISUB_OVF_UN: u32 = 67;
194pub const JIT_OP_IMUL: u32 = 68;
195pub const JIT_OP_IMUL_OVF: u32 = 69;
196pub const JIT_OP_IMUL_OVF_UN: u32 = 70;
197pub const JIT_OP_IDIV: u32 = 71;
198pub const JIT_OP_IDIV_UN: u32 = 72;
199pub const JIT_OP_IREM: u32 = 73;
200pub const JIT_OP_IREM_UN: u32 = 74;
201pub const JIT_OP_INEG: u32 = 75;
202pub const JIT_OP_LADD: u32 = 76;
203pub const JIT_OP_LADD_OVF: u32 = 77;
204pub const JIT_OP_LADD_OVF_UN: u32 = 78;
205pub const JIT_OP_LSUB: u32 = 79;
206pub const JIT_OP_LSUB_OVF: u32 = 80;
207pub const JIT_OP_LSUB_OVF_UN: u32 = 81;
208pub const JIT_OP_LMUL: u32 = 82;
209pub const JIT_OP_LMUL_OVF: u32 = 83;
210pub const JIT_OP_LMUL_OVF_UN: u32 = 84;
211pub const JIT_OP_LDIV: u32 = 85;
212pub const JIT_OP_LDIV_UN: u32 = 86;
213pub const JIT_OP_LREM: u32 = 87;
214pub const JIT_OP_LREM_UN: u32 = 88;
215pub const JIT_OP_LNEG: u32 = 89;
216pub const JIT_OP_FADD: u32 = 90;
217pub const JIT_OP_FSUB: u32 = 91;
218pub const JIT_OP_FMUL: u32 = 92;
219pub const JIT_OP_FDIV: u32 = 93;
220pub const JIT_OP_FREM: u32 = 94;
221pub const JIT_OP_FREM_IEEE: u32 = 95;
222pub const JIT_OP_FNEG: u32 = 96;
223pub const JIT_OP_DADD: u32 = 97;
224pub const JIT_OP_DSUB: u32 = 98;
225pub const JIT_OP_DMUL: u32 = 99;
226pub const JIT_OP_DDIV: u32 = 100;
227pub const JIT_OP_DREM: u32 = 101;
228pub const JIT_OP_DREM_IEEE: u32 = 102;
229pub const JIT_OP_DNEG: u32 = 103;
230pub const JIT_OP_NFADD: u32 = 104;
231pub const JIT_OP_NFSUB: u32 = 105;
232pub const JIT_OP_NFMUL: u32 = 106;
233pub const JIT_OP_NFDIV: u32 = 107;
234pub const JIT_OP_NFREM: u32 = 108;
235pub const JIT_OP_NFREM_IEEE: u32 = 109;
236pub const JIT_OP_NFNEG: u32 = 110;
237pub const JIT_OP_IAND: u32 = 111;
238pub const JIT_OP_IOR: u32 = 112;
239pub const JIT_OP_IXOR: u32 = 113;
240pub const JIT_OP_INOT: u32 = 114;
241pub const JIT_OP_ISHL: u32 = 115;
242pub const JIT_OP_ISHR: u32 = 116;
243pub const JIT_OP_ISHR_UN: u32 = 117;
244pub const JIT_OP_LAND: u32 = 118;
245pub const JIT_OP_LOR: u32 = 119;
246pub const JIT_OP_LXOR: u32 = 120;
247pub const JIT_OP_LNOT: u32 = 121;
248pub const JIT_OP_LSHL: u32 = 122;
249pub const JIT_OP_LSHR: u32 = 123;
250pub const JIT_OP_LSHR_UN: u32 = 124;
251pub const JIT_OP_BR: u32 = 125;
252pub const JIT_OP_BR_IFALSE: u32 = 126;
253pub const JIT_OP_BR_ITRUE: u32 = 127;
254pub const JIT_OP_BR_IEQ: u32 = 128;
255pub const JIT_OP_BR_INE: u32 = 129;
256pub const JIT_OP_BR_ILT: u32 = 130;
257pub const JIT_OP_BR_ILT_UN: u32 = 131;
258pub const JIT_OP_BR_ILE: u32 = 132;
259pub const JIT_OP_BR_ILE_UN: u32 = 133;
260pub const JIT_OP_BR_IGT: u32 = 134;
261pub const JIT_OP_BR_IGT_UN: u32 = 135;
262pub const JIT_OP_BR_IGE: u32 = 136;
263pub const JIT_OP_BR_IGE_UN: u32 = 137;
264pub const JIT_OP_BR_LFALSE: u32 = 138;
265pub const JIT_OP_BR_LTRUE: u32 = 139;
266pub const JIT_OP_BR_LEQ: u32 = 140;
267pub const JIT_OP_BR_LNE: u32 = 141;
268pub const JIT_OP_BR_LLT: u32 = 142;
269pub const JIT_OP_BR_LLT_UN: u32 = 143;
270pub const JIT_OP_BR_LLE: u32 = 144;
271pub const JIT_OP_BR_LLE_UN: u32 = 145;
272pub const JIT_OP_BR_LGT: u32 = 146;
273pub const JIT_OP_BR_LGT_UN: u32 = 147;
274pub const JIT_OP_BR_LGE: u32 = 148;
275pub const JIT_OP_BR_LGE_UN: u32 = 149;
276pub const JIT_OP_BR_FEQ: u32 = 150;
277pub const JIT_OP_BR_FNE: u32 = 151;
278pub const JIT_OP_BR_FLT: u32 = 152;
279pub const JIT_OP_BR_FLE: u32 = 153;
280pub const JIT_OP_BR_FGT: u32 = 154;
281pub const JIT_OP_BR_FGE: u32 = 155;
282pub const JIT_OP_BR_FLT_INV: u32 = 156;
283pub const JIT_OP_BR_FLE_INV: u32 = 157;
284pub const JIT_OP_BR_FGT_INV: u32 = 158;
285pub const JIT_OP_BR_FGE_INV: u32 = 159;
286pub const JIT_OP_BR_DEQ: u32 = 160;
287pub const JIT_OP_BR_DNE: u32 = 161;
288pub const JIT_OP_BR_DLT: u32 = 162;
289pub const JIT_OP_BR_DLE: u32 = 163;
290pub const JIT_OP_BR_DGT: u32 = 164;
291pub const JIT_OP_BR_DGE: u32 = 165;
292pub const JIT_OP_BR_DLT_INV: u32 = 166;
293pub const JIT_OP_BR_DLE_INV: u32 = 167;
294pub const JIT_OP_BR_DGT_INV: u32 = 168;
295pub const JIT_OP_BR_DGE_INV: u32 = 169;
296pub const JIT_OP_BR_NFEQ: u32 = 170;
297pub const JIT_OP_BR_NFNE: u32 = 171;
298pub const JIT_OP_BR_NFLT: u32 = 172;
299pub const JIT_OP_BR_NFLE: u32 = 173;
300pub const JIT_OP_BR_NFGT: u32 = 174;
301pub const JIT_OP_BR_NFGE: u32 = 175;
302pub const JIT_OP_BR_NFLT_INV: u32 = 176;
303pub const JIT_OP_BR_NFLE_INV: u32 = 177;
304pub const JIT_OP_BR_NFGT_INV: u32 = 178;
305pub const JIT_OP_BR_NFGE_INV: u32 = 179;
306pub const JIT_OP_ICMP: u32 = 180;
307pub const JIT_OP_ICMP_UN: u32 = 181;
308pub const JIT_OP_LCMP: u32 = 182;
309pub const JIT_OP_LCMP_UN: u32 = 183;
310pub const JIT_OP_FCMPL: u32 = 184;
311pub const JIT_OP_FCMPG: u32 = 185;
312pub const JIT_OP_DCMPL: u32 = 186;
313pub const JIT_OP_DCMPG: u32 = 187;
314pub const JIT_OP_NFCMPL: u32 = 188;
315pub const JIT_OP_NFCMPG: u32 = 189;
316pub const JIT_OP_IEQ: u32 = 190;
317pub const JIT_OP_INE: u32 = 191;
318pub const JIT_OP_ILT: u32 = 192;
319pub const JIT_OP_ILT_UN: u32 = 193;
320pub const JIT_OP_ILE: u32 = 194;
321pub const JIT_OP_ILE_UN: u32 = 195;
322pub const JIT_OP_IGT: u32 = 196;
323pub const JIT_OP_IGT_UN: u32 = 197;
324pub const JIT_OP_IGE: u32 = 198;
325pub const JIT_OP_IGE_UN: u32 = 199;
326pub const JIT_OP_LEQ: u32 = 200;
327pub const JIT_OP_LNE: u32 = 201;
328pub const JIT_OP_LLT: u32 = 202;
329pub const JIT_OP_LLT_UN: u32 = 203;
330pub const JIT_OP_LLE: u32 = 204;
331pub const JIT_OP_LLE_UN: u32 = 205;
332pub const JIT_OP_LGT: u32 = 206;
333pub const JIT_OP_LGT_UN: u32 = 207;
334pub const JIT_OP_LGE: u32 = 208;
335pub const JIT_OP_LGE_UN: u32 = 209;
336pub const JIT_OP_FEQ: u32 = 210;
337pub const JIT_OP_FNE: u32 = 211;
338pub const JIT_OP_FLT: u32 = 212;
339pub const JIT_OP_FLE: u32 = 213;
340pub const JIT_OP_FGT: u32 = 214;
341pub const JIT_OP_FGE: u32 = 215;
342pub const JIT_OP_FLT_INV: u32 = 216;
343pub const JIT_OP_FLE_INV: u32 = 217;
344pub const JIT_OP_FGT_INV: u32 = 218;
345pub const JIT_OP_FGE_INV: u32 = 219;
346pub const JIT_OP_DEQ: u32 = 220;
347pub const JIT_OP_DNE: u32 = 221;
348pub const JIT_OP_DLT: u32 = 222;
349pub const JIT_OP_DLE: u32 = 223;
350pub const JIT_OP_DGT: u32 = 224;
351pub const JIT_OP_DGE: u32 = 225;
352pub const JIT_OP_DLT_INV: u32 = 226;
353pub const JIT_OP_DLE_INV: u32 = 227;
354pub const JIT_OP_DGT_INV: u32 = 228;
355pub const JIT_OP_DGE_INV: u32 = 229;
356pub const JIT_OP_NFEQ: u32 = 230;
357pub const JIT_OP_NFNE: u32 = 231;
358pub const JIT_OP_NFLT: u32 = 232;
359pub const JIT_OP_NFLE: u32 = 233;
360pub const JIT_OP_NFGT: u32 = 234;
361pub const JIT_OP_NFGE: u32 = 235;
362pub const JIT_OP_NFLT_INV: u32 = 236;
363pub const JIT_OP_NFLE_INV: u32 = 237;
364pub const JIT_OP_NFGT_INV: u32 = 238;
365pub const JIT_OP_NFGE_INV: u32 = 239;
366pub const JIT_OP_IS_FNAN: u32 = 240;
367pub const JIT_OP_IS_FINF: u32 = 241;
368pub const JIT_OP_IS_FFINITE: u32 = 242;
369pub const JIT_OP_IS_DNAN: u32 = 243;
370pub const JIT_OP_IS_DINF: u32 = 244;
371pub const JIT_OP_IS_DFINITE: u32 = 245;
372pub const JIT_OP_IS_NFNAN: u32 = 246;
373pub const JIT_OP_IS_NFINF: u32 = 247;
374pub const JIT_OP_IS_NFFINITE: u32 = 248;
375pub const JIT_OP_FACOS: u32 = 249;
376pub const JIT_OP_FASIN: u32 = 250;
377pub const JIT_OP_FATAN: u32 = 251;
378pub const JIT_OP_FATAN2: u32 = 252;
379pub const JIT_OP_FCEIL: u32 = 253;
380pub const JIT_OP_FCOS: u32 = 254;
381pub const JIT_OP_FCOSH: u32 = 255;
382pub const JIT_OP_FEXP: u32 = 256;
383pub const JIT_OP_FFLOOR: u32 = 257;
384pub const JIT_OP_FLOG: u32 = 258;
385pub const JIT_OP_FLOG10: u32 = 259;
386pub const JIT_OP_FPOW: u32 = 260;
387pub const JIT_OP_FRINT: u32 = 261;
388pub const JIT_OP_FROUND: u32 = 262;
389pub const JIT_OP_FSIN: u32 = 263;
390pub const JIT_OP_FSINH: u32 = 264;
391pub const JIT_OP_FSQRT: u32 = 265;
392pub const JIT_OP_FTAN: u32 = 266;
393pub const JIT_OP_FTANH: u32 = 267;
394pub const JIT_OP_FTRUNC: u32 = 268;
395pub const JIT_OP_DACOS: u32 = 269;
396pub const JIT_OP_DASIN: u32 = 270;
397pub const JIT_OP_DATAN: u32 = 271;
398pub const JIT_OP_DATAN2: u32 = 272;
399pub const JIT_OP_DCEIL: u32 = 273;
400pub const JIT_OP_DCOS: u32 = 274;
401pub const JIT_OP_DCOSH: u32 = 275;
402pub const JIT_OP_DEXP: u32 = 276;
403pub const JIT_OP_DFLOOR: u32 = 277;
404pub const JIT_OP_DLOG: u32 = 278;
405pub const JIT_OP_DLOG10: u32 = 279;
406pub const JIT_OP_DPOW: u32 = 280;
407pub const JIT_OP_DRINT: u32 = 281;
408pub const JIT_OP_DROUND: u32 = 282;
409pub const JIT_OP_DSIN: u32 = 283;
410pub const JIT_OP_DSINH: u32 = 284;
411pub const JIT_OP_DSQRT: u32 = 285;
412pub const JIT_OP_DTAN: u32 = 286;
413pub const JIT_OP_DTANH: u32 = 287;
414pub const JIT_OP_DTRUNC: u32 = 288;
415pub const JIT_OP_NFACOS: u32 = 289;
416pub const JIT_OP_NFASIN: u32 = 290;
417pub const JIT_OP_NFATAN: u32 = 291;
418pub const JIT_OP_NFATAN2: u32 = 292;
419pub const JIT_OP_NFCEIL: u32 = 293;
420pub const JIT_OP_NFCOS: u32 = 294;
421pub const JIT_OP_NFCOSH: u32 = 295;
422pub const JIT_OP_NFEXP: u32 = 296;
423pub const JIT_OP_NFFLOOR: u32 = 297;
424pub const JIT_OP_NFLOG: u32 = 298;
425pub const JIT_OP_NFLOG10: u32 = 299;
426pub const JIT_OP_NFPOW: u32 = 300;
427pub const JIT_OP_NFRINT: u32 = 301;
428pub const JIT_OP_NFROUND: u32 = 302;
429pub const JIT_OP_NFSIN: u32 = 303;
430pub const JIT_OP_NFSINH: u32 = 304;
431pub const JIT_OP_NFSQRT: u32 = 305;
432pub const JIT_OP_NFTAN: u32 = 306;
433pub const JIT_OP_NFTANH: u32 = 307;
434pub const JIT_OP_NFTRUNC: u32 = 308;
435pub const JIT_OP_IABS: u32 = 309;
436pub const JIT_OP_LABS: u32 = 310;
437pub const JIT_OP_FABS: u32 = 311;
438pub const JIT_OP_DABS: u32 = 312;
439pub const JIT_OP_NFABS: u32 = 313;
440pub const JIT_OP_IMIN: u32 = 314;
441pub const JIT_OP_IMIN_UN: u32 = 315;
442pub const JIT_OP_LMIN: u32 = 316;
443pub const JIT_OP_LMIN_UN: u32 = 317;
444pub const JIT_OP_FMIN: u32 = 318;
445pub const JIT_OP_DMIN: u32 = 319;
446pub const JIT_OP_NFMIN: u32 = 320;
447pub const JIT_OP_IMAX: u32 = 321;
448pub const JIT_OP_IMAX_UN: u32 = 322;
449pub const JIT_OP_LMAX: u32 = 323;
450pub const JIT_OP_LMAX_UN: u32 = 324;
451pub const JIT_OP_FMAX: u32 = 325;
452pub const JIT_OP_DMAX: u32 = 326;
453pub const JIT_OP_NFMAX: u32 = 327;
454pub const JIT_OP_ISIGN: u32 = 328;
455pub const JIT_OP_LSIGN: u32 = 329;
456pub const JIT_OP_FSIGN: u32 = 330;
457pub const JIT_OP_DSIGN: u32 = 331;
458pub const JIT_OP_NFSIGN: u32 = 332;
459pub const JIT_OP_CHECK_NULL: u32 = 333;
460pub const JIT_OP_CALL: u32 = 334;
461pub const JIT_OP_CALL_TAIL: u32 = 335;
462pub const JIT_OP_CALL_INDIRECT: u32 = 336;
463pub const JIT_OP_CALL_INDIRECT_TAIL: u32 = 337;
464pub const JIT_OP_CALL_VTABLE_PTR: u32 = 338;
465pub const JIT_OP_CALL_VTABLE_PTR_TAIL: u32 = 339;
466pub const JIT_OP_CALL_EXTERNAL: u32 = 340;
467pub const JIT_OP_CALL_EXTERNAL_TAIL: u32 = 341;
468pub const JIT_OP_RETURN: u32 = 342;
469pub const JIT_OP_RETURN_INT: u32 = 343;
470pub const JIT_OP_RETURN_LONG: u32 = 344;
471pub const JIT_OP_RETURN_FLOAT32: u32 = 345;
472pub const JIT_OP_RETURN_FLOAT64: u32 = 346;
473pub const JIT_OP_RETURN_NFLOAT: u32 = 347;
474pub const JIT_OP_RETURN_SMALL_STRUCT: u32 = 348;
475pub const JIT_OP_IMPORT: u32 = 349;
476pub const JIT_OP_THROW: u32 = 350;
477pub const JIT_OP_RETHROW: u32 = 351;
478pub const JIT_OP_LOAD_PC: u32 = 352;
479pub const JIT_OP_LOAD_EXCEPTION_PC: u32 = 353;
480pub const JIT_OP_ENTER_FINALLY: u32 = 354;
481pub const JIT_OP_LEAVE_FINALLY: u32 = 355;
482pub const JIT_OP_CALL_FINALLY: u32 = 356;
483pub const JIT_OP_ENTER_FILTER: u32 = 357;
484pub const JIT_OP_LEAVE_FILTER: u32 = 358;
485pub const JIT_OP_CALL_FILTER: u32 = 359;
486pub const JIT_OP_CALL_FILTER_RETURN: u32 = 360;
487pub const JIT_OP_ADDRESS_OF_LABEL: u32 = 361;
488pub const JIT_OP_COPY_LOAD_SBYTE: u32 = 362;
489pub const JIT_OP_COPY_LOAD_UBYTE: u32 = 363;
490pub const JIT_OP_COPY_LOAD_SHORT: u32 = 364;
491pub const JIT_OP_COPY_LOAD_USHORT: u32 = 365;
492pub const JIT_OP_COPY_INT: u32 = 366;
493pub const JIT_OP_COPY_LONG: u32 = 367;
494pub const JIT_OP_COPY_FLOAT32: u32 = 368;
495pub const JIT_OP_COPY_FLOAT64: u32 = 369;
496pub const JIT_OP_COPY_NFLOAT: u32 = 370;
497pub const JIT_OP_COPY_STRUCT: u32 = 371;
498pub const JIT_OP_COPY_STORE_BYTE: u32 = 372;
499pub const JIT_OP_COPY_STORE_SHORT: u32 = 373;
500pub const JIT_OP_ADDRESS_OF: u32 = 374;
501pub const JIT_OP_INCOMING_REG: u32 = 375;
502pub const JIT_OP_INCOMING_FRAME_POSN: u32 = 376;
503pub const JIT_OP_OUTGOING_REG: u32 = 377;
504pub const JIT_OP_RETURN_REG: u32 = 378;
505pub const JIT_OP_RETRIEVE_FRAME_POINTER: u32 = 379;
506pub const JIT_OP_PUSH_INT: u32 = 380;
507pub const JIT_OP_PUSH_LONG: u32 = 381;
508pub const JIT_OP_PUSH_FLOAT32: u32 = 382;
509pub const JIT_OP_PUSH_FLOAT64: u32 = 383;
510pub const JIT_OP_PUSH_NFLOAT: u32 = 384;
511pub const JIT_OP_PUSH_STRUCT: u32 = 385;
512pub const JIT_OP_POP_STACK: u32 = 386;
513pub const JIT_OP_FLUSH_SMALL_STRUCT: u32 = 387;
514pub const JIT_OP_SET_PARAM_INT: u32 = 388;
515pub const JIT_OP_SET_PARAM_LONG: u32 = 389;
516pub const JIT_OP_SET_PARAM_FLOAT32: u32 = 390;
517pub const JIT_OP_SET_PARAM_FLOAT64: u32 = 391;
518pub const JIT_OP_SET_PARAM_NFLOAT: u32 = 392;
519pub const JIT_OP_SET_PARAM_STRUCT: u32 = 393;
520pub const JIT_OP_PUSH_RETURN_AREA_PTR: u32 = 394;
521pub const JIT_OP_LOAD_RELATIVE_SBYTE: u32 = 395;
522pub const JIT_OP_LOAD_RELATIVE_UBYTE: u32 = 396;
523pub const JIT_OP_LOAD_RELATIVE_SHORT: u32 = 397;
524pub const JIT_OP_LOAD_RELATIVE_USHORT: u32 = 398;
525pub const JIT_OP_LOAD_RELATIVE_INT: u32 = 399;
526pub const JIT_OP_LOAD_RELATIVE_LONG: u32 = 400;
527pub const JIT_OP_LOAD_RELATIVE_FLOAT32: u32 = 401;
528pub const JIT_OP_LOAD_RELATIVE_FLOAT64: u32 = 402;
529pub const JIT_OP_LOAD_RELATIVE_NFLOAT: u32 = 403;
530pub const JIT_OP_LOAD_RELATIVE_STRUCT: u32 = 404;
531pub const JIT_OP_STORE_RELATIVE_BYTE: u32 = 405;
532pub const JIT_OP_STORE_RELATIVE_SHORT: u32 = 406;
533pub const JIT_OP_STORE_RELATIVE_INT: u32 = 407;
534pub const JIT_OP_STORE_RELATIVE_LONG: u32 = 408;
535pub const JIT_OP_STORE_RELATIVE_FLOAT32: u32 = 409;
536pub const JIT_OP_STORE_RELATIVE_FLOAT64: u32 = 410;
537pub const JIT_OP_STORE_RELATIVE_NFLOAT: u32 = 411;
538pub const JIT_OP_STORE_RELATIVE_STRUCT: u32 = 412;
539pub const JIT_OP_ADD_RELATIVE: u32 = 413;
540pub const JIT_OP_LOAD_ELEMENT_SBYTE: u32 = 414;
541pub const JIT_OP_LOAD_ELEMENT_UBYTE: u32 = 415;
542pub const JIT_OP_LOAD_ELEMENT_SHORT: u32 = 416;
543pub const JIT_OP_LOAD_ELEMENT_USHORT: u32 = 417;
544pub const JIT_OP_LOAD_ELEMENT_INT: u32 = 418;
545pub const JIT_OP_LOAD_ELEMENT_LONG: u32 = 419;
546pub const JIT_OP_LOAD_ELEMENT_FLOAT32: u32 = 420;
547pub const JIT_OP_LOAD_ELEMENT_FLOAT64: u32 = 421;
548pub const JIT_OP_LOAD_ELEMENT_NFLOAT: u32 = 422;
549pub const JIT_OP_STORE_ELEMENT_BYTE: u32 = 423;
550pub const JIT_OP_STORE_ELEMENT_SHORT: u32 = 424;
551pub const JIT_OP_STORE_ELEMENT_INT: u32 = 425;
552pub const JIT_OP_STORE_ELEMENT_LONG: u32 = 426;
553pub const JIT_OP_STORE_ELEMENT_FLOAT32: u32 = 427;
554pub const JIT_OP_STORE_ELEMENT_FLOAT64: u32 = 428;
555pub const JIT_OP_STORE_ELEMENT_NFLOAT: u32 = 429;
556pub const JIT_OP_MEMCPY: u32 = 430;
557pub const JIT_OP_MEMMOVE: u32 = 431;
558pub const JIT_OP_MEMSET: u32 = 432;
559pub const JIT_OP_ALLOCA: u32 = 433;
560pub const JIT_OP_MARK_OFFSET: u32 = 434;
561pub const JIT_OP_MARK_BREAKPOINT: u32 = 435;
562pub const JIT_OP_JUMP_TABLE: u32 = 436;
563pub const JIT_OP_NUM_OPCODES: u32 = 437;
564pub const JIT_OPCODE_DEST_MASK: u32 = 15;
565pub const JIT_OPCODE_DEST_EMPTY: u32 = 0;
566pub const JIT_OPCODE_DEST_INT: u32 = 1;
567pub const JIT_OPCODE_DEST_LONG: u32 = 2;
568pub const JIT_OPCODE_DEST_FLOAT32: u32 = 3;
569pub const JIT_OPCODE_DEST_FLOAT64: u32 = 4;
570pub const JIT_OPCODE_DEST_NFLOAT: u32 = 5;
571pub const JIT_OPCODE_DEST_ANY: u32 = 6;
572pub const JIT_OPCODE_SRC1_MASK: u32 = 240;
573pub const JIT_OPCODE_SRC1_EMPTY: u32 = 0;
574pub const JIT_OPCODE_SRC1_INT: u32 = 16;
575pub const JIT_OPCODE_SRC1_LONG: u32 = 32;
576pub const JIT_OPCODE_SRC1_FLOAT32: u32 = 48;
577pub const JIT_OPCODE_SRC1_FLOAT64: u32 = 64;
578pub const JIT_OPCODE_SRC1_NFLOAT: u32 = 80;
579pub const JIT_OPCODE_SRC1_ANY: u32 = 96;
580pub const JIT_OPCODE_SRC2_MASK: u32 = 3840;
581pub const JIT_OPCODE_SRC2_EMPTY: u32 = 0;
582pub const JIT_OPCODE_SRC2_INT: u32 = 256;
583pub const JIT_OPCODE_SRC2_LONG: u32 = 512;
584pub const JIT_OPCODE_SRC2_FLOAT32: u32 = 768;
585pub const JIT_OPCODE_SRC2_FLOAT64: u32 = 1024;
586pub const JIT_OPCODE_SRC2_NFLOAT: u32 = 1280;
587pub const JIT_OPCODE_SRC2_ANY: u32 = 1536;
588pub const JIT_OPCODE_IS_BRANCH: u32 = 4096;
589pub const JIT_OPCODE_IS_CALL: u32 = 8192;
590pub const JIT_OPCODE_IS_CALL_EXTERNAL: u32 = 16384;
591pub const JIT_OPCODE_IS_REG: u32 = 32768;
592pub const JIT_OPCODE_IS_ADDROF_LABEL: u32 = 65536;
593pub const JIT_OPCODE_IS_JUMP_TABLE: u32 = 131072;
594pub const JIT_OPCODE_OPER_MASK: u32 = 32505856;
595pub const JIT_OPCODE_OPER_NONE: u32 = 0;
596pub const JIT_OPCODE_OPER_ADD: u32 = 1048576;
597pub const JIT_OPCODE_OPER_SUB: u32 = 2097152;
598pub const JIT_OPCODE_OPER_MUL: u32 = 3145728;
599pub const JIT_OPCODE_OPER_DIV: u32 = 4194304;
600pub const JIT_OPCODE_OPER_REM: u32 = 5242880;
601pub const JIT_OPCODE_OPER_NEG: u32 = 6291456;
602pub const JIT_OPCODE_OPER_AND: u32 = 7340032;
603pub const JIT_OPCODE_OPER_OR: u32 = 8388608;
604pub const JIT_OPCODE_OPER_XOR: u32 = 9437184;
605pub const JIT_OPCODE_OPER_NOT: u32 = 10485760;
606pub const JIT_OPCODE_OPER_EQ: u32 = 11534336;
607pub const JIT_OPCODE_OPER_NE: u32 = 12582912;
608pub const JIT_OPCODE_OPER_LT: u32 = 13631488;
609pub const JIT_OPCODE_OPER_LE: u32 = 14680064;
610pub const JIT_OPCODE_OPER_GT: u32 = 15728640;
611pub const JIT_OPCODE_OPER_GE: u32 = 16777216;
612pub const JIT_OPCODE_OPER_SHL: u32 = 17825792;
613pub const JIT_OPCODE_OPER_SHR: u32 = 18874368;
614pub const JIT_OPCODE_OPER_SHR_UN: u32 = 19922944;
615pub const JIT_OPCODE_OPER_COPY: u32 = 20971520;
616pub const JIT_OPCODE_OPER_ADDRESS_OF: u32 = 22020096;
617pub const JIT_OPCODE_DEST_PTR: u32 = 2;
618pub const JIT_OPCODE_SRC1_PTR: u32 = 32;
619pub const JIT_OPCODE_SRC2_PTR: u32 = 512;
620pub const JIT_OP_FEQ_INV: u32 = 210;
621pub const JIT_OP_FNE_INV: u32 = 211;
622pub const JIT_OP_DEQ_INV: u32 = 220;
623pub const JIT_OP_DNE_INV: u32 = 221;
624pub const JIT_OP_NFEQ_INV: u32 = 230;
625pub const JIT_OP_NFNE_INV: u32 = 231;
626pub const JIT_OP_BR_FEQ_INV: u32 = 150;
627pub const JIT_OP_BR_FNE_INV: u32 = 151;
628pub const JIT_OP_BR_DEQ_INV: u32 = 160;
629pub const JIT_OP_BR_DNE_INV: u32 = 161;
630pub const JIT_OP_BR_NFEQ_INV: u32 = 170;
631pub const JIT_OP_BR_NFNE_INV: u32 = 171;
632pub const JIT_FAST_GET_CURRENT_FRAME: u32 = 1;
633
634pub const jit_label_undefined: jit_label_t = !0;
635pub const JIT_NO_OFFSET: c_uint = !0;
636
637pub type jit_sbyte = ::std::os::raw::c_char;
638pub type jit_ubyte = ::std::os::raw::c_uchar;
639pub type jit_short = ::std::os::raw::c_short;
640pub type jit_ushort = ::std::os::raw::c_ushort;
641pub type jit_int = ::std::os::raw::c_int;
642pub type jit_uint = ::std::os::raw::c_uint;
643pub type jit_nint = ::std::os::raw::c_long;
644pub type jit_nuint = ::std::os::raw::c_ulong;
645pub type jit_long = ::std::os::raw::c_long;
646pub type jit_ulong = ::std::os::raw::c_ulong;
647pub type jit_float32 = f32;
648pub type jit_float64 = f64;
649pub type jit_nfloat = jit_float64;
650pub type jit_ptr = *mut ::std::os::raw::c_void;
651pub type jit_size_t = jit_nuint;
652pub type _jit_context = c_void;
653pub type jit_context_t = *mut _jit_context;
654pub type _jit_function = c_void;
655pub type jit_function_t = *mut _jit_function;
656pub type _jit_block = c_void;
657pub type jit_block_t = *mut _jit_block;
658pub type _jit_insn = c_void;
659pub type jit_insn_t = *mut _jit_insn;
660pub type _jit_value = c_void;
661pub type jit_value_t = *mut _jit_value;
662pub type _jit_type = c_void;
663pub type jit_type_t = *mut _jit_type;
664pub type jit_stack_trace = c_void;
665pub type jit_stack_trace_t = *mut jit_stack_trace;
666pub type jit_label_t = jit_nuint;
667pub type jit_meta_free_func =
668 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>;
669pub type jit_on_demand_func =
670 ::std::option::Option<unsafe extern "C" fn(func: jit_function_t) -> ::std::os::raw::c_int>;
671pub type jit_on_demand_driver_func = ::std::option::Option<
672 unsafe extern "C" fn(func: jit_function_t) -> *mut ::std::os::raw::c_void,
673>;
674pub type jit_memory_context_t = *mut ::std::os::raw::c_void;
675pub type jit_function_info_t = *mut ::std::os::raw::c_void;
676pub type jit_memory_manager_t = *const jit_memory_manager;
677#[repr(C)]
678#[derive(Debug, Copy, Clone)]
679pub struct jit_memory_manager {
680 pub create:
681 ::std::option::Option<unsafe extern "C" fn(context: jit_context_t) -> jit_memory_context_t>,
682 pub destroy: ::std::option::Option<unsafe extern "C" fn(memctx: jit_memory_context_t)>,
683 pub find_function_info: ::std::option::Option<
684 unsafe extern "C" fn(
685 memctx: jit_memory_context_t,
686 pc: *mut ::std::os::raw::c_void,
687 ) -> jit_function_info_t,
688 >,
689 pub get_function: ::std::option::Option<
690 unsafe extern "C" fn(
691 memctx: jit_memory_context_t,
692 info: jit_function_info_t,
693 ) -> jit_function_t,
694 >,
695 pub get_function_start: ::std::option::Option<
696 unsafe extern "C" fn(
697 memctx: jit_memory_context_t,
698 info: jit_function_info_t,
699 ) -> *mut ::std::os::raw::c_void,
700 >,
701 pub get_function_end: ::std::option::Option<
702 unsafe extern "C" fn(
703 memctx: jit_memory_context_t,
704 info: jit_function_info_t,
705 ) -> *mut ::std::os::raw::c_void,
706 >,
707 pub alloc_function:
708 ::std::option::Option<unsafe extern "C" fn(memctx: jit_memory_context_t) -> jit_function_t>,
709 pub free_function: ::std::option::Option<
710 unsafe extern "C" fn(memctx: jit_memory_context_t, func: jit_function_t),
711 >,
712 pub start_function: ::std::option::Option<
713 unsafe extern "C" fn(
714 memctx: jit_memory_context_t,
715 func: jit_function_t,
716 ) -> ::std::os::raw::c_int,
717 >,
718 pub end_function: ::std::option::Option<
719 unsafe extern "C" fn(
720 memctx: jit_memory_context_t,
721 result: ::std::os::raw::c_int,
722 ) -> ::std::os::raw::c_int,
723 >,
724 pub extend_limit: ::std::option::Option<
725 unsafe extern "C" fn(
726 memctx: jit_memory_context_t,
727 count: ::std::os::raw::c_int,
728 ) -> ::std::os::raw::c_int,
729 >,
730 pub get_limit: ::std::option::Option<
731 unsafe extern "C" fn(memctx: jit_memory_context_t) -> *mut ::std::os::raw::c_void,
732 >,
733 pub get_break: ::std::option::Option<
734 unsafe extern "C" fn(memctx: jit_memory_context_t) -> *mut ::std::os::raw::c_void,
735 >,
736 pub set_break: ::std::option::Option<
737 unsafe extern "C" fn(memctx: jit_memory_context_t, brk: *mut ::std::os::raw::c_void),
738 >,
739 pub alloc_trampoline: ::std::option::Option<
740 unsafe extern "C" fn(memctx: jit_memory_context_t) -> *mut ::std::os::raw::c_void,
741 >,
742 pub free_trampoline: ::std::option::Option<
743 unsafe extern "C" fn(memctx: jit_memory_context_t, ptr: *mut ::std::os::raw::c_void),
744 >,
745 pub alloc_closure: ::std::option::Option<
746 unsafe extern "C" fn(memctx: jit_memory_context_t) -> *mut ::std::os::raw::c_void,
747 >,
748 pub free_closure: ::std::option::Option<
749 unsafe extern "C" fn(memctx: jit_memory_context_t, ptr: *mut ::std::os::raw::c_void),
750 >,
751 pub alloc_data: ::std::option::Option<
752 unsafe extern "C" fn(
753 memctx: jit_memory_context_t,
754 size: jit_size_t,
755 align: jit_size_t,
756 ) -> *mut ::std::os::raw::c_void,
757 >,
758}
759extern "C" {
760 pub fn jit_default_memory_manager() -> jit_memory_manager_t;
761 pub fn jit_context_create() -> jit_context_t;
762 pub fn jit_context_destroy(context: jit_context_t);
763 pub fn jit_context_build_start(context: jit_context_t);
764 pub fn jit_context_build_end(context: jit_context_t);
765 pub fn jit_context_set_on_demand_driver(
766 context: jit_context_t,
767 driver: jit_on_demand_driver_func,
768 );
769 pub fn jit_context_set_memory_manager(context: jit_context_t, manager: jit_memory_manager_t);
770 pub fn jit_context_set_meta(
771 context: jit_context_t,
772 type_: ::std::os::raw::c_int,
773 data: *mut ::std::os::raw::c_void,
774 free_data: jit_meta_free_func,
775 ) -> ::std::os::raw::c_int;
776 pub fn jit_context_set_meta_numeric(
777 context: jit_context_t,
778 type_: ::std::os::raw::c_int,
779 data: jit_nuint,
780 ) -> ::std::os::raw::c_int;
781
782 pub fn jit_context_get_meta(
783 context: jit_context_t,
784 type_: ::std::os::raw::c_int,
785 ) -> *mut ::std::os::raw::c_void;
786
787 pub fn jit_context_get_meta_numeric(
788 context: jit_context_t,
789 type_: ::std::os::raw::c_int,
790 ) -> jit_nuint;
791
792 pub fn jit_context_free_meta(context: jit_context_t, type_: ::std::os::raw::c_int);
793
794 pub static jit_type_void: jit_type_t;
795
796 pub static jit_type_sbyte: jit_type_t;
797
798 pub static jit_type_ubyte: jit_type_t;
799
800 pub static jit_type_short: jit_type_t;
801
802 pub static jit_type_ushort: jit_type_t;
803
804 pub static jit_type_int: jit_type_t;
805
806 pub static jit_type_uint: jit_type_t;
807
808 pub static jit_type_nint: jit_type_t;
809
810 pub static jit_type_nuint: jit_type_t;
811
812 pub static jit_type_long: jit_type_t;
813
814 pub static jit_type_ulong: jit_type_t;
815
816 pub static jit_type_float32: jit_type_t;
817
818 pub static jit_type_float64: jit_type_t;
819
820 pub static jit_type_nfloat: jit_type_t;
821
822 pub static jit_type_void_ptr: jit_type_t;
823
824 pub static jit_type_sys_bool: jit_type_t;
825
826 pub static jit_type_sys_char: jit_type_t;
827
828 pub static jit_type_sys_schar: jit_type_t;
829
830 pub static jit_type_sys_uchar: jit_type_t;
831
832 pub static jit_type_sys_short: jit_type_t;
833
834 pub static jit_type_sys_ushort: jit_type_t;
835
836 pub static jit_type_sys_int: jit_type_t;
837
838 pub static jit_type_sys_uint: jit_type_t;
839
840 pub static jit_type_sys_long: jit_type_t;
841
842 pub static jit_type_sys_ulong: jit_type_t;
843
844 pub static jit_type_sys_longlong: jit_type_t;
845
846 pub static jit_type_sys_ulonglong: jit_type_t;
847
848 pub static jit_type_sys_float: jit_type_t;
849
850 pub static jit_type_sys_double: jit_type_t;
851
852 pub static jit_type_sys_long_double: jit_type_t;
853}
854pub const jit_abi_t_jit_abi_cdecl: jit_abi_t = 0;
855pub const jit_abi_t_jit_abi_vararg: jit_abi_t = 1;
856pub const jit_abi_t_jit_abi_stdcall: jit_abi_t = 2;
857pub const jit_abi_t_jit_abi_fastcall: jit_abi_t = 3;
858pub type jit_abi_t = ::std::os::raw::c_uint;
859extern "C" {
860 pub fn jit_type_copy(type_: jit_type_t) -> jit_type_t;
861
862 pub fn jit_type_free(type_: jit_type_t);
863
864 pub fn jit_type_create_struct(
865 fields: *mut jit_type_t,
866 num_fields: ::std::os::raw::c_uint,
867 incref: ::std::os::raw::c_int,
868 ) -> jit_type_t;
869
870 pub fn jit_type_create_union(
871 fields: *mut jit_type_t,
872 num_fields: ::std::os::raw::c_uint,
873 incref: ::std::os::raw::c_int,
874 ) -> jit_type_t;
875
876 pub fn jit_type_create_signature(
877 abi: jit_abi_t,
878 return_type: jit_type_t,
879 params: *mut jit_type_t,
880 num_params: ::std::os::raw::c_uint,
881 incref: ::std::os::raw::c_int,
882 ) -> jit_type_t;
883
884 pub fn jit_type_create_pointer(type_: jit_type_t, incref: ::std::os::raw::c_int) -> jit_type_t;
885
886 pub fn jit_type_create_tagged(
887 type_: jit_type_t,
888 kind: ::std::os::raw::c_int,
889 data: *mut ::std::os::raw::c_void,
890 free_func: jit_meta_free_func,
891 incref: ::std::os::raw::c_int,
892 ) -> jit_type_t;
893
894 pub fn jit_type_set_names(
895 type_: jit_type_t,
896 names: *mut *mut ::std::os::raw::c_char,
897 num_names: ::std::os::raw::c_uint,
898 ) -> ::std::os::raw::c_int;
899
900 pub fn jit_type_set_size_and_alignment(type_: jit_type_t, size: jit_nint, alignment: jit_nint);
901
902 pub fn jit_type_set_offset(
903 type_: jit_type_t,
904 field_index: ::std::os::raw::c_uint,
905 offset: jit_nuint,
906 );
907
908 pub fn jit_type_get_kind(type_: jit_type_t) -> ::std::os::raw::c_int;
909
910 pub fn jit_type_get_size(type_: jit_type_t) -> jit_nuint;
911
912 pub fn jit_type_get_alignment(type_: jit_type_t) -> jit_nuint;
913
914 pub fn jit_type_best_alignment() -> jit_nuint;
915
916 pub fn jit_type_num_fields(type_: jit_type_t) -> ::std::os::raw::c_uint;
917
918 pub fn jit_type_get_field(type_: jit_type_t, field_index: ::std::os::raw::c_uint)
919 -> jit_type_t;
920
921 pub fn jit_type_get_offset(type_: jit_type_t, field_index: ::std::os::raw::c_uint)
922 -> jit_nuint;
923
924 pub fn jit_type_get_name(
925 type_: jit_type_t,
926 index: ::std::os::raw::c_uint,
927 ) -> *const ::std::os::raw::c_char;
928
929 pub fn jit_type_find_name(
930 type_: jit_type_t,
931 name: *const ::std::os::raw::c_char,
932 ) -> ::std::os::raw::c_uint;
933
934 pub fn jit_type_num_params(type_: jit_type_t) -> ::std::os::raw::c_uint;
935
936 pub fn jit_type_get_return(type_: jit_type_t) -> jit_type_t;
937
938 pub fn jit_type_get_param(type_: jit_type_t, param_index: ::std::os::raw::c_uint)
939 -> jit_type_t;
940
941 pub fn jit_type_get_abi(type_: jit_type_t) -> jit_abi_t;
942
943 pub fn jit_type_get_ref(type_: jit_type_t) -> jit_type_t;
944
945 pub fn jit_type_get_tagged_type(type_: jit_type_t) -> jit_type_t;
946
947 pub fn jit_type_set_tagged_type(
948 type_: jit_type_t,
949 underlying: jit_type_t,
950 incref: ::std::os::raw::c_int,
951 );
952
953 pub fn jit_type_get_tagged_kind(type_: jit_type_t) -> ::std::os::raw::c_int;
954
955 pub fn jit_type_get_tagged_data(type_: jit_type_t) -> *mut ::std::os::raw::c_void;
956
957 pub fn jit_type_set_tagged_data(
958 type_: jit_type_t,
959 data: *mut ::std::os::raw::c_void,
960 free_func: jit_meta_free_func,
961 );
962
963 pub fn jit_type_is_primitive(type_: jit_type_t) -> ::std::os::raw::c_int;
964
965 pub fn jit_type_is_struct(type_: jit_type_t) -> ::std::os::raw::c_int;
966
967 pub fn jit_type_is_union(type_: jit_type_t) -> ::std::os::raw::c_int;
968
969 pub fn jit_type_is_signature(type_: jit_type_t) -> ::std::os::raw::c_int;
970
971 pub fn jit_type_is_pointer(type_: jit_type_t) -> ::std::os::raw::c_int;
972
973 pub fn jit_type_is_tagged(type_: jit_type_t) -> ::std::os::raw::c_int;
974
975 pub fn jit_type_remove_tags(type_: jit_type_t) -> jit_type_t;
976
977 pub fn jit_type_normalize(type_: jit_type_t) -> jit_type_t;
978
979 pub fn jit_type_promote_int(type_: jit_type_t) -> jit_type_t;
980
981 pub fn jit_type_return_via_pointer(type_: jit_type_t) -> ::std::os::raw::c_int;
982
983 pub fn jit_type_has_tag(
984 type_: jit_type_t,
985 kind: ::std::os::raw::c_int,
986 ) -> ::std::os::raw::c_int;
987}
988pub type jit_closure_func = ::std::option::Option<
989 unsafe extern "C" fn(
990 signature: jit_type_t,
991 result: *mut ::std::os::raw::c_void,
992 args: *mut *mut ::std::os::raw::c_void,
993 user_data: *mut ::std::os::raw::c_void,
994 ),
995>;
996pub type jit_closure_va_list = c_void;
997pub type jit_closure_va_list_t = *mut jit_closure_va_list;
998extern "C" {
999 pub fn jit_apply(
1000 signature: jit_type_t,
1001 func: *mut ::std::os::raw::c_void,
1002 args: *mut *mut ::std::os::raw::c_void,
1003 num_fixed_args: ::std::os::raw::c_uint,
1004 return_value: *mut ::std::os::raw::c_void,
1005 );
1006
1007 pub fn jit_apply_raw(
1008 signature: jit_type_t,
1009 func: *mut ::std::os::raw::c_void,
1010 args: *mut ::std::os::raw::c_void,
1011 return_value: *mut ::std::os::raw::c_void,
1012 );
1013
1014 pub fn jit_raw_supported(signature: jit_type_t) -> ::std::os::raw::c_int;
1015
1016 pub fn jit_closure_create(
1017 context: jit_context_t,
1018 signature: jit_type_t,
1019 func: jit_closure_func,
1020 user_data: *mut ::std::os::raw::c_void,
1021 ) -> *mut ::std::os::raw::c_void;
1022
1023 pub fn jit_closure_va_get_nint(va: jit_closure_va_list_t) -> jit_nint;
1024
1025 pub fn jit_closure_va_get_nuint(va: jit_closure_va_list_t) -> jit_nuint;
1026
1027 pub fn jit_closure_va_get_long(va: jit_closure_va_list_t) -> jit_long;
1028
1029 pub fn jit_closure_va_get_ulong(va: jit_closure_va_list_t) -> jit_ulong;
1030
1031 pub fn jit_closure_va_get_float32(va: jit_closure_va_list_t) -> jit_float32;
1032
1033 pub fn jit_closure_va_get_float64(va: jit_closure_va_list_t) -> jit_float64;
1034
1035 pub fn jit_closure_va_get_nfloat(va: jit_closure_va_list_t) -> jit_nfloat;
1036
1037 pub fn jit_closure_va_get_ptr(va: jit_closure_va_list_t) -> *mut ::std::os::raw::c_void;
1038
1039 pub fn jit_closure_va_get_struct(
1040 va: jit_closure_va_list_t,
1041 buf: *mut ::std::os::raw::c_void,
1042 type_: jit_type_t,
1043 );
1044
1045 pub fn jit_block_get_function(block: jit_block_t) -> jit_function_t;
1047
1048 pub fn jit_block_get_context(block: jit_block_t) -> jit_context_t;
1050
1051 pub fn jit_block_get_label(block: jit_block_t) -> jit_label_t;
1053
1054 pub fn jit_block_get_next_label(block: jit_block_t, label: jit_label_t) -> jit_label_t;
1056
1057 pub fn jit_block_next(func: jit_function_t, previous: jit_block_t) -> jit_block_t;
1059
1060 pub fn jit_block_previous(func: jit_function_t, previous: jit_block_t) -> jit_block_t;
1062
1063 pub fn jit_block_from_label(func: jit_function_t, label: jit_label_t) -> jit_block_t;
1065
1066 pub fn jit_block_set_meta(
1070 block: jit_block_t,
1071 type_: ::std::os::raw::c_int,
1072 data: *mut ::std::os::raw::c_void,
1073 free_data: jit_meta_free_func,
1074 ) -> ::std::os::raw::c_int;
1075
1076 pub fn jit_block_get_meta(
1078 block: jit_block_t,
1079 type_: ::std::os::raw::c_int,
1080 ) -> *mut ::std::os::raw::c_void;
1081
1082 pub fn jit_block_free_meta(block: jit_block_t, type_: ::std::os::raw::c_int);
1084
1085 pub fn jit_block_is_reachable(block: jit_block_t) -> ::std::os::raw::c_int;
1087
1088 pub fn jit_block_ends_in_dead(block: jit_block_t) -> ::std::os::raw::c_int;
1090
1091 pub fn jit_block_current_is_dead(func: jit_function_t) -> ::std::os::raw::c_int;
1093}
1094pub type jit_debugger = c_void;
1095pub type jit_debugger_t = *mut jit_debugger;
1096pub type jit_debugger_thread_id_t = jit_nint;
1097pub type jit_debugger_breakpoint_id_t = jit_nint;
1098#[repr(C)]
1099#[derive(Debug, Copy, Clone)]
1100pub struct jit_debugger_event {
1101 pub type_: ::std::os::raw::c_int,
1102 pub thread: jit_debugger_thread_id_t,
1103 pub function: jit_function_t,
1104 pub data1: jit_nint,
1105 pub data2: jit_nint,
1106 pub id: jit_debugger_breakpoint_id_t,
1107 pub trace: jit_stack_trace_t,
1108}
1109pub type jit_debugger_event_t = jit_debugger_event;
1110#[repr(C)]
1111#[derive(Debug, Copy, Clone)]
1112pub struct jit_debugger_breakpoint_info {
1113 pub flags: ::std::os::raw::c_int,
1114 pub thread: jit_debugger_thread_id_t,
1115 pub function: jit_function_t,
1116 pub data1: jit_nint,
1117 pub data2: jit_nint,
1118}
1119pub type jit_debugger_breakpoint_info_t = *mut jit_debugger_breakpoint_info;
1120pub type jit_debugger_hook_func = ::std::option::Option<
1121 unsafe extern "C" fn(func: jit_function_t, data1: jit_nint, data2: jit_nint),
1122>;
1123extern "C" {
1124 pub fn jit_debugging_possible() -> ::std::os::raw::c_int;
1125
1126 pub fn jit_debugger_create(context: jit_context_t) -> jit_debugger_t;
1127
1128 pub fn jit_debugger_destroy(dbg: jit_debugger_t);
1129
1130 pub fn jit_debugger_get_context(dbg: jit_debugger_t) -> jit_context_t;
1131
1132 pub fn jit_debugger_from_context(context: jit_context_t) -> jit_debugger_t;
1133
1134 pub fn jit_debugger_get_self(dbg: jit_debugger_t) -> jit_debugger_thread_id_t;
1135
1136 pub fn jit_debugger_get_thread(
1137 dbg: jit_debugger_t,
1138 native_thread: *const ::std::os::raw::c_void,
1139 ) -> jit_debugger_thread_id_t;
1140
1141 pub fn jit_debugger_get_native_thread(
1142 dbg: jit_debugger_t,
1143 thread: jit_debugger_thread_id_t,
1144 native_thread: *mut ::std::os::raw::c_void,
1145 ) -> ::std::os::raw::c_int;
1146
1147 pub fn jit_debugger_set_breakable(
1148 dbg: jit_debugger_t,
1149 native_thread: *const ::std::os::raw::c_void,
1150 flag: ::std::os::raw::c_int,
1151 );
1152
1153 pub fn jit_debugger_attach_self(dbg: jit_debugger_t, stop_immediately: ::std::os::raw::c_int);
1154
1155 pub fn jit_debugger_detach_self(dbg: jit_debugger_t);
1156
1157 pub fn jit_debugger_wait_event(
1158 dbg: jit_debugger_t,
1159 event: *mut jit_debugger_event_t,
1160 timeout: jit_int,
1161 ) -> ::std::os::raw::c_int;
1162
1163 pub fn jit_debugger_add_breakpoint(
1164 dbg: jit_debugger_t,
1165 info: jit_debugger_breakpoint_info_t,
1166 ) -> jit_debugger_breakpoint_id_t;
1167
1168 pub fn jit_debugger_remove_breakpoint(dbg: jit_debugger_t, id: jit_debugger_breakpoint_id_t);
1169
1170 pub fn jit_debugger_remove_all_breakpoints(dbg: jit_debugger_t);
1171
1172 pub fn jit_debugger_is_alive(
1173 dbg: jit_debugger_t,
1174 thread: jit_debugger_thread_id_t,
1175 ) -> ::std::os::raw::c_int;
1176
1177 pub fn jit_debugger_is_running(
1178 dbg: jit_debugger_t,
1179 thread: jit_debugger_thread_id_t,
1180 ) -> ::std::os::raw::c_int;
1181
1182 pub fn jit_debugger_run(dbg: jit_debugger_t, thread: jit_debugger_thread_id_t);
1183
1184 pub fn jit_debugger_step(dbg: jit_debugger_t, thread: jit_debugger_thread_id_t);
1185
1186 pub fn jit_debugger_next(dbg: jit_debugger_t, thread: jit_debugger_thread_id_t);
1187
1188 pub fn jit_debugger_finish(dbg: jit_debugger_t, thread: jit_debugger_thread_id_t);
1189
1190 pub fn jit_debugger_break(dbg: jit_debugger_t);
1191
1192 pub fn jit_debugger_quit(dbg: jit_debugger_t);
1193
1194 pub fn jit_debugger_set_hook(
1195 context: jit_context_t,
1196 hook: jit_debugger_hook_func,
1197 ) -> jit_debugger_hook_func;
1198
1199 pub fn jit_dump_type(stream: *mut FILE, type_: jit_type_t);
1200
1201 pub fn jit_dump_value(
1202 stream: *mut FILE,
1203 func: jit_function_t,
1204 value: jit_value_t,
1205 prefix: *const ::std::os::raw::c_char,
1206 );
1207
1208 pub fn jit_dump_insn(stream: *mut FILE, func: jit_function_t, insn: jit_insn_t);
1209
1210 pub fn jit_dump_function(
1211 stream: *mut FILE,
1212 func: jit_function_t,
1213 name: *const ::std::os::raw::c_char,
1214 );
1215}
1216pub type jit_readelf = c_void;
1217pub type jit_readelf_t = *mut jit_readelf;
1218pub type jit_writeelf = c_void;
1219pub type jit_writeelf_t = *mut jit_writeelf;
1220extern "C" {
1221 pub fn jit_readelf_open(
1222 readelf: *mut jit_readelf_t,
1223 filename: *const ::std::os::raw::c_char,
1224 flags: ::std::os::raw::c_int,
1225 ) -> ::std::os::raw::c_int;
1226
1227 pub fn jit_readelf_close(readelf: jit_readelf_t);
1228
1229 pub fn jit_readelf_get_name(readelf: jit_readelf_t) -> *const ::std::os::raw::c_char;
1230
1231 pub fn jit_readelf_get_symbol(
1232 readelf: jit_readelf_t,
1233 name: *const ::std::os::raw::c_char,
1234 ) -> *mut ::std::os::raw::c_void;
1235
1236 pub fn jit_readelf_get_section(
1237 readelf: jit_readelf_t,
1238 name: *const ::std::os::raw::c_char,
1239 size: *mut jit_nuint,
1240 ) -> *mut ::std::os::raw::c_void;
1241
1242 pub fn jit_readelf_get_section_by_type(
1243 readelf: jit_readelf_t,
1244 type_: jit_int,
1245 size: *mut jit_nuint,
1246 ) -> *mut ::std::os::raw::c_void;
1247
1248 pub fn jit_readelf_map_vaddr(
1249 readelf: jit_readelf_t,
1250 vaddr: jit_nuint,
1251 ) -> *mut ::std::os::raw::c_void;
1252
1253 pub fn jit_readelf_num_needed(readelf: jit_readelf_t) -> ::std::os::raw::c_uint;
1254
1255 pub fn jit_readelf_get_needed(
1256 readelf: jit_readelf_t,
1257 index: ::std::os::raw::c_uint,
1258 ) -> *const ::std::os::raw::c_char;
1259
1260 pub fn jit_readelf_add_to_context(readelf: jit_readelf_t, context: jit_context_t);
1261
1262 pub fn jit_readelf_resolve_all(
1263 context: jit_context_t,
1264 print_failures: ::std::os::raw::c_int,
1265 ) -> ::std::os::raw::c_int;
1266
1267 pub fn jit_readelf_register_symbol(
1268 context: jit_context_t,
1269 name: *const ::std::os::raw::c_char,
1270 value: *mut ::std::os::raw::c_void,
1271 after: ::std::os::raw::c_int,
1272 ) -> ::std::os::raw::c_int;
1273
1274 pub fn jit_writeelf_create(library_name: *const ::std::os::raw::c_char) -> jit_writeelf_t;
1275
1276 pub fn jit_writeelf_destroy(writeelf: jit_writeelf_t);
1277
1278 pub fn jit_writeelf_write(
1279 writeelf: jit_writeelf_t,
1280 filename: *const ::std::os::raw::c_char,
1281 ) -> ::std::os::raw::c_int;
1282
1283 pub fn jit_writeelf_add_function(
1284 writeelf: jit_writeelf_t,
1285 func: jit_function_t,
1286 name: *const ::std::os::raw::c_char,
1287 ) -> ::std::os::raw::c_int;
1288
1289 pub fn jit_writeelf_add_needed(
1290 writeelf: jit_writeelf_t,
1291 library_name: *const ::std::os::raw::c_char,
1292 ) -> ::std::os::raw::c_int;
1293
1294 pub fn jit_writeelf_write_section(
1295 writeelf: jit_writeelf_t,
1296 name: *const ::std::os::raw::c_char,
1297 type_: jit_int,
1298 buf: *const ::std::os::raw::c_void,
1299 len: ::std::os::raw::c_uint,
1300 discardable: ::std::os::raw::c_int,
1301 ) -> ::std::os::raw::c_int;
1302}
1303pub type jit_exception_func = ::std::option::Option<
1304 unsafe extern "C" fn(exception_type: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_void,
1305>;
1306extern "C" {
1307 pub fn jit_exception_get_last() -> *mut ::std::os::raw::c_void;
1309
1310 pub fn jit_exception_get_last_and_clear() -> *mut ::std::os::raw::c_void;
1312
1313 pub fn jit_exception_set_last(object: *mut ::std::os::raw::c_void);
1315
1316 pub fn jit_exception_clear_last();
1318
1319 pub fn jit_exception_throw(object: *mut ::std::os::raw::c_void);
1323
1324 pub fn jit_exception_builtin(exception_type: ::std::os::raw::c_int);
1344
1345 pub fn jit_exception_set_handler(handler: jit_exception_func) -> jit_exception_func;
1347
1348 pub fn jit_exception_get_handler() -> jit_exception_func;
1350
1351 pub fn jit_exception_get_stack_trace() -> jit_stack_trace_t;
1353
1354 pub fn jit_stack_trace_get_size(trace: jit_stack_trace_t) -> ::std::os::raw::c_uint;
1356
1357 pub fn jit_stack_trace_get_function(
1359 context: jit_context_t,
1360 trace: jit_stack_trace_t,
1361 posn: ::std::os::raw::c_uint,
1362 ) -> jit_function_t;
1363
1364 pub fn jit_stack_trace_get_pc(
1366 trace: jit_stack_trace_t,
1367 posn: ::std::os::raw::c_uint,
1368 ) -> *mut ::std::os::raw::c_void;
1369
1370 pub fn jit_stack_trace_get_offset(
1372 context: jit_context_t,
1373 trace: jit_stack_trace_t,
1374 posn: ::std::os::raw::c_uint,
1375 ) -> ::std::os::raw::c_uint;
1376
1377 pub fn jit_stack_trace_free(trace: jit_stack_trace_t);
1379
1380 pub fn jit_function_create(context: jit_context_t, signature: jit_type_t) -> jit_function_t;
1381
1382 pub fn jit_function_create_nested(
1383 context: jit_context_t,
1384 signature: jit_type_t,
1385 parent: jit_function_t,
1386 ) -> jit_function_t;
1387
1388 pub fn jit_function_abandon(func: jit_function_t);
1389
1390 pub fn jit_function_get_context(func: jit_function_t) -> jit_context_t;
1391
1392 pub fn jit_function_get_signature(func: jit_function_t) -> jit_type_t;
1393
1394 pub fn jit_function_set_meta(
1395 func: jit_function_t,
1396 type_: ::std::os::raw::c_int,
1397 data: *mut ::std::os::raw::c_void,
1398 free_data: jit_meta_free_func,
1399 build_only: ::std::os::raw::c_int,
1400 ) -> ::std::os::raw::c_int;
1401
1402 pub fn jit_function_get_meta(
1403 func: jit_function_t,
1404 type_: ::std::os::raw::c_int,
1405 ) -> *mut ::std::os::raw::c_void;
1406
1407 pub fn jit_function_free_meta(func: jit_function_t, type_: ::std::os::raw::c_int);
1408
1409 pub fn jit_function_next(context: jit_context_t, prev: jit_function_t) -> jit_function_t;
1410
1411 pub fn jit_function_previous(context: jit_context_t, prev: jit_function_t) -> jit_function_t;
1412
1413 pub fn jit_function_get_entry(func: jit_function_t) -> jit_block_t;
1414
1415 pub fn jit_function_get_current(func: jit_function_t) -> jit_block_t;
1416
1417 pub fn jit_function_get_nested_parent(func: jit_function_t) -> jit_function_t;
1418
1419 pub fn jit_function_set_parent_frame(func: jit_function_t, parent_frame: jit_value_t);
1420
1421 pub fn jit_function_compile(func: jit_function_t) -> ::std::os::raw::c_int;
1422
1423 pub fn jit_function_is_compiled(func: jit_function_t) -> ::std::os::raw::c_int;
1424
1425 pub fn jit_function_set_recompilable(func: jit_function_t);
1426
1427 pub fn jit_function_clear_recompilable(func: jit_function_t);
1428
1429 pub fn jit_function_is_recompilable(func: jit_function_t) -> ::std::os::raw::c_int;
1430
1431 pub fn jit_function_compile_entry(
1432 func: jit_function_t,
1433 entry_point: *mut *mut ::std::os::raw::c_void,
1434 ) -> ::std::os::raw::c_int;
1435
1436 pub fn jit_function_setup_entry(func: jit_function_t, entry_point: *mut ::std::os::raw::c_void);
1437
1438 pub fn jit_function_to_closure(func: jit_function_t) -> *mut ::std::os::raw::c_void;
1439
1440 pub fn jit_function_from_closure(
1441 context: jit_context_t,
1442 closure: *mut ::std::os::raw::c_void,
1443 ) -> jit_function_t;
1444
1445 pub fn jit_function_from_pc(
1446 context: jit_context_t,
1447 pc: *mut ::std::os::raw::c_void,
1448 handler: *mut *mut ::std::os::raw::c_void,
1449 ) -> jit_function_t;
1450
1451 pub fn jit_function_to_vtable_pointer(func: jit_function_t) -> *mut ::std::os::raw::c_void;
1452
1453 pub fn jit_function_from_vtable_pointer(
1454 context: jit_context_t,
1455 vtable_pointer: *mut ::std::os::raw::c_void,
1456 ) -> jit_function_t;
1457
1458 pub fn jit_function_set_on_demand_compiler(func: jit_function_t, on_demand: jit_on_demand_func);
1459
1460 pub fn jit_function_get_on_demand_compiler(func: jit_function_t) -> jit_on_demand_func;
1461
1462 pub fn jit_function_apply(
1463 func: jit_function_t,
1464 args: *mut *mut ::std::os::raw::c_void,
1465 return_area: *mut ::std::os::raw::c_void,
1466 ) -> ::std::os::raw::c_int;
1467
1468 pub fn jit_function_apply_vararg(
1469 func: jit_function_t,
1470 signature: jit_type_t,
1471 args: *mut *mut ::std::os::raw::c_void,
1472 return_area: *mut ::std::os::raw::c_void,
1473 ) -> ::std::os::raw::c_int;
1474
1475 pub fn jit_function_set_optimization_level(func: jit_function_t, level: ::std::os::raw::c_uint);
1476
1477 pub fn jit_function_get_optimization_level(func: jit_function_t) -> ::std::os::raw::c_uint;
1478
1479 pub fn jit_function_get_max_optimization_level() -> ::std::os::raw::c_uint;
1480
1481 pub fn jit_function_reserve_label(func: jit_function_t) -> jit_label_t;
1482
1483 pub fn jit_function_labels_equal(
1484 func: jit_function_t,
1485 label: jit_label_t,
1486 label2: jit_label_t,
1487 ) -> ::std::os::raw::c_int;
1488
1489 pub fn jit_optimize(func: jit_function_t) -> ::std::os::raw::c_int;
1490
1491 pub fn jit_compile(func: jit_function_t) -> ::std::os::raw::c_int;
1492
1493 pub fn jit_compile_entry(
1494 func: jit_function_t,
1495 entry_point: *mut *mut ::std::os::raw::c_void,
1496 ) -> ::std::os::raw::c_int;
1497
1498 pub fn jit_init();
1499
1500 pub fn jit_uses_interpreter() -> ::std::os::raw::c_int;
1501
1502 pub fn jit_supports_threads() -> ::std::os::raw::c_int;
1503
1504 pub fn jit_supports_virtual_memory() -> ::std::os::raw::c_int;
1505
1506 pub fn jit_supports_closures() -> ::std::os::raw::c_int;
1507
1508 pub fn jit_get_closure_size() -> ::std::os::raw::c_uint;
1509
1510 pub fn jit_get_closure_alignment() -> ::std::os::raw::c_uint;
1511
1512 pub fn jit_get_trampoline_size() -> ::std::os::raw::c_uint;
1513
1514 pub fn jit_get_trampoline_alignment() -> ::std::os::raw::c_uint;
1515}
1516#[repr(C)]
1517#[derive(Debug, Copy, Clone)]
1518pub struct jit_intrinsic_descr_t {
1519 pub return_type: jit_type_t,
1520 pub ptr_result_type: jit_type_t,
1521 pub arg1_type: jit_type_t,
1522 pub arg2_type: jit_type_t,
1523}
1524#[repr(C)]
1525#[derive(Debug, Copy, Clone)]
1526pub struct jit_insn_iter_t {
1527 pub block: jit_block_t,
1528 pub posn: ::std::os::raw::c_int,
1529}
1530
1531extern "C" {
1532 pub fn jit_insn_get_opcode(insn: jit_insn_t) -> ::std::os::raw::c_int;
1534
1535 pub fn jit_insn_get_dest(insn: jit_insn_t) -> jit_value_t;
1537
1538 pub fn jit_insn_get_value1(insn: jit_insn_t) -> jit_value_t;
1540
1541 pub fn jit_insn_get_value2(insn: jit_insn_t) -> jit_value_t;
1543
1544 pub fn jit_insn_get_label(insn: jit_insn_t) -> jit_label_t;
1546
1547 pub fn jit_insn_get_function(insn: jit_insn_t) -> jit_function_t;
1549
1550 pub fn jit_insn_get_native(insn: jit_insn_t) -> *mut ::std::os::raw::c_void;
1552
1553 pub fn jit_insn_get_name(insn: jit_insn_t) -> *const ::std::os::raw::c_char;
1555
1556 pub fn jit_insn_get_signature(insn: jit_insn_t) -> jit_type_t;
1558
1559 pub fn jit_insn_dest_is_value(insn: jit_insn_t) -> ::std::os::raw::c_int;
1561
1562 pub fn jit_insn_label(func: jit_function_t, label: *mut jit_label_t) -> ::std::os::raw::c_int;
1566
1567 pub fn jit_insn_label_tight(
1571 func: jit_function_t,
1572 label: *mut jit_label_t,
1573 ) -> ::std::os::raw::c_int;
1574
1575 pub fn jit_insn_new_block(func: jit_function_t) -> ::std::os::raw::c_int;
1577
1578 pub fn jit_insn_load(func: jit_function_t, value: jit_value_t) -> jit_value_t;
1580
1581 pub fn jit_insn_dup(func: jit_function_t, value: jit_value_t) -> jit_value_t;
1583
1584 pub fn jit_insn_store(
1586 func: jit_function_t,
1587 dest: jit_value_t,
1588 value: jit_value_t,
1589 ) -> ::std::os::raw::c_int;
1590
1591 pub fn jit_insn_load_relative(
1593 func: jit_function_t,
1594 value: jit_value_t,
1595 offset: jit_nint,
1596 type_: jit_type_t,
1597 ) -> jit_value_t;
1598
1599 pub fn jit_insn_store_relative(
1601 func: jit_function_t,
1602 dest: jit_value_t,
1603 offset: jit_nint,
1604 value: jit_value_t,
1605 ) -> ::std::os::raw::c_int;
1606
1607 pub fn jit_insn_add_relative(
1609 func: jit_function_t,
1610 value: jit_value_t,
1611 offset: jit_nint,
1612 ) -> jit_value_t;
1613
1614 pub fn jit_insn_load_elem(
1616 func: jit_function_t,
1617 base_addr: jit_value_t,
1618 index: jit_value_t,
1619 elem_type: jit_type_t,
1620 ) -> jit_value_t;
1621
1622 pub fn jit_insn_load_elem_address(
1624 func: jit_function_t,
1625 base_addr: jit_value_t,
1626 index: jit_value_t,
1627 elem_type: jit_type_t,
1628 ) -> jit_value_t;
1629
1630 pub fn jit_insn_store_elem(
1632 func: jit_function_t,
1633 base_addr: jit_value_t,
1634 index: jit_value_t,
1635 value: jit_value_t,
1636 ) -> ::std::os::raw::c_int;
1637
1638 pub fn jit_insn_check_null(func: jit_function_t, value: jit_value_t) -> ::std::os::raw::c_int;
1640
1641 pub fn jit_insn_nop(func: jit_function_t) -> ::std::os::raw::c_int;
1643
1644 pub fn jit_insn_add(
1646 func: jit_function_t,
1647 value1: jit_value_t,
1648 value2: jit_value_t,
1649 ) -> jit_value_t;
1650
1651 pub fn jit_insn_add_ovf(
1653 func: jit_function_t,
1654 value1: jit_value_t,
1655 value2: jit_value_t,
1656 ) -> jit_value_t;
1657
1658 pub fn jit_insn_sub(
1660 func: jit_function_t,
1661 value1: jit_value_t,
1662 value2: jit_value_t,
1663 ) -> jit_value_t;
1664
1665 pub fn jit_insn_sub_ovf(
1667 func: jit_function_t,
1668 value1: jit_value_t,
1669 value2: jit_value_t,
1670 ) -> jit_value_t;
1671
1672 pub fn jit_insn_mul(
1674 func: jit_function_t,
1675 value1: jit_value_t,
1676 value2: jit_value_t,
1677 ) -> jit_value_t;
1678
1679 pub fn jit_insn_mul_ovf(
1681 func: jit_function_t,
1682 value1: jit_value_t,
1683 value2: jit_value_t,
1684 ) -> jit_value_t;
1685
1686 pub fn jit_insn_div(
1688 func: jit_function_t,
1689 value1: jit_value_t,
1690 value2: jit_value_t,
1691 ) -> jit_value_t;
1692
1693 pub fn jit_insn_rem(
1695 func: jit_function_t,
1696 value1: jit_value_t,
1697 value2: jit_value_t,
1698 ) -> jit_value_t;
1699
1700 pub fn jit_insn_rem_ieee(
1702 func: jit_function_t,
1703 value1: jit_value_t,
1704 value2: jit_value_t,
1705 ) -> jit_value_t;
1706
1707 pub fn jit_insn_neg(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1709
1710 pub fn jit_insn_and(
1712 func: jit_function_t,
1713 value1: jit_value_t,
1714 value2: jit_value_t,
1715 ) -> jit_value_t;
1716
1717 pub fn jit_insn_or(
1719 func: jit_function_t,
1720 value1: jit_value_t,
1721 value2: jit_value_t,
1722 ) -> jit_value_t;
1723
1724 pub fn jit_insn_xor(
1726 func: jit_function_t,
1727 value1: jit_value_t,
1728 value2: jit_value_t,
1729 ) -> jit_value_t;
1730
1731 pub fn jit_insn_not(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1733
1734 pub fn jit_insn_shl(
1736 func: jit_function_t,
1737 value1: jit_value_t,
1738 value2: jit_value_t,
1739 ) -> jit_value_t;
1740
1741 pub fn jit_insn_shr(
1743 func: jit_function_t,
1744 value1: jit_value_t,
1745 value2: jit_value_t,
1746 ) -> jit_value_t;
1747
1748 pub fn jit_insn_ushr(
1750 func: jit_function_t,
1751 value1: jit_value_t,
1752 value2: jit_value_t,
1753 ) -> jit_value_t;
1754
1755 pub fn jit_insn_sshr(
1757 func: jit_function_t,
1758 value1: jit_value_t,
1759 value2: jit_value_t,
1760 ) -> jit_value_t;
1761
1762 pub fn jit_insn_eq(
1764 func: jit_function_t,
1765 value1: jit_value_t,
1766 value2: jit_value_t,
1767 ) -> jit_value_t;
1768
1769 pub fn jit_insn_ne(
1771 func: jit_function_t,
1772 value1: jit_value_t,
1773 value2: jit_value_t,
1774 ) -> jit_value_t;
1775
1776 pub fn jit_insn_lt(
1778 func: jit_function_t,
1779 value1: jit_value_t,
1780 value2: jit_value_t,
1781 ) -> jit_value_t;
1782
1783 pub fn jit_insn_le(
1785 func: jit_function_t,
1786 value1: jit_value_t,
1787 value2: jit_value_t,
1788 ) -> jit_value_t;
1789
1790 pub fn jit_insn_gt(
1792 func: jit_function_t,
1793 value1: jit_value_t,
1794 value2: jit_value_t,
1795 ) -> jit_value_t;
1796
1797 pub fn jit_insn_ge(
1799 func: jit_function_t,
1800 value1: jit_value_t,
1801 value2: jit_value_t,
1802 ) -> jit_value_t;
1803
1804 pub fn jit_insn_cmpl(
1806 func: jit_function_t,
1807 value1: jit_value_t,
1808 value2: jit_value_t,
1809 ) -> jit_value_t;
1810
1811 pub fn jit_insn_cmpg(
1813 func: jit_function_t,
1814 value1: jit_value_t,
1815 value2: jit_value_t,
1816 ) -> jit_value_t;
1817
1818 pub fn jit_insn_to_bool(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1820
1821 pub fn jit_insn_to_not_bool(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1823
1824 pub fn jit_insn_acos(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1825
1826 pub fn jit_insn_asin(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1827
1828 pub fn jit_insn_atan(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1829
1830 pub fn jit_insn_atan2(
1831 func: jit_function_t,
1832 value1: jit_value_t,
1833 value2: jit_value_t,
1834 ) -> jit_value_t;
1835
1836 pub fn jit_insn_ceil(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1838
1839 pub fn jit_insn_cos(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1840
1841 pub fn jit_insn_cosh(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1842
1843 pub fn jit_insn_exp(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1844
1845 pub fn jit_insn_floor(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1847
1848 pub fn jit_insn_log(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1849
1850 pub fn jit_insn_log10(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1851
1852 pub fn jit_insn_pow(
1853 func: jit_function_t,
1854 value1: jit_value_t,
1855 value2: jit_value_t,
1856 ) -> jit_value_t;
1857
1858 pub fn jit_insn_rint(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1860
1861 pub fn jit_insn_round(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1863
1864 pub fn jit_insn_sin(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1865
1866 pub fn jit_insn_sinh(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1867
1868 pub fn jit_insn_sqrt(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1869
1870 pub fn jit_insn_tan(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1871
1872 pub fn jit_insn_tanh(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1873
1874 pub fn jit_insn_trunc(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1876
1877 pub fn jit_insn_is_nan(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1878
1879 pub fn jit_insn_is_finite(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1880
1881 pub fn jit_insn_is_inf(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1882
1883 pub fn jit_insn_abs(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1884
1885 pub fn jit_insn_min(
1886 func: jit_function_t,
1887 value1: jit_value_t,
1888 value2: jit_value_t,
1889 ) -> jit_value_t;
1890
1891 pub fn jit_insn_max(
1892 func: jit_function_t,
1893 value1: jit_value_t,
1894 value2: jit_value_t,
1895 ) -> jit_value_t;
1896
1897 pub fn jit_insn_sign(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1898
1899 pub fn jit_insn_branch(func: jit_function_t, label: *mut jit_label_t) -> ::std::os::raw::c_int;
1901
1902 pub fn jit_insn_branch_if(
1906 func: jit_function_t,
1907 value: jit_value_t,
1908 label: *mut jit_label_t,
1909 ) -> ::std::os::raw::c_int;
1910
1911 pub fn jit_insn_branch_if_not(
1915 func: jit_function_t,
1916 value: jit_value_t,
1917 label: *mut jit_label_t,
1918 ) -> ::std::os::raw::c_int;
1919
1920 pub fn jit_insn_jump_table(
1922 func: jit_function_t,
1923 value: jit_value_t,
1924 labels: *mut jit_label_t,
1925 num_labels: ::std::os::raw::c_uint,
1926 ) -> ::std::os::raw::c_int;
1927
1928 pub fn jit_insn_address_of(func: jit_function_t, value1: jit_value_t) -> jit_value_t;
1930
1931 pub fn jit_insn_address_of_label(func: jit_function_t, label: *mut jit_label_t) -> jit_value_t;
1933
1934 pub fn jit_insn_convert(
1936 func: jit_function_t,
1937 value: jit_value_t,
1938 type_: jit_type_t,
1939 overflow_check: ::std::os::raw::c_int,
1940 ) -> jit_value_t;
1941
1942 pub fn jit_insn_call(
1956 func: jit_function_t,
1957 name: *const ::std::os::raw::c_char,
1958 jit_func: jit_function_t,
1959 signature: jit_type_t,
1960 args: *mut jit_value_t,
1961 num_args: ::std::os::raw::c_uint,
1962 flags: ::std::os::raw::c_int,
1963 ) -> jit_value_t;
1964
1965 pub fn jit_insn_call_indirect(
1967 func: jit_function_t,
1968 value: jit_value_t,
1969 signature: jit_type_t,
1970 args: *mut jit_value_t,
1971 num_args: ::std::os::raw::c_uint,
1972 flags: ::std::os::raw::c_int,
1973 ) -> jit_value_t;
1974
1975 pub fn jit_insn_call_nested_indirect(
1977 func: jit_function_t,
1978 value: jit_value_t,
1979 parent_frame: jit_value_t,
1980 signature: jit_type_t,
1981 args: *mut jit_value_t,
1982 num_args: ::std::os::raw::c_uint,
1983 flags: ::std::os::raw::c_int,
1984 ) -> jit_value_t;
1985
1986 pub fn jit_insn_call_indirect_vtable(
1988 func: jit_function_t,
1989 value: jit_value_t,
1990 signature: jit_type_t,
1991 args: *mut jit_value_t,
1992 num_args: ::std::os::raw::c_uint,
1993 flags: ::std::os::raw::c_int,
1994 ) -> jit_value_t;
1995
1996 pub fn jit_insn_call_native(
1998 func: jit_function_t,
1999 name: *const ::std::os::raw::c_char,
2000 native_func: *mut ::std::os::raw::c_void,
2001 signature: jit_type_t,
2002 args: *mut jit_value_t,
2003 num_args: ::std::os::raw::c_uint,
2004 flags: ::std::os::raw::c_int,
2005 ) -> jit_value_t;
2006
2007 pub fn jit_insn_call_intrinsic(
2022 func: jit_function_t,
2023 name: *const ::std::os::raw::c_char,
2024 intrinsic_func: *mut ::std::os::raw::c_void,
2025 descriptor: *const jit_intrinsic_descr_t,
2026 arg1: jit_value_t,
2027 arg2: jit_value_t,
2028 ) -> jit_value_t;
2029
2030 pub fn jit_insn_incoming_reg(
2034 func: jit_function_t,
2035 value: jit_value_t,
2036 reg: ::std::os::raw::c_int,
2037 ) -> ::std::os::raw::c_int;
2038
2039 pub fn jit_insn_incoming_frame_posn(
2043 func: jit_function_t,
2044 value: jit_value_t,
2045 frame_offset: jit_nint,
2046 ) -> ::std::os::raw::c_int;
2047
2048 pub fn jit_insn_outgoing_reg(
2052 func: jit_function_t,
2053 value: jit_value_t,
2054 reg: ::std::os::raw::c_int,
2055 ) -> ::std::os::raw::c_int;
2056
2057 pub fn jit_insn_outgoing_frame_posn(
2061 func: jit_function_t,
2062 value: jit_value_t,
2063 frame_offset: jit_nint,
2064 ) -> ::std::os::raw::c_int;
2065
2066 pub fn jit_insn_return_reg(
2070 func: jit_function_t,
2071 value: jit_value_t,
2072 reg: ::std::os::raw::c_int,
2073 ) -> ::std::os::raw::c_int;
2074
2075 pub fn jit_insn_setup_for_nested(
2076 func: jit_function_t,
2077 nested_level: ::std::os::raw::c_int,
2078 reg: ::std::os::raw::c_int,
2079 ) -> ::std::os::raw::c_int;
2080
2081 pub fn jit_insn_flush_struct(func: jit_function_t, value: jit_value_t)
2083 -> ::std::os::raw::c_int;
2084
2085 pub fn jit_insn_get_frame_pointer(func: jit_function_t) -> jit_value_t;
2087
2088 pub fn jit_insn_get_parent_frame_pointer_of(
2090 func: jit_function_t,
2091 target: jit_function_t,
2092 ) -> jit_value_t;
2093
2094 pub fn jit_insn_import(func: jit_function_t, value: jit_value_t) -> jit_value_t;
2096
2097 pub fn jit_insn_push(func: jit_function_t, value: jit_value_t) -> ::std::os::raw::c_int;
2099
2100 pub fn jit_insn_push_ptr(
2104 func: jit_function_t,
2105 value: jit_value_t,
2106 type_: jit_type_t,
2107 ) -> ::std::os::raw::c_int;
2108
2109 pub fn jit_insn_set_param(
2113 func: jit_function_t,
2114 value: jit_value_t,
2115 offset: jit_nint,
2116 ) -> ::std::os::raw::c_int;
2117
2118 pub fn jit_insn_set_param_ptr(
2120 func: jit_function_t,
2121 value: jit_value_t,
2122 type_: jit_type_t,
2123 offset: jit_nint,
2124 ) -> ::std::os::raw::c_int;
2125
2126 pub fn jit_insn_push_return_area_ptr(func: jit_function_t) -> ::std::os::raw::c_int;
2128
2129 pub fn jit_insn_pop_stack(func: jit_function_t, num_items: jit_nint) -> ::std::os::raw::c_int;
2131
2132 pub fn jit_insn_defer_pop_stack(
2134 func: jit_function_t,
2135 num_items: jit_nint,
2136 ) -> ::std::os::raw::c_int;
2137
2138 pub fn jit_insn_flush_defer_pop(
2140 func: jit_function_t,
2141 num_items: jit_nint,
2142 ) -> ::std::os::raw::c_int;
2143
2144 pub fn jit_insn_return(func: jit_function_t, value: jit_value_t) -> ::std::os::raw::c_int;
2146
2147 pub fn jit_insn_return_ptr(
2149 func: jit_function_t,
2150 value: jit_value_t,
2151 type_: jit_type_t,
2152 ) -> ::std::os::raw::c_int;
2153
2154 pub fn jit_insn_default_return(func: jit_function_t) -> ::std::os::raw::c_int;
2158
2159 pub fn jit_insn_throw(func: jit_function_t, value: jit_value_t) -> ::std::os::raw::c_int;
2161
2162 pub fn jit_insn_get_call_stack(func: jit_function_t) -> jit_value_t;
2164
2165 pub fn jit_insn_thrown_exception(func: jit_function_t) -> jit_value_t;
2167
2168 pub fn jit_insn_uses_catcher(func: jit_function_t) -> ::std::os::raw::c_int;
2170
2171 pub fn jit_insn_start_catcher(func: jit_function_t) -> jit_value_t;
2173
2174 pub fn jit_insn_branch_if_pc_not_in_range(
2176 func: jit_function_t,
2177 start_label: jit_label_t,
2178 end_label: jit_label_t,
2179 label: *mut jit_label_t,
2180 ) -> ::std::os::raw::c_int;
2181
2182 pub fn jit_insn_rethrow_unhandled(func: jit_function_t) -> ::std::os::raw::c_int;
2186
2187 pub fn jit_insn_start_finally(
2189 func: jit_function_t,
2190 finally_label: *mut jit_label_t,
2191 ) -> ::std::os::raw::c_int;
2192
2193 pub fn jit_insn_return_from_finally(func: jit_function_t) -> ::std::os::raw::c_int;
2195
2196 pub fn jit_insn_call_finally(
2198 func: jit_function_t,
2199 finally_label: *mut jit_label_t,
2200 ) -> ::std::os::raw::c_int;
2201
2202 pub fn jit_insn_start_filter(
2208 func: jit_function_t,
2209 label: *mut jit_label_t,
2210 type_: jit_type_t,
2211 ) -> jit_value_t;
2212
2213 pub fn jit_insn_return_from_filter(
2215 func: jit_function_t,
2216 value: jit_value_t,
2217 ) -> ::std::os::raw::c_int;
2218
2219 pub fn jit_insn_call_filter(
2221 func: jit_function_t,
2222 label: *mut jit_label_t,
2223 value: jit_value_t,
2224 type_: jit_type_t,
2225 ) -> jit_value_t;
2226
2227 pub fn jit_insn_memcpy(
2229 func: jit_function_t,
2230 dest: jit_value_t,
2231 src: jit_value_t,
2232 size: jit_value_t,
2233 ) -> ::std::os::raw::c_int;
2234
2235 pub fn jit_insn_memmove(
2237 func: jit_function_t,
2238 dest: jit_value_t,
2239 src: jit_value_t,
2240 size: jit_value_t,
2241 ) -> ::std::os::raw::c_int;
2242
2243 pub fn jit_insn_memset(
2245 func: jit_function_t,
2246 dest: jit_value_t,
2247 value: jit_value_t,
2248 size: jit_value_t,
2249 ) -> ::std::os::raw::c_int;
2250
2251 pub fn jit_insn_alloca(func: jit_function_t, size: jit_value_t) -> jit_value_t;
2253
2254 pub fn jit_insn_move_blocks_to_end(
2256 func: jit_function_t,
2257 from_label: jit_label_t,
2258 to_label: jit_label_t,
2259 ) -> ::std::os::raw::c_int;
2260
2261 pub fn jit_insn_move_blocks_to_start(
2263 func: jit_function_t,
2264 from_label: jit_label_t,
2265 to_label: jit_label_t,
2266 ) -> ::std::os::raw::c_int;
2267
2268 pub fn jit_insn_mark_offset(func: jit_function_t, offset: jit_int) -> ::std::os::raw::c_int;
2270
2271 pub fn jit_insn_mark_breakpoint(
2305 func: jit_function_t,
2306 data1: jit_nint,
2307 data2: jit_nint,
2308 ) -> ::std::os::raw::c_int;
2309
2310 pub fn jit_insn_mark_breakpoint_variable(
2311 func: jit_function_t,
2312 data1: jit_value_t,
2313 data2: jit_value_t,
2314 ) -> ::std::os::raw::c_int;
2315
2316 pub fn jit_insn_iter_init(iter: *mut jit_insn_iter_t, block: jit_block_t);
2318
2319 pub fn jit_insn_iter_init_last(iter: *mut jit_insn_iter_t, block: jit_block_t);
2321
2322 pub fn jit_insn_iter_next(iter: *mut jit_insn_iter_t) -> jit_insn_t;
2324
2325 pub fn jit_insn_iter_previous(iter: *mut jit_insn_iter_t) -> jit_insn_t;
2327
2328 pub fn jit_int_add(value1: jit_int, value2: jit_int) -> jit_int;
2329
2330 pub fn jit_int_sub(value1: jit_int, value2: jit_int) -> jit_int;
2331
2332 pub fn jit_int_mul(value1: jit_int, value2: jit_int) -> jit_int;
2333
2334 pub fn jit_int_div(result: *mut jit_int, value1: jit_int, value2: jit_int) -> jit_int;
2335
2336 pub fn jit_int_rem(result: *mut jit_int, value1: jit_int, value2: jit_int) -> jit_int;
2337
2338 pub fn jit_int_add_ovf(result: *mut jit_int, value1: jit_int, value2: jit_int) -> jit_int;
2339
2340 pub fn jit_int_sub_ovf(result: *mut jit_int, value1: jit_int, value2: jit_int) -> jit_int;
2341
2342 pub fn jit_int_mul_ovf(result: *mut jit_int, value1: jit_int, value2: jit_int) -> jit_int;
2343
2344 pub fn jit_int_div_ovf(result: *mut jit_int, value1: jit_int, value2: jit_int) -> jit_int;
2345
2346 pub fn jit_int_rem_ovf(result: *mut jit_int, value1: jit_int, value2: jit_int) -> jit_int;
2347
2348 pub fn jit_int_neg(value1: jit_int) -> jit_int;
2349
2350 pub fn jit_int_and(value1: jit_int, value2: jit_int) -> jit_int;
2351
2352 pub fn jit_int_or(value1: jit_int, value2: jit_int) -> jit_int;
2353
2354 pub fn jit_int_xor(value1: jit_int, value2: jit_int) -> jit_int;
2355
2356 pub fn jit_int_not(value1: jit_int) -> jit_int;
2357
2358 pub fn jit_int_shl(value1: jit_int, value2: jit_uint) -> jit_int;
2359
2360 pub fn jit_int_shr(value1: jit_int, value2: jit_uint) -> jit_int;
2361
2362 pub fn jit_int_eq(value1: jit_int, value2: jit_int) -> jit_int;
2363
2364 pub fn jit_int_ne(value1: jit_int, value2: jit_int) -> jit_int;
2365
2366 pub fn jit_int_lt(value1: jit_int, value2: jit_int) -> jit_int;
2367
2368 pub fn jit_int_le(value1: jit_int, value2: jit_int) -> jit_int;
2369
2370 pub fn jit_int_gt(value1: jit_int, value2: jit_int) -> jit_int;
2371
2372 pub fn jit_int_ge(value1: jit_int, value2: jit_int) -> jit_int;
2373
2374 pub fn jit_int_cmp(value1: jit_int, value2: jit_int) -> jit_int;
2375
2376 pub fn jit_int_abs(value1: jit_int) -> jit_int;
2377
2378 pub fn jit_int_min(value1: jit_int, value2: jit_int) -> jit_int;
2379
2380 pub fn jit_int_max(value1: jit_int, value2: jit_int) -> jit_int;
2381
2382 pub fn jit_int_sign(value1: jit_int) -> jit_int;
2383
2384 pub fn jit_uint_add(value1: jit_uint, value2: jit_uint) -> jit_uint;
2385
2386 pub fn jit_uint_sub(value1: jit_uint, value2: jit_uint) -> jit_uint;
2387
2388 pub fn jit_uint_mul(value1: jit_uint, value2: jit_uint) -> jit_uint;
2389
2390 pub fn jit_uint_div(result: *mut jit_uint, value1: jit_uint, value2: jit_uint) -> jit_int;
2391
2392 pub fn jit_uint_rem(result: *mut jit_uint, value1: jit_uint, value2: jit_uint) -> jit_int;
2393
2394 pub fn jit_uint_add_ovf(result: *mut jit_uint, value1: jit_uint, value2: jit_uint) -> jit_int;
2395
2396 pub fn jit_uint_sub_ovf(result: *mut jit_uint, value1: jit_uint, value2: jit_uint) -> jit_int;
2397
2398 pub fn jit_uint_mul_ovf(result: *mut jit_uint, value1: jit_uint, value2: jit_uint) -> jit_int;
2399
2400 pub fn jit_uint_div_ovf(result: *mut jit_uint, value1: jit_uint, value2: jit_uint) -> jit_int;
2401
2402 pub fn jit_uint_rem_ovf(result: *mut jit_uint, value1: jit_uint, value2: jit_uint) -> jit_int;
2403
2404 pub fn jit_uint_neg(value1: jit_uint) -> jit_uint;
2405
2406 pub fn jit_uint_and(value1: jit_uint, value2: jit_uint) -> jit_uint;
2407
2408 pub fn jit_uint_or(value1: jit_uint, value2: jit_uint) -> jit_uint;
2409
2410 pub fn jit_uint_xor(value1: jit_uint, value2: jit_uint) -> jit_uint;
2411
2412 pub fn jit_uint_not(value1: jit_uint) -> jit_uint;
2413
2414 pub fn jit_uint_shl(value1: jit_uint, value2: jit_uint) -> jit_uint;
2415
2416 pub fn jit_uint_shr(value1: jit_uint, value2: jit_uint) -> jit_uint;
2417
2418 pub fn jit_uint_eq(value1: jit_uint, value2: jit_uint) -> jit_int;
2419
2420 pub fn jit_uint_ne(value1: jit_uint, value2: jit_uint) -> jit_int;
2421
2422 pub fn jit_uint_lt(value1: jit_uint, value2: jit_uint) -> jit_int;
2423
2424 pub fn jit_uint_le(value1: jit_uint, value2: jit_uint) -> jit_int;
2425
2426 pub fn jit_uint_gt(value1: jit_uint, value2: jit_uint) -> jit_int;
2427
2428 pub fn jit_uint_ge(value1: jit_uint, value2: jit_uint) -> jit_int;
2429
2430 pub fn jit_uint_cmp(value1: jit_uint, value2: jit_uint) -> jit_int;
2431
2432 pub fn jit_uint_min(value1: jit_uint, value2: jit_uint) -> jit_uint;
2433
2434 pub fn jit_uint_max(value1: jit_uint, value2: jit_uint) -> jit_uint;
2435
2436 pub fn jit_long_add(value1: jit_long, value2: jit_long) -> jit_long;
2437
2438 pub fn jit_long_sub(value1: jit_long, value2: jit_long) -> jit_long;
2439
2440 pub fn jit_long_mul(value1: jit_long, value2: jit_long) -> jit_long;
2441
2442 pub fn jit_long_div(result: *mut jit_long, value1: jit_long, value2: jit_long) -> jit_int;
2443
2444 pub fn jit_long_rem(result: *mut jit_long, value1: jit_long, value2: jit_long) -> jit_int;
2445
2446 pub fn jit_long_add_ovf(result: *mut jit_long, value1: jit_long, value2: jit_long) -> jit_int;
2447
2448 pub fn jit_long_sub_ovf(result: *mut jit_long, value1: jit_long, value2: jit_long) -> jit_int;
2449
2450 pub fn jit_long_mul_ovf(result: *mut jit_long, value1: jit_long, value2: jit_long) -> jit_int;
2451
2452 pub fn jit_long_div_ovf(result: *mut jit_long, value1: jit_long, value2: jit_long) -> jit_int;
2453
2454 pub fn jit_long_rem_ovf(result: *mut jit_long, value1: jit_long, value2: jit_long) -> jit_int;
2455
2456 pub fn jit_long_neg(value1: jit_long) -> jit_long;
2457
2458 pub fn jit_long_and(value1: jit_long, value2: jit_long) -> jit_long;
2459
2460 pub fn jit_long_or(value1: jit_long, value2: jit_long) -> jit_long;
2461
2462 pub fn jit_long_xor(value1: jit_long, value2: jit_long) -> jit_long;
2463
2464 pub fn jit_long_not(value1: jit_long) -> jit_long;
2465
2466 pub fn jit_long_shl(value1: jit_long, value2: jit_uint) -> jit_long;
2467
2468 pub fn jit_long_shr(value1: jit_long, value2: jit_uint) -> jit_long;
2469
2470 pub fn jit_long_eq(value1: jit_long, value2: jit_long) -> jit_int;
2471
2472 pub fn jit_long_ne(value1: jit_long, value2: jit_long) -> jit_int;
2473
2474 pub fn jit_long_lt(value1: jit_long, value2: jit_long) -> jit_int;
2475
2476 pub fn jit_long_le(value1: jit_long, value2: jit_long) -> jit_int;
2477
2478 pub fn jit_long_gt(value1: jit_long, value2: jit_long) -> jit_int;
2479
2480 pub fn jit_long_ge(value1: jit_long, value2: jit_long) -> jit_int;
2481
2482 pub fn jit_long_cmp(value1: jit_long, value2: jit_long) -> jit_int;
2483
2484 pub fn jit_long_abs(value1: jit_long) -> jit_long;
2485
2486 pub fn jit_long_min(value1: jit_long, value2: jit_long) -> jit_long;
2487
2488 pub fn jit_long_max(value1: jit_long, value2: jit_long) -> jit_long;
2489
2490 pub fn jit_long_sign(value1: jit_long) -> jit_int;
2491
2492 pub fn jit_ulong_add(value1: jit_ulong, value2: jit_ulong) -> jit_ulong;
2493
2494 pub fn jit_ulong_sub(value1: jit_ulong, value2: jit_ulong) -> jit_ulong;
2495
2496 pub fn jit_ulong_mul(value1: jit_ulong, value2: jit_ulong) -> jit_ulong;
2497
2498 pub fn jit_ulong_div(result: *mut jit_ulong, value1: jit_ulong, value2: jit_ulong) -> jit_int;
2499
2500 pub fn jit_ulong_rem(result: *mut jit_ulong, value1: jit_ulong, value2: jit_ulong) -> jit_int;
2501
2502 pub fn jit_ulong_add_ovf(
2503 result: *mut jit_ulong,
2504 value1: jit_ulong,
2505 value2: jit_ulong,
2506 ) -> jit_int;
2507
2508 pub fn jit_ulong_sub_ovf(
2509 result: *mut jit_ulong,
2510 value1: jit_ulong,
2511 value2: jit_ulong,
2512 ) -> jit_int;
2513
2514 pub fn jit_ulong_mul_ovf(
2515 result: *mut jit_ulong,
2516 value1: jit_ulong,
2517 value2: jit_ulong,
2518 ) -> jit_int;
2519
2520 pub fn jit_ulong_div_ovf(
2521 result: *mut jit_ulong,
2522 value1: jit_ulong,
2523 value2: jit_ulong,
2524 ) -> jit_int;
2525
2526 pub fn jit_ulong_rem_ovf(
2527 result: *mut jit_ulong,
2528 value1: jit_ulong,
2529 value2: jit_ulong,
2530 ) -> jit_int;
2531
2532 pub fn jit_ulong_neg(value1: jit_ulong) -> jit_ulong;
2533
2534 pub fn jit_ulong_and(value1: jit_ulong, value2: jit_ulong) -> jit_ulong;
2535
2536 pub fn jit_ulong_or(value1: jit_ulong, value2: jit_ulong) -> jit_ulong;
2537
2538 pub fn jit_ulong_xor(value1: jit_ulong, value2: jit_ulong) -> jit_ulong;
2539
2540 pub fn jit_ulong_not(value1: jit_ulong) -> jit_ulong;
2541
2542 pub fn jit_ulong_shl(value1: jit_ulong, value2: jit_uint) -> jit_ulong;
2543
2544 pub fn jit_ulong_shr(value1: jit_ulong, value2: jit_uint) -> jit_ulong;
2545
2546 pub fn jit_ulong_eq(value1: jit_ulong, value2: jit_ulong) -> jit_int;
2547
2548 pub fn jit_ulong_ne(value1: jit_ulong, value2: jit_ulong) -> jit_int;
2549
2550 pub fn jit_ulong_lt(value1: jit_ulong, value2: jit_ulong) -> jit_int;
2551
2552 pub fn jit_ulong_le(value1: jit_ulong, value2: jit_ulong) -> jit_int;
2553
2554 pub fn jit_ulong_gt(value1: jit_ulong, value2: jit_ulong) -> jit_int;
2555
2556 pub fn jit_ulong_ge(value1: jit_ulong, value2: jit_ulong) -> jit_int;
2557
2558 pub fn jit_ulong_cmp(value1: jit_ulong, value2: jit_ulong) -> jit_int;
2559
2560 pub fn jit_ulong_min(value1: jit_ulong, value2: jit_ulong) -> jit_ulong;
2561
2562 pub fn jit_ulong_max(value1: jit_ulong, value2: jit_ulong) -> jit_ulong;
2563
2564 pub fn jit_float32_add(value1: jit_float32, value2: jit_float32) -> jit_float32;
2565
2566 pub fn jit_float32_sub(value1: jit_float32, value2: jit_float32) -> jit_float32;
2567
2568 pub fn jit_float32_mul(value1: jit_float32, value2: jit_float32) -> jit_float32;
2569
2570 pub fn jit_float32_div(value1: jit_float32, value2: jit_float32) -> jit_float32;
2571
2572 pub fn jit_float32_rem(value1: jit_float32, value2: jit_float32) -> jit_float32;
2573
2574 pub fn jit_float32_ieee_rem(value1: jit_float32, value2: jit_float32) -> jit_float32;
2575
2576 pub fn jit_float32_neg(value1: jit_float32) -> jit_float32;
2577
2578 pub fn jit_float32_eq(value1: jit_float32, value2: jit_float32) -> jit_int;
2579
2580 pub fn jit_float32_ne(value1: jit_float32, value2: jit_float32) -> jit_int;
2581
2582 pub fn jit_float32_lt(value1: jit_float32, value2: jit_float32) -> jit_int;
2583
2584 pub fn jit_float32_le(value1: jit_float32, value2: jit_float32) -> jit_int;
2585
2586 pub fn jit_float32_gt(value1: jit_float32, value2: jit_float32) -> jit_int;
2587
2588 pub fn jit_float32_ge(value1: jit_float32, value2: jit_float32) -> jit_int;
2589
2590 pub fn jit_float32_cmpl(value1: jit_float32, value2: jit_float32) -> jit_int;
2591
2592 pub fn jit_float32_cmpg(value1: jit_float32, value2: jit_float32) -> jit_int;
2593
2594 pub fn jit_float32_acos(value1: jit_float32) -> jit_float32;
2595
2596 pub fn jit_float32_asin(value1: jit_float32) -> jit_float32;
2597
2598 pub fn jit_float32_atan(value1: jit_float32) -> jit_float32;
2599
2600 pub fn jit_float32_atan2(value1: jit_float32, value2: jit_float32) -> jit_float32;
2601
2602 pub fn jit_float32_ceil(value1: jit_float32) -> jit_float32;
2603
2604 pub fn jit_float32_cos(value1: jit_float32) -> jit_float32;
2605
2606 pub fn jit_float32_cosh(value1: jit_float32) -> jit_float32;
2607
2608 pub fn jit_float32_exp(value1: jit_float32) -> jit_float32;
2609
2610 pub fn jit_float32_floor(value1: jit_float32) -> jit_float32;
2611
2612 pub fn jit_float32_log(value1: jit_float32) -> jit_float32;
2613
2614 pub fn jit_float32_log10(value1: jit_float32) -> jit_float32;
2615
2616 pub fn jit_float32_pow(value1: jit_float32, value2: jit_float32) -> jit_float32;
2617
2618 pub fn jit_float32_rint(value1: jit_float32) -> jit_float32;
2619
2620 pub fn jit_float32_round(value1: jit_float32) -> jit_float32;
2621
2622 pub fn jit_float32_sin(value1: jit_float32) -> jit_float32;
2623
2624 pub fn jit_float32_sinh(value1: jit_float32) -> jit_float32;
2625
2626 pub fn jit_float32_sqrt(value1: jit_float32) -> jit_float32;
2627
2628 pub fn jit_float32_tan(value1: jit_float32) -> jit_float32;
2629
2630 pub fn jit_float32_tanh(value1: jit_float32) -> jit_float32;
2631
2632 pub fn jit_float32_trunc(value1: jit_float32) -> jit_float32;
2633
2634 pub fn jit_float32_is_finite(value: jit_float32) -> jit_int;
2635
2636 pub fn jit_float32_is_nan(value: jit_float32) -> jit_int;
2637
2638 pub fn jit_float32_is_inf(value: jit_float32) -> jit_int;
2639
2640 pub fn jit_float32_abs(value1: jit_float32) -> jit_float32;
2641
2642 pub fn jit_float32_min(value1: jit_float32, value2: jit_float32) -> jit_float32;
2643
2644 pub fn jit_float32_max(value1: jit_float32, value2: jit_float32) -> jit_float32;
2645
2646 pub fn jit_float32_sign(value1: jit_float32) -> jit_int;
2647
2648 pub fn jit_float64_add(value1: jit_float64, value2: jit_float64) -> jit_float64;
2649
2650 pub fn jit_float64_sub(value1: jit_float64, value2: jit_float64) -> jit_float64;
2651
2652 pub fn jit_float64_mul(value1: jit_float64, value2: jit_float64) -> jit_float64;
2653
2654 pub fn jit_float64_div(value1: jit_float64, value2: jit_float64) -> jit_float64;
2655
2656 pub fn jit_float64_rem(value1: jit_float64, value2: jit_float64) -> jit_float64;
2657
2658 pub fn jit_float64_ieee_rem(value1: jit_float64, value2: jit_float64) -> jit_float64;
2659
2660 pub fn jit_float64_neg(value1: jit_float64) -> jit_float64;
2661
2662 pub fn jit_float64_eq(value1: jit_float64, value2: jit_float64) -> jit_int;
2663
2664 pub fn jit_float64_ne(value1: jit_float64, value2: jit_float64) -> jit_int;
2665
2666 pub fn jit_float64_lt(value1: jit_float64, value2: jit_float64) -> jit_int;
2667
2668 pub fn jit_float64_le(value1: jit_float64, value2: jit_float64) -> jit_int;
2669
2670 pub fn jit_float64_gt(value1: jit_float64, value2: jit_float64) -> jit_int;
2671
2672 pub fn jit_float64_ge(value1: jit_float64, value2: jit_float64) -> jit_int;
2673
2674 pub fn jit_float64_cmpl(value1: jit_float64, value2: jit_float64) -> jit_int;
2675
2676 pub fn jit_float64_cmpg(value1: jit_float64, value2: jit_float64) -> jit_int;
2677
2678 pub fn jit_float64_acos(value1: jit_float64) -> jit_float64;
2679
2680 pub fn jit_float64_asin(value1: jit_float64) -> jit_float64;
2681
2682 pub fn jit_float64_atan(value1: jit_float64) -> jit_float64;
2683
2684 pub fn jit_float64_atan2(value1: jit_float64, value2: jit_float64) -> jit_float64;
2685
2686 pub fn jit_float64_ceil(value1: jit_float64) -> jit_float64;
2687
2688 pub fn jit_float64_cos(value1: jit_float64) -> jit_float64;
2689
2690 pub fn jit_float64_cosh(value1: jit_float64) -> jit_float64;
2691
2692 pub fn jit_float64_exp(value1: jit_float64) -> jit_float64;
2693
2694 pub fn jit_float64_floor(value1: jit_float64) -> jit_float64;
2695
2696 pub fn jit_float64_log(value1: jit_float64) -> jit_float64;
2697
2698 pub fn jit_float64_log10(value1: jit_float64) -> jit_float64;
2699
2700 pub fn jit_float64_pow(value1: jit_float64, value2: jit_float64) -> jit_float64;
2701
2702 pub fn jit_float64_rint(value1: jit_float64) -> jit_float64;
2703
2704 pub fn jit_float64_round(value1: jit_float64) -> jit_float64;
2705
2706 pub fn jit_float64_sin(value1: jit_float64) -> jit_float64;
2707
2708 pub fn jit_float64_sinh(value1: jit_float64) -> jit_float64;
2709
2710 pub fn jit_float64_sqrt(value1: jit_float64) -> jit_float64;
2711
2712 pub fn jit_float64_tan(value1: jit_float64) -> jit_float64;
2713
2714 pub fn jit_float64_tanh(value1: jit_float64) -> jit_float64;
2715
2716 pub fn jit_float64_trunc(value1: jit_float64) -> jit_float64;
2717
2718 pub fn jit_float64_is_finite(value: jit_float64) -> jit_int;
2719
2720 pub fn jit_float64_is_nan(value: jit_float64) -> jit_int;
2721
2722 pub fn jit_float64_is_inf(value: jit_float64) -> jit_int;
2723
2724 pub fn jit_float64_abs(value1: jit_float64) -> jit_float64;
2725
2726 pub fn jit_float64_min(value1: jit_float64, value2: jit_float64) -> jit_float64;
2727
2728 pub fn jit_float64_max(value1: jit_float64, value2: jit_float64) -> jit_float64;
2729
2730 pub fn jit_float64_sign(value1: jit_float64) -> jit_int;
2731
2732 pub fn jit_nfloat_add(value1: jit_nfloat, value2: jit_nfloat) -> jit_nfloat;
2733
2734 pub fn jit_nfloat_sub(value1: jit_nfloat, value2: jit_nfloat) -> jit_nfloat;
2735
2736 pub fn jit_nfloat_mul(value1: jit_nfloat, value2: jit_nfloat) -> jit_nfloat;
2737
2738 pub fn jit_nfloat_div(value1: jit_nfloat, value2: jit_nfloat) -> jit_nfloat;
2739
2740 pub fn jit_nfloat_rem(value1: jit_nfloat, value2: jit_nfloat) -> jit_nfloat;
2741
2742 pub fn jit_nfloat_ieee_rem(value1: jit_nfloat, value2: jit_nfloat) -> jit_nfloat;
2743
2744 pub fn jit_nfloat_neg(value1: jit_nfloat) -> jit_nfloat;
2745
2746 pub fn jit_nfloat_eq(value1: jit_nfloat, value2: jit_nfloat) -> jit_int;
2747
2748 pub fn jit_nfloat_ne(value1: jit_nfloat, value2: jit_nfloat) -> jit_int;
2749
2750 pub fn jit_nfloat_lt(value1: jit_nfloat, value2: jit_nfloat) -> jit_int;
2751
2752 pub fn jit_nfloat_le(value1: jit_nfloat, value2: jit_nfloat) -> jit_int;
2753
2754 pub fn jit_nfloat_gt(value1: jit_nfloat, value2: jit_nfloat) -> jit_int;
2755
2756 pub fn jit_nfloat_ge(value1: jit_nfloat, value2: jit_nfloat) -> jit_int;
2757
2758 pub fn jit_nfloat_cmpl(value1: jit_nfloat, value2: jit_nfloat) -> jit_int;
2759
2760 pub fn jit_nfloat_cmpg(value1: jit_nfloat, value2: jit_nfloat) -> jit_int;
2761
2762 pub fn jit_nfloat_acos(value1: jit_nfloat) -> jit_nfloat;
2763
2764 pub fn jit_nfloat_asin(value1: jit_nfloat) -> jit_nfloat;
2765
2766 pub fn jit_nfloat_atan(value1: jit_nfloat) -> jit_nfloat;
2767
2768 pub fn jit_nfloat_atan2(value1: jit_nfloat, value2: jit_nfloat) -> jit_nfloat;
2769
2770 pub fn jit_nfloat_ceil(value1: jit_nfloat) -> jit_nfloat;
2771
2772 pub fn jit_nfloat_cos(value1: jit_nfloat) -> jit_nfloat;
2773
2774 pub fn jit_nfloat_cosh(value1: jit_nfloat) -> jit_nfloat;
2775
2776 pub fn jit_nfloat_exp(value1: jit_nfloat) -> jit_nfloat;
2777
2778 pub fn jit_nfloat_floor(value1: jit_nfloat) -> jit_nfloat;
2779
2780 pub fn jit_nfloat_log(value1: jit_nfloat) -> jit_nfloat;
2781
2782 pub fn jit_nfloat_log10(value1: jit_nfloat) -> jit_nfloat;
2783
2784 pub fn jit_nfloat_pow(value1: jit_nfloat, value2: jit_nfloat) -> jit_nfloat;
2785
2786 pub fn jit_nfloat_rint(value1: jit_nfloat) -> jit_nfloat;
2787
2788 pub fn jit_nfloat_round(value1: jit_nfloat) -> jit_nfloat;
2789
2790 pub fn jit_nfloat_sin(value1: jit_nfloat) -> jit_nfloat;
2791
2792 pub fn jit_nfloat_sinh(value1: jit_nfloat) -> jit_nfloat;
2793
2794 pub fn jit_nfloat_sqrt(value1: jit_nfloat) -> jit_nfloat;
2795
2796 pub fn jit_nfloat_tan(value1: jit_nfloat) -> jit_nfloat;
2797
2798 pub fn jit_nfloat_tanh(value1: jit_nfloat) -> jit_nfloat;
2799
2800 pub fn jit_nfloat_trunc(value1: jit_nfloat) -> jit_nfloat;
2801
2802 pub fn jit_nfloat_is_finite(value: jit_nfloat) -> jit_int;
2803
2804 pub fn jit_nfloat_is_nan(value: jit_nfloat) -> jit_int;
2805
2806 pub fn jit_nfloat_is_inf(value: jit_nfloat) -> jit_int;
2807
2808 pub fn jit_nfloat_abs(value1: jit_nfloat) -> jit_nfloat;
2809
2810 pub fn jit_nfloat_min(value1: jit_nfloat, value2: jit_nfloat) -> jit_nfloat;
2811
2812 pub fn jit_nfloat_max(value1: jit_nfloat, value2: jit_nfloat) -> jit_nfloat;
2813
2814 pub fn jit_nfloat_sign(value1: jit_nfloat) -> jit_int;
2815
2816 pub fn jit_int_to_sbyte(value: jit_int) -> jit_int;
2817
2818 pub fn jit_int_to_ubyte(value: jit_int) -> jit_int;
2819
2820 pub fn jit_int_to_short(value: jit_int) -> jit_int;
2821
2822 pub fn jit_int_to_ushort(value: jit_int) -> jit_int;
2823
2824 pub fn jit_int_to_int(value: jit_int) -> jit_int;
2825
2826 pub fn jit_int_to_uint(value: jit_int) -> jit_uint;
2827
2828 pub fn jit_int_to_long(value: jit_int) -> jit_long;
2829
2830 pub fn jit_int_to_ulong(value: jit_int) -> jit_ulong;
2831
2832 pub fn jit_uint_to_int(value: jit_uint) -> jit_int;
2833
2834 pub fn jit_uint_to_uint(value: jit_uint) -> jit_uint;
2835
2836 pub fn jit_uint_to_long(value: jit_uint) -> jit_long;
2837
2838 pub fn jit_uint_to_ulong(value: jit_uint) -> jit_ulong;
2839
2840 pub fn jit_long_to_int(value: jit_long) -> jit_int;
2841
2842 pub fn jit_long_to_uint(value: jit_long) -> jit_uint;
2843
2844 pub fn jit_long_to_long(value: jit_long) -> jit_long;
2845
2846 pub fn jit_long_to_ulong(value: jit_long) -> jit_ulong;
2847
2848 pub fn jit_ulong_to_int(value: jit_ulong) -> jit_int;
2849
2850 pub fn jit_ulong_to_uint(value: jit_ulong) -> jit_uint;
2851
2852 pub fn jit_ulong_to_long(value: jit_ulong) -> jit_long;
2853
2854 pub fn jit_ulong_to_ulong(value: jit_ulong) -> jit_ulong;
2855
2856 pub fn jit_int_to_sbyte_ovf(result: *mut jit_int, value: jit_int) -> jit_int;
2857
2858 pub fn jit_int_to_ubyte_ovf(result: *mut jit_int, value: jit_int) -> jit_int;
2859
2860 pub fn jit_int_to_short_ovf(result: *mut jit_int, value: jit_int) -> jit_int;
2861
2862 pub fn jit_int_to_ushort_ovf(result: *mut jit_int, value: jit_int) -> jit_int;
2863
2864 pub fn jit_int_to_int_ovf(result: *mut jit_int, value: jit_int) -> jit_int;
2865
2866 pub fn jit_int_to_uint_ovf(result: *mut jit_uint, value: jit_int) -> jit_int;
2867
2868 pub fn jit_int_to_long_ovf(result: *mut jit_long, value: jit_int) -> jit_int;
2869
2870 pub fn jit_int_to_ulong_ovf(result: *mut jit_ulong, value: jit_int) -> jit_int;
2871
2872 pub fn jit_uint_to_int_ovf(result: *mut jit_int, value: jit_uint) -> jit_int;
2873
2874 pub fn jit_uint_to_uint_ovf(result: *mut jit_uint, value: jit_uint) -> jit_int;
2875
2876 pub fn jit_uint_to_long_ovf(result: *mut jit_long, value: jit_uint) -> jit_int;
2877
2878 pub fn jit_uint_to_ulong_ovf(result: *mut jit_ulong, value: jit_uint) -> jit_int;
2879
2880 pub fn jit_long_to_int_ovf(result: *mut jit_int, value: jit_long) -> jit_int;
2881
2882 pub fn jit_long_to_uint_ovf(result: *mut jit_uint, value: jit_long) -> jit_int;
2883
2884 pub fn jit_long_to_long_ovf(result: *mut jit_long, value: jit_long) -> jit_int;
2885
2886 pub fn jit_long_to_ulong_ovf(result: *mut jit_ulong, value: jit_long) -> jit_int;
2887
2888 pub fn jit_ulong_to_int_ovf(result: *mut jit_int, value: jit_ulong) -> jit_int;
2889
2890 pub fn jit_ulong_to_uint_ovf(result: *mut jit_uint, value: jit_ulong) -> jit_int;
2891
2892 pub fn jit_ulong_to_long_ovf(result: *mut jit_long, value: jit_ulong) -> jit_int;
2893
2894 pub fn jit_ulong_to_ulong_ovf(result: *mut jit_ulong, value: jit_ulong) -> jit_int;
2895
2896 pub fn jit_float32_to_int(value: jit_float32) -> jit_int;
2897
2898 pub fn jit_float32_to_uint(value: jit_float32) -> jit_uint;
2899
2900 pub fn jit_float32_to_long(value: jit_float32) -> jit_long;
2901
2902 pub fn jit_float32_to_ulong(value: jit_float32) -> jit_ulong;
2903
2904 pub fn jit_float32_to_int_ovf(result: *mut jit_int, value: jit_float32) -> jit_int;
2905
2906 pub fn jit_float32_to_uint_ovf(result: *mut jit_uint, value: jit_float32) -> jit_int;
2907
2908 pub fn jit_float32_to_long_ovf(result: *mut jit_long, value: jit_float32) -> jit_int;
2909
2910 pub fn jit_float32_to_ulong_ovf(result: *mut jit_ulong, value: jit_float32) -> jit_int;
2911
2912 pub fn jit_float64_to_int(value: jit_float64) -> jit_int;
2913
2914 pub fn jit_float64_to_uint(value: jit_float64) -> jit_uint;
2915
2916 pub fn jit_float64_to_long(value: jit_float64) -> jit_long;
2917
2918 pub fn jit_float64_to_ulong(value: jit_float64) -> jit_ulong;
2919
2920 pub fn jit_float64_to_int_ovf(result: *mut jit_int, value: jit_float64) -> jit_int;
2921
2922 pub fn jit_float64_to_uint_ovf(result: *mut jit_uint, value: jit_float64) -> jit_int;
2923
2924 pub fn jit_float64_to_long_ovf(result: *mut jit_long, value: jit_float64) -> jit_int;
2925
2926 pub fn jit_float64_to_ulong_ovf(result: *mut jit_ulong, value: jit_float64) -> jit_int;
2927
2928 pub fn jit_nfloat_to_int(value: jit_nfloat) -> jit_int;
2929
2930 pub fn jit_nfloat_to_uint(value: jit_nfloat) -> jit_uint;
2931
2932 pub fn jit_nfloat_to_long(value: jit_nfloat) -> jit_long;
2933
2934 pub fn jit_nfloat_to_ulong(value: jit_nfloat) -> jit_ulong;
2935
2936 pub fn jit_nfloat_to_int_ovf(result: *mut jit_int, value: jit_nfloat) -> jit_int;
2937
2938 pub fn jit_nfloat_to_uint_ovf(result: *mut jit_uint, value: jit_nfloat) -> jit_int;
2939
2940 pub fn jit_nfloat_to_long_ovf(result: *mut jit_long, value: jit_nfloat) -> jit_int;
2941
2942 pub fn jit_nfloat_to_ulong_ovf(result: *mut jit_ulong, value: jit_nfloat) -> jit_int;
2943
2944 pub fn jit_int_to_float32(value: jit_int) -> jit_float32;
2945
2946 pub fn jit_int_to_float64(value: jit_int) -> jit_float64;
2947
2948 pub fn jit_int_to_nfloat(value: jit_int) -> jit_nfloat;
2949
2950 pub fn jit_uint_to_float32(value: jit_uint) -> jit_float32;
2951
2952 pub fn jit_uint_to_float64(value: jit_uint) -> jit_float64;
2953
2954 pub fn jit_uint_to_nfloat(value: jit_uint) -> jit_nfloat;
2955
2956 pub fn jit_long_to_float32(value: jit_long) -> jit_float32;
2957
2958 pub fn jit_long_to_float64(value: jit_long) -> jit_float64;
2959
2960 pub fn jit_long_to_nfloat(value: jit_long) -> jit_nfloat;
2961
2962 pub fn jit_ulong_to_float32(value: jit_ulong) -> jit_float32;
2963
2964 pub fn jit_ulong_to_float64(value: jit_ulong) -> jit_float64;
2965
2966 pub fn jit_ulong_to_nfloat(value: jit_ulong) -> jit_nfloat;
2967
2968 pub fn jit_float32_to_float64(value: jit_float32) -> jit_float64;
2969
2970 pub fn jit_float32_to_nfloat(value: jit_float32) -> jit_nfloat;
2971
2972 pub fn jit_float64_to_float32(value: jit_float64) -> jit_float32;
2973
2974 pub fn jit_float64_to_nfloat(value: jit_float64) -> jit_nfloat;
2975
2976 pub fn jit_nfloat_to_float32(value: jit_nfloat) -> jit_float32;
2977
2978 pub fn jit_nfloat_to_float64(value: jit_nfloat) -> jit_float64;
2979}
2980pub type _jit_meta = c_void;
2981pub type jit_meta_t = *mut _jit_meta;
2982extern "C" {
2983 pub fn jit_meta_set(
2984 list: *mut jit_meta_t,
2985 type_: ::std::os::raw::c_int,
2986 data: *mut ::std::os::raw::c_void,
2987 free_data: jit_meta_free_func,
2988 pool_owner: jit_function_t,
2989 ) -> ::std::os::raw::c_int;
2990
2991 pub fn jit_meta_get(
2992 list: jit_meta_t,
2993 type_: ::std::os::raw::c_int,
2994 ) -> *mut ::std::os::raw::c_void;
2995
2996 pub fn jit_meta_free(list: *mut jit_meta_t, type_: ::std::os::raw::c_int);
2997
2998 pub fn jit_meta_destroy(list: *mut jit_meta_t);
2999}
3000pub type jit_objmodel = c_void;
3001pub type jit_objmodel_t = *mut jit_objmodel;
3002pub type jitom_class = c_void;
3003pub type jitom_class_t = *mut jitom_class;
3004pub type jitom_field = c_void;
3005pub type jitom_field_t = *mut jitom_field;
3006pub type jitom_method = c_void;
3007pub type jitom_method_t = *mut jitom_method;
3008extern "C" {
3009 pub fn jitom_destroy_model(model: jit_objmodel_t);
3010
3011 pub fn jitom_get_class_by_name(
3012 model: jit_objmodel_t,
3013 name: *const ::std::os::raw::c_char,
3014 ) -> jitom_class_t;
3015
3016 pub fn jitom_class_get_name(
3017 model: jit_objmodel_t,
3018 klass: jitom_class_t,
3019 ) -> *mut ::std::os::raw::c_char;
3020
3021 pub fn jitom_class_get_modifiers(
3022 model: jit_objmodel_t,
3023 klass: jitom_class_t,
3024 ) -> ::std::os::raw::c_int;
3025
3026 pub fn jitom_class_get_type(model: jit_objmodel_t, klass: jitom_class_t) -> jit_type_t;
3027
3028 pub fn jitom_class_get_value_type(model: jit_objmodel_t, klass: jitom_class_t) -> jit_type_t;
3029
3030 pub fn jitom_class_get_primary_super(
3031 model: jit_objmodel_t,
3032 klass: jitom_class_t,
3033 ) -> jitom_class_t;
3034
3035 pub fn jitom_class_get_all_supers(
3036 model: jit_objmodel_t,
3037 klass: jitom_class_t,
3038 num: *mut ::std::os::raw::c_uint,
3039 ) -> *mut jitom_class_t;
3040
3041 pub fn jitom_class_get_interfaces(
3042 model: jit_objmodel_t,
3043 klass: jitom_class_t,
3044 num: *mut ::std::os::raw::c_uint,
3045 ) -> *mut jitom_class_t;
3046
3047 pub fn jitom_class_get_fields(
3048 model: jit_objmodel_t,
3049 klass: jitom_class_t,
3050 num: *mut ::std::os::raw::c_uint,
3051 ) -> *mut jitom_field_t;
3052
3053 pub fn jitom_class_get_methods(
3054 model: jit_objmodel_t,
3055 klass: jitom_class_t,
3056 num: *mut ::std::os::raw::c_uint,
3057 ) -> *mut jitom_method_t;
3058
3059 pub fn jitom_class_new(
3060 model: jit_objmodel_t,
3061 klass: jitom_class_t,
3062 ctor: jitom_method_t,
3063 func: jit_function_t,
3064 args: *mut jit_value_t,
3065 num_args: ::std::os::raw::c_uint,
3066 flags: ::std::os::raw::c_int,
3067 ) -> jit_value_t;
3068
3069 pub fn jitom_class_new_value(
3070 model: jit_objmodel_t,
3071 klass: jitom_class_t,
3072 ctor: jitom_method_t,
3073 func: jit_function_t,
3074 args: *mut jit_value_t,
3075 num_args: ::std::os::raw::c_uint,
3076 flags: ::std::os::raw::c_int,
3077 ) -> jit_value_t;
3078
3079 pub fn jitom_class_delete(
3080 model: jit_objmodel_t,
3081 klass: jitom_class_t,
3082 obj_value: jit_value_t,
3083 ) -> ::std::os::raw::c_int;
3084
3085 pub fn jitom_class_add_ref(
3086 model: jit_objmodel_t,
3087 klass: jitom_class_t,
3088 obj_value: jit_value_t,
3089 ) -> ::std::os::raw::c_int;
3090
3091 pub fn jitom_field_get_name(
3092 model: jit_objmodel_t,
3093 klass: jitom_class_t,
3094 field: jitom_field_t,
3095 ) -> *mut ::std::os::raw::c_char;
3096
3097 pub fn jitom_field_get_type(
3098 model: jit_objmodel_t,
3099 klass: jitom_class_t,
3100 field: jitom_field_t,
3101 ) -> jit_type_t;
3102
3103 pub fn jitom_field_get_modifiers(
3104 model: jit_objmodel_t,
3105 klass: jitom_class_t,
3106 field: jitom_field_t,
3107 ) -> ::std::os::raw::c_int;
3108
3109 pub fn jitom_field_load(
3110 model: jit_objmodel_t,
3111 klass: jitom_class_t,
3112 field: jitom_field_t,
3113 func: jit_function_t,
3114 obj_value: jit_value_t,
3115 ) -> jit_value_t;
3116
3117 pub fn jitom_field_load_address(
3118 model: jit_objmodel_t,
3119 klass: jitom_class_t,
3120 field: jitom_field_t,
3121 func: jit_function_t,
3122 obj_value: jit_value_t,
3123 ) -> jit_value_t;
3124
3125 pub fn jitom_field_store(
3126 model: jit_objmodel_t,
3127 klass: jitom_class_t,
3128 field: jitom_field_t,
3129 func: jit_function_t,
3130 obj_value: jit_value_t,
3131 value: jit_value_t,
3132 ) -> ::std::os::raw::c_int;
3133
3134 pub fn jitom_method_get_name(
3135 model: jit_objmodel_t,
3136 klass: jitom_class_t,
3137 method: jitom_method_t,
3138 ) -> *mut ::std::os::raw::c_char;
3139
3140 pub fn jitom_method_get_type(
3141 model: jit_objmodel_t,
3142 klass: jitom_class_t,
3143 method: jitom_method_t,
3144 ) -> jit_type_t;
3145
3146 pub fn jitom_method_get_modifiers(
3147 model: jit_objmodel_t,
3148 klass: jitom_class_t,
3149 method: jitom_method_t,
3150 ) -> ::std::os::raw::c_int;
3151
3152 pub fn jitom_method_invoke(
3153 model: jit_objmodel_t,
3154 klass: jitom_class_t,
3155 method: jitom_method_t,
3156 func: jit_function_t,
3157 args: *mut jit_value_t,
3158 num_args: ::std::os::raw::c_uint,
3159 flags: ::std::os::raw::c_int,
3160 ) -> jit_value_t;
3161
3162 pub fn jitom_method_invoke_virtual(
3163 model: jit_objmodel_t,
3164 klass: jitom_class_t,
3165 method: jitom_method_t,
3166 func: jit_function_t,
3167 args: *mut jit_value_t,
3168 num_args: ::std::os::raw::c_uint,
3169 flags: ::std::os::raw::c_int,
3170 ) -> jit_value_t;
3171
3172 pub fn jitom_type_tag_as_class(
3173 type_: jit_type_t,
3174 model: jit_objmodel_t,
3175 klass: jitom_class_t,
3176 incref: ::std::os::raw::c_int,
3177 ) -> jit_type_t;
3178
3179 pub fn jitom_type_tag_as_value(
3180 type_: jit_type_t,
3181 model: jit_objmodel_t,
3182 klass: jitom_class_t,
3183 incref: ::std::os::raw::c_int,
3184 ) -> jit_type_t;
3185
3186 pub fn jitom_type_is_class(type_: jit_type_t) -> ::std::os::raw::c_int;
3187
3188 pub fn jitom_type_is_value(type_: jit_type_t) -> ::std::os::raw::c_int;
3189
3190 pub fn jitom_type_get_model(type_: jit_type_t) -> jit_objmodel_t;
3191
3192 pub fn jitom_type_get_class(type_: jit_type_t) -> jitom_class_t;
3193}
3194pub type jit_opcode_info_t = jit_opcode_info;
3195#[repr(C)]
3196#[derive(Debug, Copy, Clone)]
3197pub struct jit_opcode_info {
3198 pub name: *const ::std::os::raw::c_char,
3199 pub flags: ::std::os::raw::c_int,
3200}
3201extern "C" {
3202 pub static jit_opcodes: [jit_opcode_info_t; 437usize];
3203}
3204
3205pub type _jit_arch_frame_t = _jit_arch_frame;
3206#[repr(C)]
3207#[derive(Debug, Copy, Clone)]
3208pub struct _jit_arch_frame {
3209 pub next_frame: *mut _jit_arch_frame_t,
3210 pub return_address: *mut ::std::os::raw::c_void,
3211}
3212#[repr(C)]
3213#[derive(Debug, Copy, Clone)]
3214pub struct jit_unwind_context_t {
3215 pub frame: *mut ::std::os::raw::c_void,
3216 pub cache: *mut ::std::os::raw::c_void,
3217 pub context: jit_context_t,
3218}
3219
3220extern "C" {
3221 pub fn jit_unwind_init(
3222 unwind: *mut jit_unwind_context_t,
3223 context: jit_context_t,
3224 ) -> ::std::os::raw::c_int;
3225
3226 pub fn jit_unwind_free(unwind: *mut jit_unwind_context_t);
3227
3228 pub fn jit_unwind_next(unwind: *mut jit_unwind_context_t) -> ::std::os::raw::c_int;
3229
3230 pub fn jit_unwind_next_pc(unwind: *mut jit_unwind_context_t) -> ::std::os::raw::c_int;
3231
3232 pub fn jit_unwind_get_pc(unwind: *mut jit_unwind_context_t) -> *mut ::std::os::raw::c_void;
3233
3234 pub fn jit_unwind_jump(
3235 unwind: *mut jit_unwind_context_t,
3236 pc: *mut ::std::os::raw::c_void,
3237 ) -> ::std::os::raw::c_int;
3238
3239 pub fn jit_unwind_get_function(unwind: *mut jit_unwind_context_t) -> jit_function_t;
3240
3241 pub fn jit_unwind_get_offset(unwind: *mut jit_unwind_context_t) -> ::std::os::raw::c_uint;
3242
3243 pub fn jit_malloc(size: ::std::os::raw::c_uint) -> *mut ::std::os::raw::c_void;
3244
3245 pub fn jit_calloc(
3246 num: ::std::os::raw::c_uint,
3247 size: ::std::os::raw::c_uint,
3248 ) -> *mut ::std::os::raw::c_void;
3249
3250 pub fn jit_realloc(
3251 ptr: *mut ::std::os::raw::c_void,
3252 size: ::std::os::raw::c_uint,
3253 ) -> *mut ::std::os::raw::c_void;
3254
3255 pub fn jit_free(ptr: *mut ::std::os::raw::c_void);
3256
3257 pub fn jit_memset(
3258 dest: *mut ::std::os::raw::c_void,
3259 ch: ::std::os::raw::c_int,
3260 len: ::std::os::raw::c_uint,
3261 ) -> *mut ::std::os::raw::c_void;
3262
3263 pub fn jit_memcpy(
3264 dest: *mut ::std::os::raw::c_void,
3265 src: *const ::std::os::raw::c_void,
3266 len: ::std::os::raw::c_uint,
3267 ) -> *mut ::std::os::raw::c_void;
3268
3269 pub fn jit_memmove(
3270 dest: *mut ::std::os::raw::c_void,
3271 src: *const ::std::os::raw::c_void,
3272 len: ::std::os::raw::c_uint,
3273 ) -> *mut ::std::os::raw::c_void;
3274
3275 pub fn jit_memcmp(
3276 s1: *const ::std::os::raw::c_void,
3277 s2: *const ::std::os::raw::c_void,
3278 len: ::std::os::raw::c_uint,
3279 ) -> ::std::os::raw::c_int;
3280
3281 pub fn jit_memchr(
3282 str_: *const ::std::os::raw::c_void,
3283 ch: ::std::os::raw::c_int,
3284 len: ::std::os::raw::c_uint,
3285 ) -> *mut ::std::os::raw::c_void;
3286
3287 pub fn jit_strlen(str_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_uint;
3288
3289 pub fn jit_strcpy(
3290 dest: *mut ::std::os::raw::c_char,
3291 src: *const ::std::os::raw::c_char,
3292 ) -> *mut ::std::os::raw::c_char;
3293
3294 pub fn jit_strcat(
3295 dest: *mut ::std::os::raw::c_char,
3296 src: *const ::std::os::raw::c_char,
3297 ) -> *mut ::std::os::raw::c_char;
3298
3299 pub fn jit_strncpy(
3300 dest: *mut ::std::os::raw::c_char,
3301 src: *const ::std::os::raw::c_char,
3302 len: ::std::os::raw::c_uint,
3303 ) -> *mut ::std::os::raw::c_char;
3304
3305 pub fn jit_strdup(str_: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
3306
3307 pub fn jit_strndup(
3308 str_: *const ::std::os::raw::c_char,
3309 len: ::std::os::raw::c_uint,
3310 ) -> *mut ::std::os::raw::c_char;
3311
3312 pub fn jit_strcmp(
3313 str1: *const ::std::os::raw::c_char,
3314 str2: *const ::std::os::raw::c_char,
3315 ) -> ::std::os::raw::c_int;
3316
3317 pub fn jit_strncmp(
3318 str1: *const ::std::os::raw::c_char,
3319 str2: *const ::std::os::raw::c_char,
3320 len: ::std::os::raw::c_uint,
3321 ) -> ::std::os::raw::c_int;
3322
3323 pub fn jit_stricmp(
3324 str1: *const ::std::os::raw::c_char,
3325 str2: *const ::std::os::raw::c_char,
3326 ) -> ::std::os::raw::c_int;
3327
3328 pub fn jit_strnicmp(
3329 str1: *const ::std::os::raw::c_char,
3330 str2: *const ::std::os::raw::c_char,
3331 len: ::std::os::raw::c_uint,
3332 ) -> ::std::os::raw::c_int;
3333
3334 pub fn jit_strchr(
3335 str_: *const ::std::os::raw::c_char,
3336 ch: ::std::os::raw::c_int,
3337 ) -> *mut ::std::os::raw::c_char;
3338
3339 pub fn jit_strrchr(
3340 str_: *const ::std::os::raw::c_char,
3341 ch: ::std::os::raw::c_int,
3342 ) -> *mut ::std::os::raw::c_char;
3343
3344 pub fn jit_sprintf(
3345 str_: *mut ::std::os::raw::c_char,
3346 format: *const ::std::os::raw::c_char,
3347 ...
3348 ) -> ::std::os::raw::c_int;
3349
3350 pub fn jit_snprintf(
3351 str_: *mut ::std::os::raw::c_char,
3352 len: ::std::os::raw::c_uint,
3353 format: *const ::std::os::raw::c_char,
3354 ...
3355 ) -> ::std::os::raw::c_int;
3356}
3357#[repr(C)]
3358#[repr(align(16))]
3359#[derive(Copy, Clone)]
3360pub struct jit_constant_t {
3361 pub type_: jit_type_t,
3362 pub __bindgen_padding_0: u64,
3363 pub un: jit_constant_t__bindgen_ty_1,
3364}
3365#[repr(C)]
3366#[repr(align(16))]
3367#[derive(Copy, Clone)]
3368pub union jit_constant_t__bindgen_ty_1 {
3369 pub ptr_value: *mut ::std::os::raw::c_void,
3370 pub int_value: jit_int,
3371 pub uint_value: jit_uint,
3372 pub nint_value: jit_nint,
3373 pub nuint_value: jit_nuint,
3374 pub long_value: jit_long,
3375 pub ulong_value: jit_ulong,
3376 pub float32_value: jit_float32,
3377 pub float64_value: jit_float64,
3378 pub nfloat_value: jit_nfloat,
3379}
3380
3381extern "C" {
3382 pub fn jit_value_create(func: jit_function_t, type_: jit_type_t) -> jit_value_t;
3386
3387 pub fn jit_value_create_nint_constant(
3396 func: jit_function_t,
3397 type_: jit_type_t,
3398 const_value: jit_nint,
3399 ) -> jit_value_t;
3400
3401 pub fn jit_value_create_long_constant(
3403 func: jit_function_t,
3404 type_: jit_type_t,
3405 const_value: jit_long,
3406 ) -> jit_value_t;
3407
3408 pub fn jit_value_create_float32_constant(
3410 func: jit_function_t,
3411 type_: jit_type_t,
3412 const_value: jit_float32,
3413 ) -> jit_value_t;
3414
3415 pub fn jit_value_create_float64_constant(
3417 func: jit_function_t,
3418 type_: jit_type_t,
3419 const_value: jit_float64,
3420 ) -> jit_value_t;
3421
3422 pub fn jit_value_create_nfloat_constant(
3424 func: jit_function_t,
3425 type_: jit_type_t,
3426 const_value: jit_nfloat,
3427 ) -> jit_value_t;
3428
3429 pub fn jit_value_create_constant(
3431 func: jit_function_t,
3432 const_value: *const jit_constant_t,
3433 ) -> jit_value_t;
3434
3435 pub fn jit_value_get_param(func: jit_function_t, param: ::std::os::raw::c_uint) -> jit_value_t;
3437
3438 pub fn jit_value_get_struct_pointer(func: jit_function_t) -> jit_value_t;
3440
3441 pub fn jit_value_is_temporary(value: jit_value_t) -> ::std::os::raw::c_int;
3443
3444 pub fn jit_value_is_local(value: jit_value_t) -> ::std::os::raw::c_int;
3446
3447 pub fn jit_value_is_constant(value: jit_value_t) -> ::std::os::raw::c_int;
3449
3450 pub fn jit_value_is_parameter(value: jit_value_t) -> ::std::os::raw::c_int;
3452
3453 pub fn jit_value_ref(func: jit_function_t, value: jit_value_t);
3457
3458 pub fn jit_value_set_volatile(value: jit_value_t);
3460
3461 pub fn jit_value_is_volatile(value: jit_value_t) -> ::std::os::raw::c_int;
3463
3464 pub fn jit_value_set_addressable(value: jit_value_t);
3466
3467 pub fn jit_value_is_addressable(value: jit_value_t) -> ::std::os::raw::c_int;
3469
3470 pub fn jit_value_get_type(value: jit_value_t) -> jit_type_t;
3472
3473 pub fn jit_value_get_function(value: jit_value_t) -> jit_function_t;
3475
3476 pub fn jit_value_get_block(value: jit_value_t) -> jit_block_t;
3478
3479 pub fn jit_value_get_context(value: jit_value_t) -> jit_context_t;
3481
3482 pub fn jit_value_get_constant(value: jit_value_t) -> jit_constant_t;
3484
3485 pub fn jit_value_get_nint_constant(value: jit_value_t) -> jit_nint;
3487
3488 pub fn jit_value_get_long_constant(value: jit_value_t) -> jit_long;
3490
3491 pub fn jit_value_get_float32_constant(value: jit_value_t) -> jit_float32;
3493
3494 pub fn jit_value_get_float64_constant(value: jit_value_t) -> jit_float64;
3496
3497 pub fn jit_value_get_nfloat_constant(value: jit_value_t) -> jit_nfloat;
3499
3500 pub fn jit_value_is_true(value: jit_value_t) -> ::std::os::raw::c_int;
3502
3503 pub fn jit_constant_convert(
3505 result: *mut jit_constant_t,
3506 value: *const jit_constant_t,
3507 type_: jit_type_t,
3508 overflow_check: ::std::os::raw::c_int,
3509 ) -> ::std::os::raw::c_int;
3510}
3511pub const jit_prot_t_JIT_PROT_NONE: jit_prot_t = 0;
3512pub const jit_prot_t_JIT_PROT_READ: jit_prot_t = 1;
3513pub const jit_prot_t_JIT_PROT_READ_WRITE: jit_prot_t = 2;
3514pub const jit_prot_t_JIT_PROT_EXEC_READ: jit_prot_t = 3;
3515pub const jit_prot_t_JIT_PROT_EXEC_READ_WRITE: jit_prot_t = 4;
3516pub type jit_prot_t = ::std::os::raw::c_uint;
3517extern "C" {
3518 pub fn jit_vmem_init();
3519
3520 pub fn jit_vmem_page_size() -> jit_uint;
3521
3522 pub fn jit_vmem_round_up(value: jit_nuint) -> jit_nuint;
3523
3524 pub fn jit_vmem_round_down(value: jit_nuint) -> jit_nuint;
3525
3526 pub fn jit_vmem_reserve(size: jit_uint) -> *mut ::std::os::raw::c_void;
3527
3528 pub fn jit_vmem_reserve_committed(
3529 size: jit_uint,
3530 prot: jit_prot_t,
3531 ) -> *mut ::std::os::raw::c_void;
3532
3533 pub fn jit_vmem_release(
3534 addr: *mut ::std::os::raw::c_void,
3535 size: jit_uint,
3536 ) -> ::std::os::raw::c_int;
3537
3538 pub fn jit_vmem_commit(
3539 addr: *mut ::std::os::raw::c_void,
3540 size: jit_uint,
3541 prot: jit_prot_t,
3542 ) -> ::std::os::raw::c_int;
3543
3544 pub fn jit_vmem_decommit(
3545 addr: *mut ::std::os::raw::c_void,
3546 size: jit_uint,
3547 ) -> ::std::os::raw::c_int;
3548
3549 pub fn jit_vmem_protect(
3550 addr: *mut ::std::os::raw::c_void,
3551 size: jit_uint,
3552 prot: jit_prot_t,
3553 ) -> ::std::os::raw::c_int;
3554
3555 pub fn _jit_get_frame_address(
3556 start: *mut ::std::os::raw::c_void,
3557 n: ::std::os::raw::c_uint,
3558 ) -> *mut ::std::os::raw::c_void;
3559
3560 pub fn _jit_get_next_frame_address(
3561 frame: *mut ::std::os::raw::c_void,
3562 ) -> *mut ::std::os::raw::c_void;
3563
3564 pub fn _jit_get_return_address(
3565 frame: *mut ::std::os::raw::c_void,
3566 frame0: *mut ::std::os::raw::c_void,
3567 return0: *mut ::std::os::raw::c_void,
3568 ) -> *mut ::std::os::raw::c_void;
3569}
3570#[repr(C)]
3571#[derive(Debug, Copy, Clone)]
3572pub struct jit_crawl_mark_t {
3573 pub mark: *mut ::std::os::raw::c_void,
3574}
3575
3576extern "C" {
3577 pub fn jit_frame_contains_crawl_mark(
3578 frame: *mut ::std::os::raw::c_void,
3579 mark: *mut jit_crawl_mark_t,
3580 ) -> ::std::os::raw::c_int;
3581}
3582pub type __builtin_va_list = [__va_list_tag; 1usize];
3583#[repr(C)]
3584#[derive(Debug, Copy, Clone)]
3585pub struct __va_list_tag {
3586 pub gp_offset: ::std::os::raw::c_uint,
3587 pub fp_offset: ::std::os::raw::c_uint,
3588 pub overflow_arg_area: *mut ::std::os::raw::c_void,
3589 pub reg_save_area: *mut ::std::os::raw::c_void,
3590}
3591
3592#[test]
3593fn sanity() {
3594 unsafe {
3595 let ctx = jit_context_create();
3596
3597 jit_context_build_start(ctx);
3598
3599 let mut params = vec![];
3600 params.push(jit_type_int);
3601 params.push(jit_type_int);
3602
3603 let sig = jit_type_create_signature(
3604 jit_abi_t_jit_abi_cdecl,
3605 jit_type_int,
3606 params.as_mut_ptr(),
3607 params.len() as u32,
3608 1,
3609 );
3610
3611 let func = jit_function_create(ctx, sig);
3612
3613 let x_param = jit_value_get_param(func, 0);
3614 let y_param = jit_value_get_param(func, 1);
3615
3616 let temp = jit_insn_add(func, x_param, y_param);
3617 jit_insn_return(func, temp);
3618
3619 jit_function_compile(func);
3620 jit_context_build_end(ctx);
3621
3622 let arg_values: Vec<jit_int> = vec![123, 456];
3623 let arg_ptrs: Vec<*const jit_int> =
3624 arg_values.iter().map(|p| p as *const jit_int).collect();
3625 let mut result: jit_int = 0;
3626
3627 jit_function_apply(
3628 func,
3629 std::mem::transmute(arg_ptrs.as_ptr()),
3632 std::mem::transmute(&mut result),
3633 );
3634
3635 jit_context_destroy(ctx);
3636 assert_eq!(result, 123 + 456);
3637 }
3638}