libFirm
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
irmode.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
3
*
4
* This file is part of libFirm.
5
*
6
* This file may be distributed and/or modified under the terms of the
7
* GNU General Public License version 2 as published by the Free Software
8
* Foundation and appearing in the file LICENSE.GPL included in the
9
* packaging of this file.
10
*
11
* Licensees holding valid libFirm Professional Edition licenses may use
12
* this file in accordance with the libFirm Commercial License.
13
* Agreement provided with the Software.
14
*
15
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17
* PURPOSE.
18
*/
19
26
#ifndef FIRM_IR_IRMODE_H
27
#define FIRM_IR_IRMODE_H
28
29
#include "
firm_types.h
"
30
#include "
begin.h
"
31
32
#include <stddef.h>
33
50
typedef
enum
ir_mode_arithmetic
{
51
irma_none
= 1,
54
irma_twos_complement
= 2,
57
irma_ieee754
= 256,
60
irma_x86_extended_float
,
61
irma_last =
irma_x86_extended_float
,
62
}
ir_mode_arithmetic
;
63
80
FIRM_API
ir_mode
*
new_int_mode
(
const
char
*name,
81
ir_mode_arithmetic
arithmetic,
82
unsigned
bit_size,
int
sign,
83
unsigned
modulo_shift);
84
90
FIRM_API
ir_mode
*
new_reference_mode
(
const
char
*name,
91
ir_mode_arithmetic
arithmetic,
92
unsigned
bit_size,
93
unsigned
modulo_shift);
94
105
FIRM_API
ir_mode
*
new_float_mode
(
const
char
*name,
106
ir_mode_arithmetic
arithmetic,
107
unsigned
exponent_size,
108
unsigned
mantissa_size);
109
118
FIRM_API
int
is_mode
(
const
void
*thing);
119
121
FIRM_API
ident
*
get_mode_ident
(
const
ir_mode
*mode);
122
124
FIRM_API
const
char
*
get_mode_name
(
const
ir_mode
*mode);
125
127
FIRM_API
unsigned
get_mode_size_bits
(
const
ir_mode
*mode);
128
131
FIRM_API
unsigned
get_mode_size_bytes
(
const
ir_mode
*mode);
132
136
FIRM_API
int
get_mode_sign
(
const
ir_mode
*mode);
137
139
FIRM_API
ir_mode_arithmetic
get_mode_arithmetic
(
const
ir_mode
*mode);
140
147
FIRM_API
unsigned
int
get_mode_modulo_shift
(
const
ir_mode
*mode);
148
150
FIRM_API
void
*
get_mode_link
(
const
ir_mode
*mode);
151
153
FIRM_API
void
set_mode_link
(
ir_mode
*mode,
void
*l);
154
161
FIRM_API
ir_tarval
*
get_mode_min
(
ir_mode
*mode);
162
169
FIRM_API
ir_tarval
*
get_mode_max
(
ir_mode
*mode);
170
179
FIRM_API
ir_tarval
*
get_mode_null
(
ir_mode
*mode);
180
188
FIRM_API
ir_tarval
*
get_mode_one
(
ir_mode
*mode);
189
196
FIRM_API
ir_tarval
*
get_mode_minus_one
(
ir_mode
*mode);
197
203
FIRM_API
ir_tarval
*
get_mode_all_one
(
ir_mode
*mode);
204
211
FIRM_API
ir_tarval
*
get_mode_infinite
(
ir_mode
*mode);
212
219
FIRM_API
ir_tarval
*
get_mode_NAN
(
ir_mode
*mode);
220
221
FIRM_API
ir_mode
*
mode_M
;
223
FIRM_API
ir_mode
*
mode_F
;
224
FIRM_API
ir_mode
*
mode_D
;
225
FIRM_API
ir_mode
*
mode_Q
;
226
FIRM_API
ir_mode
*
mode_Bs
;
227
FIRM_API
ir_mode
*
mode_Bu
;
228
FIRM_API
ir_mode
*
mode_Hs
;
229
FIRM_API
ir_mode
*
mode_Hu
;
230
FIRM_API
ir_mode
*
mode_Is
;
231
FIRM_API
ir_mode
*
mode_Iu
;
232
FIRM_API
ir_mode
*
mode_Ls
;
233
FIRM_API
ir_mode
*
mode_Lu
;
234
FIRM_API
ir_mode
*
mode_LLs
;
235
FIRM_API
ir_mode
*
mode_LLu
;
237
FIRM_API
ir_mode
*
mode_P
;
238
FIRM_API
ir_mode
*
mode_P_code
;
241
FIRM_API
ir_mode
*
mode_P_data
;
245
FIRM_API
ir_mode
*
mode_b
;
247
FIRM_API
ir_mode
*
mode_X
;
248
FIRM_API
ir_mode
*
mode_BB
;
250
FIRM_API
ir_mode
*
mode_T
;
251
FIRM_API
ir_mode
*
mode_ANY
;
252
FIRM_API
ir_mode
*
mode_BAD
;
255
FIRM_API
ir_mode
*
get_modeF
(
void
);
257
FIRM_API
ir_mode
*
get_modeD
(
void
);
259
FIRM_API
ir_mode
*
get_modeQ
(
void
);
261
FIRM_API
ir_mode
*
get_modeBs
(
void
);
263
FIRM_API
ir_mode
*
get_modeBu
(
void
);
265
FIRM_API
ir_mode
*
get_modeHs
(
void
);
267
FIRM_API
ir_mode
*
get_modeHu
(
void
);
269
FIRM_API
ir_mode
*
get_modeIs
(
void
);
271
FIRM_API
ir_mode
*
get_modeIu
(
void
);
273
FIRM_API
ir_mode
*
get_modeLs
(
void
);
275
FIRM_API
ir_mode
*
get_modeLu
(
void
);
277
FIRM_API
ir_mode
*
get_modeLLs
(
void
);
279
FIRM_API
ir_mode
*
get_modeLLu
(
void
);
281
FIRM_API
ir_mode
*
get_modeP
(
void
);
283
FIRM_API
ir_mode
*
get_modeb
(
void
);
285
FIRM_API
ir_mode
*
get_modeX
(
void
);
287
FIRM_API
ir_mode
*
get_modeBB
(
void
);
289
FIRM_API
ir_mode
*
get_modeM
(
void
);
291
FIRM_API
ir_mode
*
get_modeT
(
void
);
293
FIRM_API
ir_mode
*
get_modeANY
(
void
);
295
FIRM_API
ir_mode
*
get_modeBAD
(
void
);
296
298
FIRM_API
ir_mode
*
get_modeP_code
(
void
);
299
301
FIRM_API
ir_mode
*
get_modeP_data
(
void
);
302
307
FIRM_API
void
set_modeP_code
(
ir_mode
*p);
308
313
FIRM_API
void
set_modeP_data
(
ir_mode
*p);
314
316
FIRM_API
int
mode_is_signed
(
const
ir_mode
*mode);
318
FIRM_API
int
mode_is_float
(
const
ir_mode
*mode);
320
FIRM_API
int
mode_is_int
(
const
ir_mode
*mode);
322
FIRM_API
int
mode_is_reference
(
const
ir_mode
*mode);
324
FIRM_API
int
mode_is_num
(
const
ir_mode
*mode);
326
FIRM_API
int
mode_is_data
(
const
ir_mode
*mode);
328
FIRM_API
int
mode_is_datab
(
const
ir_mode
*mode);
330
FIRM_API
int
mode_is_dataM
(
const
ir_mode
*mode);
331
343
FIRM_API
int
smaller_mode
(
const
ir_mode
*sm,
const
ir_mode
*lm);
344
355
FIRM_API
int
values_in_mode
(
const
ir_mode
*sm,
const
ir_mode
*lm);
356
361
FIRM_API
ir_mode
*
find_unsigned_mode
(
const
ir_mode
*mode);
362
367
FIRM_API
ir_mode
*
find_signed_mode
(
const
ir_mode
*mode);
368
373
FIRM_API
ir_mode
*
find_double_bits_int_mode
(
const
ir_mode
*mode);
374
379
FIRM_API
int
mode_honor_signed_zeros
(
const
ir_mode
*mode);
380
384
FIRM_API
int
mode_overflow_on_unary_Minus
(
const
ir_mode
*mode);
385
392
FIRM_API
int
mode_wrap_around
(
const
ir_mode
*mode);
393
397
FIRM_API
ir_mode
*
get_reference_mode_signed_eq
(
ir_mode
*mode);
398
402
FIRM_API
void
set_reference_mode_signed_eq
(
ir_mode
*ref_mode,
ir_mode
*int_mode);
403
407
FIRM_API
ir_mode
*
get_reference_mode_unsigned_eq
(
ir_mode
*mode);
408
412
FIRM_API
void
set_reference_mode_unsigned_eq
(
ir_mode
*ref_mode,
ir_mode
*int_mode);
413
421
FIRM_API
unsigned
get_mode_mantissa_size
(
const
ir_mode
*mode);
422
426
FIRM_API
unsigned
get_mode_exponent_size
(
const
ir_mode
*mode);
427
433
FIRM_API
int
is_reinterpret_cast
(
const
ir_mode
*src,
const
ir_mode
*dst);
434
438
FIRM_API
ir_type
*
get_type_for_mode
(
const
ir_mode
*mode);
439
441
FIRM_API
size_t
ir_get_n_modes
(
void
);
442
444
FIRM_API
ir_mode
*
ir_get_mode
(
size_t
num);
445
448
#include "
end.h
"
449
450
#endif
libfirm
irmode.h
Generated on Sat Nov 24 2012 19:13:48 for libFirm by
1.8.1.2