modified_flags => $status_flags,
},
+# "allocates" a free register
+ProduceVal => {
+ op_flags => "c",
+ irn_flags => "R",
+ reg_req => { out => [ "gp" ] },
+ emit => "",
+ units => [ ],
+ latency => 0,
+ mode => $mode_gp,
+ cmp_attr => "return 1;",
+},
+
#-----------------------------------------------------------------#
# _ _ _ #
# (_) | | | | #
Cltd => {
# we should not rematrialize this node. It has very strict constraints.
- reg_req => { in => [ "eax" ], out => [ "edx" ] },
- ins => [ "val" ],
+ reg_req => { in => [ "eax", "edx" ], out => [ "edx" ] },
+ ins => [ "val", "clobbered" ],
emit => '. cltd',
latency => 1,
mode => $mode_gp,
(void)orig;
if (ia32_cg_config.use_short_sex_eax) {
- const arch_register_class_t *reg_class = &ia32_reg_classes[CLASS_ia32_gp];
- ir_node *in[2];
-
- res = new_bd_ia32_Cltd(dbgi, block, val);
- in[0] = res;
- in[1] = val;
- be_new_Keep(reg_class, current_ir_graph, block, 2, in);
+ ir_node *pval = new_bd_ia32_ProduceVal(dbgi, block);
+ be_dep_on_frame(pval);
+ res = new_bd_ia32_Cltd(dbgi, block, val, pval);
} else {
ir_node *imm31 = create_Immediate(NULL, 0, 31);
res = new_bd_ia32_Sar(dbgi, block, val, imm31);