Commit 0ac34044 authored by Matthias Braun's avatar Matthias Braun
Browse files

ia32: Cleanup

parent 69b619f9
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "beirg.h" #include "beirg.h"
#include "pmap.h" #include "pmap.h"
#include "x86_cconv.h" #include "x86_cconv.h"
#include "x86_x87.h"
#ifdef NDEBUG #ifdef NDEBUG
#define SET_IA32_ORIG_NODE(n, o) ((void)(n), (void)(o), (void)0) #define SET_IA32_ORIG_NODE(n, o) ((void)(n), (void)(o), (void)0)
...@@ -25,7 +24,7 @@ ...@@ -25,7 +24,7 @@
#define IA32_REGISTER_SIZE 4 #define IA32_REGISTER_SIZE 4
typedef struct ia32_irg_data_t { typedef struct ia32_irg_data_t {
unsigned do_x87_sim:1; /**< set to 1 if x87 simulation should be enforced */ bool do_x87_sim; /**< Should simulate x87 register stack. */
ir_node *noreg_gp; /**< unique NoReg_GP node */ ir_node *noreg_gp; /**< unique NoReg_GP node */
ir_node *noreg_fp; /**< unique NoReg_FP node */ ir_node *noreg_fp; /**< unique NoReg_FP node */
ir_node *noreg_xmm; /**< unique NoReg_XMM node */ ir_node *noreg_xmm; /**< unique NoReg_XMM node */
...@@ -46,7 +45,7 @@ extern ir_mode *ia32_mode_flags; ...@@ -46,7 +45,7 @@ extern ir_mode *ia32_mode_flags;
static inline ia32_irg_data_t *ia32_get_irg_data(const ir_graph *irg) static inline ia32_irg_data_t *ia32_get_irg_data(const ir_graph *irg)
{ {
return (ia32_irg_data_t*) be_birg_from_irg(irg)->isa_link; return (ia32_irg_data_t*)be_birg_from_irg(irg)->isa_link;
} }
static inline void ia32_request_x87_sim(ir_graph const *const irg) static inline void ia32_request_x87_sim(ir_graph const *const irg)
...@@ -104,12 +103,9 @@ static inline bool ia32_is_8bit_val(int32_t const v) ...@@ -104,12 +103,9 @@ static inline bool ia32_is_8bit_val(int32_t const v)
* Determine how function parameters and return values are passed. * Determine how function parameters and return values are passed.
* Decides what goes to register or to stack and what stack offsets/ * Decides what goes to register or to stack and what stack offsets/
* datatypes are used. * datatypes are used.
*
* @param function_type the type of the caller/callee function
* @param caller true for convention for the caller, false for callee
*/ */
x86_cconv_t *ia32_decide_calling_convention(ir_type *function_type, x86_cconv_t *ia32_decide_calling_convention(ir_type const *function_type,
ir_graph *irg); ir_graph *irg);
void ia32_cconv_init(void); void ia32_cconv_init(void);
......
...@@ -32,29 +32,6 @@ static const unsigned ignore_regs[] = { ...@@ -32,29 +32,6 @@ static const unsigned ignore_regs[] = {
static const arch_register_t* const default_param_regs[] = {}; static const arch_register_t* const default_param_regs[] = {};
static const arch_register_t* const float_param_regs[] = {}; static const arch_register_t* const float_param_regs[] = {};
#if 0
static const arch_register_t* const regparam_param_regs[] = {
&ia32_registers[REG_EAX],
&ia32_registers[REG_EDX],
&ia32_registers[REG_ECX],
};
static const arch_register_t* const this_param_regs[] = {
&ia32_registers[REG_ECX],
};
static const arch_register_t* const sse_param_regs[] = {
&ia32_registers[REG_XMM0],
&ia32_registers[REG_XMM1],
&ia32_registers[REG_XMM2],
&ia32_registers[REG_XMM3],
&ia32_registers[REG_XMM4],
&ia32_registers[REG_XMM5],
&ia32_registers[REG_XMM6],
&ia32_registers[REG_XMM7],
};
#endif
static const arch_register_t* const result_regs[] = { static const arch_register_t* const result_regs[] = {
&ia32_registers[REG_EAX], &ia32_registers[REG_EAX],
&ia32_registers[REG_EDX], &ia32_registers[REG_EDX],
...@@ -64,12 +41,6 @@ static const arch_register_t* const float_result_regs[] = { ...@@ -64,12 +41,6 @@ static const arch_register_t* const float_result_regs[] = {
&ia32_registers[REG_ST0], &ia32_registers[REG_ST0],
}; };
#if 0
static const arch_register_t* const sse_result_regs[] = {
&ia32_registers[REG_XMM0],
};
#endif
static const unsigned caller_saves_gp[] = { static const unsigned caller_saves_gp[] = {
REG_EAX, REG_EAX,
REG_ECX, REG_ECX,
...@@ -117,7 +88,7 @@ static void check_omit_fp(ir_node *node, void *env) ...@@ -117,7 +88,7 @@ static void check_omit_fp(ir_node *node, void *env)
} }
} }
x86_cconv_t *ia32_decide_calling_convention(ir_type *function_type, x86_cconv_t *ia32_decide_calling_convention(ir_type const *const function_type,
ir_graph *irg) ir_graph *irg)
{ {
bool omit_fp = false; bool omit_fp = false;
......
...@@ -59,8 +59,7 @@ ENUM_BITSET(match_flags_t) ...@@ -59,8 +59,7 @@ ENUM_BITSET(match_flags_t)
typedef struct ia32_op_attr_t ia32_op_attr_t; typedef struct ia32_op_attr_t ia32_op_attr_t;
struct ia32_op_attr_t { struct ia32_op_attr_t {
//match_flags_t flags; unsigned latency;
unsigned latency;
}; };
#ifndef NDEBUG #ifndef NDEBUG
......
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