add extra info for immediate float mode
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Fri, 30 May 2008 13:36:52 +0000 (13:36 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Fri, 30 May 2008 13:36:52 +0000 (13:36 +0000)
[r19841]

include/libfirm/be.h
ir/be/TEMPLATE/bearch_TEMPLATE.c
ir/be/arm/bearch_arm.c
ir/be/bemain.c
ir/be/ia32/bearch_ia32.c
ir/be/mips/bearch_mips.c
ir/be/ppc32/bearch_ppc32.c

index 202162a..56c9dff 100644 (file)
  * propagated to the libFirm parameter set.
  */
 typedef struct backend_params {
-       /** if set, the backend cannot handle DWORD access */
+       /** If set, the backend cannot handle DWORD access. */
        unsigned do_dw_lowering:1;
-       /** if set, the backend supports inline assembly */
+       /** If set, the backend supports inline assembly. */
        unsigned support_inline_asm:1;
+       /** If set, the target architecture use an immediate floating point mode. */
+       unsigned has_imm_fp_mode:1;
 
        /** Additional opcodes settings. */
        const arch_ops_info *arch_op_settings;
 
-       /** Settings for architecture dependent optimizations */
+       /** Settings for architecture dependent optimizations. */
        const ir_settings_arch_dep_t *dep_param;
 
-       /** the architecture specific intrinsic function creator */
+       /** The architecture specific intrinsic function creator. */
        create_intrinsic_fkt *arch_create_intrinsic_fkt;
 
-       /** the context parameter for the create intrinsic function */
+       /** The context parameter for the create intrinsic function. */
        void *create_intrinsic_ctx;
 
-       /** backend settings for if-conversion */
+       /** Backend settings for if-conversion. */
        const ir_settings_if_conv_t *if_conv_info;
+
+       /** The immediate floating point mode. Temporaries are calculated using this mode. */
+       ir_mode *imm_fp_mode;
 } backend_params;
 
 /**
index 0629ad4..926dcb9 100644 (file)
@@ -633,11 +633,13 @@ static const backend_params *TEMPLATE_get_backend_params(void) {
        static backend_params p = {
                0,     /* no dword lowering */
                0,     /* no inline assembly */
+               0,     /* no immediate floating point mode. */
                NULL,  /* no additional opcodes */
                NULL,  /* will be set later */
                NULL,  /* no creator function */
                NULL,  /* context for create_intrinsic_fkt */
                NULL,  /* parameter for if conversion */
+               NULL   /* no immediate fp mode */
        };
        return &p;
 }
index 77a1631..fb56d99 100644 (file)
@@ -1193,11 +1193,13 @@ static const backend_params *arm_get_libfirm_params(void) {
        static backend_params p = {
                1,     /* need dword lowering */
                0,     /* don't support inline assembler yet */
+               0,     /* no immediate floating point mode. */
                NULL,  /* no additional opcodes */
                NULL,  /* will be set later */
                NULL,  /* but yet no creator function */
                NULL,  /* context for create_intrinsic_fkt */
                NULL,  /* will be set below */
+               NULL   /* no immediate fp mode */
        };
 
        p.dep_param    = &ad;
index 8da5054..42eac6d 100644 (file)
@@ -214,12 +214,14 @@ int be_parse_arg(const char *arg) {
 /** The be parameters returned by default, all off. */
 static const backend_params be_params = {
        0,    /* need dword lowering */
-       0,    /* don't support inlien assembler yet */
+       0,    /* don't support inline assembler yet */
+       0,     /* no immediate floating point mode. */
        NULL, /* no additional opcodes */
        NULL, /* will be set later */
        NULL, /* but yet no creator function */
        NULL, /* context for create_intrinsic_fkt */
        NULL, /* no if conversion settings */
+       NULL   /* no immediate fp mode */
 };
 
 /* Perform schedule verification if requested. */
index 9edb3cc..108a771 100644 (file)
@@ -2173,11 +2173,13 @@ static const backend_params *ia32_get_libfirm_params(void) {
        static backend_params p = {
                1,     /* need dword lowering */
                1,     /* support inline assembly */
+               0,     /* no immediate floating point mode. */
                NULL,  /* no additional opcodes */
                NULL,  /* will be set later */
                ia32_create_intrinsic_fkt,
                &intrinsic_env,  /* context for ia32_create_intrinsic_fkt */
                NULL,  /* will be set below */
+               NULL,
        };
 
        ia32_setup_cg_config();
index 2fdc853..a1e79e2 100644 (file)
@@ -978,11 +978,13 @@ static const backend_params *mips_get_libfirm_params(void) {
        static backend_params p = {
                1,     /* need dword lowering */
                0,     /* don't support inline assembler yet */
+               0,     /* no immediate floating point mode. */
                NULL,  /* no additional opcodes */
                NULL,  /* will be set later */
                NULL,  /* but yet no creator function */
                NULL,  /* context for create_intrinsic_fkt */
                NULL,  /* no if conversion settings */
+               NULL   /* no immediate fp mode */
        };
 
        return &p;
index 4bab87e..8b914c4 100644 (file)
@@ -913,12 +913,14 @@ static ir_graph **ppc32_get_irg_list(const void *self, ir_graph ***irg_list) {
 static const backend_params *ppc32_get_libfirm_params(void) {
        static backend_params p = {
                1,     /* need dword lowering */
-               0,     /* don't support inlien assembler yet */
+               0,     /* don't support inline assembler yet */
+               0,     /* no immediate floating point mode. */
                NULL,  /* no additional opcodes */
                NULL,  /* will be set later */
                NULL,  /* but yet no creator function */
                NULL,  /* context for create_intrinsic_fkt */
                NULL,  /* no if conversion settings */
+               NULL   /* no immediate fp mode */
        };
 
        return &p;