libFirm
|
Modules | |
Machine Triple | |
Functions to work with machine triples. | |
Target platform information | |
The functions in this API return information about the operating system or runtime system. | |
Functions | |
int | ir_target_set (const char *target_triple) |
Prepares code generation for the target specifiy by target_triple . More... | |
int | ir_target_set_triple (ir_machine_triple_t const *machine) |
Prepares code generation for the target specified by machine . More... | |
int | ir_target_option (char const *option) |
Configures the current target. More... | |
void | ir_target_init (void) |
Initializes the code generation target. More... | |
char const * | ir_target_experimental (void) |
Returns a message if the current target is considered experimental. More... | |
int | ir_target_big_endian (void) |
Returns 1 if target uses big endian byte order, 0 if little endian. More... | |
unsigned | ir_target_biggest_alignment (void) |
Returns the biggest alignment required for any target data access. More... | |
unsigned | ir_target_pointer_size (void) |
Returns the size of a pointer in bytes for the target. More... | |
int | ir_target_supports_pic (void) |
Returns 1 if target supports position independent code, 0 otherwise. More... | |
int | ir_target_fast_unaligned_memaccess (void) |
Returns 1 if unaligned memory accesses are (nearly) as fast as aligned ones, 0 otherwise. More... | |
ir_mode * | ir_target_float_arithmetic_mode (void) |
Returns supported float arithmetic mode or NULL if mode_D and mode_F are supported natively. More... | |
float_int_conversion_overflow_style_t | ir_target_float_int_overflow_style (void) |
Returns a. More... | |
int ir_target_big_endian | ( | void | ) |
Returns 1 if target uses big endian byte order, 0 if little endian.
unsigned ir_target_biggest_alignment | ( | void | ) |
Returns the biggest alignment required for any target data access.
char const* ir_target_experimental | ( | void | ) |
Returns a message if the current target is considered experimental.
int ir_target_fast_unaligned_memaccess | ( | void | ) |
Returns 1 if unaligned memory accesses are (nearly) as fast as aligned ones, 0 otherwise.
ir_mode* ir_target_float_arithmetic_mode | ( | void | ) |
Returns supported float arithmetic mode or NULL if mode_D and mode_F are supported natively.
Some backends like x87 can only do arithmetic in a specific float mode (load/store are still done in the "normal" float/double modes).
float_int_conversion_overflow_style_t ir_target_float_int_overflow_style | ( | void | ) |
Returns a.
void ir_target_init | ( | void | ) |
Initializes the code generation target.
This must be called after using ir_target_set() or ir_target_set_triple() and possibly ir_target_option(). This defines mode_P and finalizes target and platform information which may be queried after.
int ir_target_option | ( | char const * | option | ) |
Configures the current target.
Passes an option to furhter configure the currently selected target. This is allowed after calling ir_target_set() or ir_target_set_triple() but not after calling ir_target_init().
Some available options:
The exact set of options is target and platform specific.
unsigned ir_target_pointer_size | ( | void | ) |
Returns the size of a pointer in bytes for the target.
int ir_target_set | ( | const char * | target_triple | ) |
Prepares code generation for the target specifiy by target_triple
.
target_triple
. Note that preparation isn't finished until ir_target_init() is called.target_triple
is malformed or unsupported. int ir_target_set_triple | ( | ir_machine_triple_t const * | machine | ) |
Prepares code generation for the target specified by machine
.
Note that preparation isn't finished until ir_target_init() is called.
machine
is malformed or unsupported. int ir_target_supports_pic | ( | void | ) |
Returns 1 if target supports position independent code, 0 otherwise.