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

only use addressmode for 32 bit modes

[r13961]
parent 2676e9c4
......@@ -86,7 +86,8 @@ enum {
ia32_pn_Cmp_Unsigned = 0x100 /**< set this flag in a pnc to indicate an unsigned compare operation */
};
typedef struct _ia32_attr_t {
typedef struct ia32_attr_t ia32_attr_t;
struct ia32_attr_t {
struct {
unsigned tp:3; /**< ia32 node type */
unsigned imm_tp:2; /**< ia32 immop type */
......@@ -146,6 +147,6 @@ typedef struct _ia32_attr_t {
/* must be last, dynamic */
const arch_register_t *slots[1]; /**< register slots for assigned registers */
} ia32_attr_t;
};
#endif /* FIRM_BE_IA32_IA32_NODES_ATTR_H */
......@@ -1403,6 +1403,14 @@ static void optimize_am(ir_node *irn, void *env) {
}
}
if (dest_possible) {
assert(is_ia32_Load(load));
ir_mode *lsmode = get_ia32_ls_mode(load);
if(get_mode_size_bits(lsmode) != 32) {
dest_possible = 0;
}
}
if (dest_possible) {
/* all conditions fullfilled, do the transformation */
assert(cand & IA32_AM_CAND_LEFT);
......@@ -1474,6 +1482,14 @@ static void optimize_am(ir_node *irn, void *env) {
}
}
if (source_possible) {
assert(is_ia32_Load(load));
ir_mode *ls_mode = get_ia32_ls_mode(load);
if(get_mode_size_bits(ls_mode) != 32)
source_possible = 0;
}
if (source_possible) {
addr_b = get_irn_n(load, 0);
addr_i = get_irn_n(load, 1);
......
......@@ -275,7 +275,8 @@ $arch = "ia32";
# |_| #
#--------------------------------------------------#
$default_cmp_attr = "return ia32_compare_attr(attr_a, attr_b);";
$default_cmp_attr = "return ia32_compare_attr(attr_a, attr_b);";
$default_attr_type = "ia32_attr_t";
%operands = (
);
......@@ -289,6 +290,13 @@ $fpcw_flags = [ "FP_IM", "FP_DM", "FP_ZM", "FP_OM", "FP_UM", "FP_PM",
%nodes = (
#Immediate => {
# irn_flags => "i",
# reg_req => { out => [ "NoReg_GP" ] },
# mode => $mode_gp,
# attr_type => "ia32_imm_t",
#},
#-----------------------------------------------------------------#
# _ _ _ #
# (_) | | | | #
......
Supports Markdown
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