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

implement some int to float conversions

[r27738]
parent fd5331da
......@@ -91,7 +91,8 @@ static bool has_cmp_attr(const ir_node *node)
static bool has_farith_attr(const ir_node *node)
{
return is_arm_Dvf(node) || is_arm_Adf(node);
return is_arm_Adf(node) || is_arm_Muf(node) || is_arm_Suf(node)
|| is_arm_Dvf(node) || is_arm_Mvf(node) || is_arm_FltX(node);
}
/**
......
......@@ -515,6 +515,15 @@ Mvf => {
mode => $mode_fp,
},
FltX => {
irn_flags => "R",
reg_req => { in => [ "gp" ], out => [ "fpa" ] },
emit => '. flt%AM %D0, %S0',
attr_type => "arm_farith_attr_t",
attr => "ir_mode *op_mode",
mode => $mode_fp,
},
Cmfe => {
irn_flags => "R|F",
mode => $mode_flags,
......
......@@ -227,7 +227,11 @@ static ir_node *gen_Conv(ir_node *node)
}
} else {
/* from int to float */
panic("TODO");
if (!mode_is_signed(src_mode)) {
panic("TODO");
} else {
return new_bd_arm_FltX(dbg, block, new_op, dst_mode);
}
}
} else if (USE_VFP(env_cg->isa)) {
panic("VFP not supported yet");
......@@ -524,7 +528,7 @@ static ir_node *gen_Sub(ir_node *node)
}
} else {
return gen_int_binop(node, MATCH_SIZE_NEUTRAL,
new_bd_arm_Sub_reg, new_bd_arm_Sub_imm);
new_bd_arm_Sub_reg, new_bd_arm_Sub_imm);
}
}
......
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