Commit 7190d163 authored by Matthias Braun's avatar Matthias Braun
Browse files

backend can report back float point arithmetic mode

[r24603]
parent 14c762cc
......@@ -82,6 +82,12 @@ typedef struct backend_params {
/** Backend settings for if-conversion. */
const ir_settings_if_conv_t *if_conv_info;
/**
* some backends like x87 can only do arithmetic in a specific float
* mode (but convert to/from other float modes).
*/
ir_mode *mode_float_arithmetic;
/** Size of the trampoline code. */
unsigned trampoline_size;
......
......@@ -553,6 +553,7 @@ static const backend_params *TEMPLATE_get_backend_params(void) {
NULL, /* no creator function */
NULL, /* context for create_intrinsic_fkt */
NULL, /* parameter for if conversion */
NULL, /* float arithmetic mode */
0, /* no trampoline support: size 0 */
0, /* no trampoline support: align 0 */
NULL /* no trampoline support: no trampoline builder */
......
......@@ -1123,7 +1123,8 @@ static const backend_params *arm_get_libfirm_params(void) {
NULL, /* will be set later */
NULL, /* but yet no creator function */
NULL, /* context for create_intrinsic_fkt */
NULL, /* will be set below */
NULL, /* ifconv_info will be set below */
NULL, /* float arithmetic mode (TODO) */
0, /* no trampoline support: size 0 */
0, /* no trampoline support: align 0 */
NULL /* no trampoline support: no trampoline builder */
......
......@@ -348,6 +348,7 @@ static const backend_params be_params = {
NULL, /* but yet no creator function */
NULL, /* context for create_intrinsic_fkt */
NULL, /* no if conversion settings */
NULL, /* no float arithmetic mode */
0, /* no trampoline support: size 0 */
0, /* no trampoline support: align 0 */
NULL /* no trampoline support: no trampoline builder */
......
......@@ -2349,7 +2349,8 @@ static const backend_params *ia32_get_libfirm_params(void) {
NULL, /* will be set later */
ia32_create_intrinsic_fkt,
&intrinsic_env, /* context for ia32_create_intrinsic_fkt */
NULL, /* will be set below */
NULL, /* ifconv info will be set below */
NULL, /* float arithmetic mode, will be set below */
12, /* size of trampoline code */
4, /* alignment of trampoline code */
ia32_create_trampoline_fkt,
......@@ -2361,8 +2362,9 @@ static const backend_params *ia32_get_libfirm_params(void) {
* is called... */
init_asm_constraints();
p.dep_param = &ad;
p.if_conv_info = &ifconv;
p.dep_param = &ad;
p.if_conv_info = &ifconv;
p.mode_float_arithmetic = mode_E;
return &p;
}
......
......@@ -781,6 +781,7 @@ static const backend_params *mips_get_libfirm_params(void) {
NULL, /* but yet no creator function */
NULL, /* context for create_intrinsic_fkt */
NULL, /* no if conversion settings */
NULL, /* float arithmetic mode (TODO) */
0, /* no trampoline support: size 0 */
0, /* no trampoline support: align 0 */
NULL /* no trampoline support: no trampoline builder */
......
......@@ -824,6 +824,7 @@ static const backend_params *ppc32_get_libfirm_params(void) {
NULL, /* but yet no creator function */
NULL, /* context for create_intrinsic_fkt */
NULL, /* no if conversion settings */
NULL, /* no float arithmetic mode (TODO) */
0, /* no trampoline support: size 0 */
0, /* no trampoline support: align 0 */
NULL /* no trampoline support: no trampoline builder */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment