Commit d6e60c61 authored by Matthias Braun's avatar Matthias Braun
Browse files

lower_dw: do not guess modes anymore, let backends specify single word modes

parent bf0605b3
......@@ -300,9 +300,13 @@ static ir_entity *ia32_create_intrinsic_fkt(ir_type *method, const ir_op *op,
void ia32_lower64(void)
{
/* perform doubleword lowering */
ir_mode *word_unsigned = ia32_reg_classes[CLASS_ia32_gp].mode;
ir_mode *word_signed = find_signed_mode(word_unsigned);
lwrdw_param_t lower_dw_params = {
ia32_create_intrinsic_fkt,
NULL,
word_unsigned,
word_signed,
64, /* doubleword size */
be_is_big_endian(),
};
......
......@@ -12,6 +12,7 @@
#include "panic.h"
#include "sparc_nodes_attr.h"
#include "gen_sparc_new_nodes.h"
#include "gen_sparc_regalloc_if.h"
#include "lower_dw.h"
#include "ircons_t.h"
......@@ -124,9 +125,13 @@ static ir_entity *create_64_intrinsic_fkt(ir_type *method, const ir_op *op,
void sparc_lower_64bit(void)
{
ir_mode *word_unsigned = sparc_reg_classes[CLASS_sparc_gp].mode;
ir_mode *word_signed = find_signed_mode(word_unsigned);
lwrdw_param_t lower_dw_params = {
create_64_intrinsic_fkt,
NULL,
word_unsigned,
word_signed,
64, /* doubleword size */
be_is_big_endian(),
};
......
This diff is collapsed.
......@@ -42,6 +42,8 @@ typedef ir_entity *(create_intrinsic_fkt)(ir_type *method, const ir_op *op,
typedef struct lwrdw_param_t {
create_intrinsic_fkt *create_intrinsic; /**< callback that creates the intrinsic entity */
void *ctx; /**< context parameter for the creator function */
ir_mode *word_unsigned; /**< mode for unsigned word */
ir_mode *word_signed; /**< mode for signed word */
unsigned short doubleword_size; /**< bitsize of the doubleword mode */
bool big_endian:1; /**< target is big endian if true,
else little endian */
......
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