%nodes = (
Add => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
emit => '. add %D0, %S0, %SO',
mode => $mode_gp,
attr_type => "arm_shifter_operand_t",
},
Mul => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
reg_req => { in => [ "gp", "gp" ], out => [ "!in_r1" ] },
emit =>'. mul %D0, %S0, %S1',
mode => $mode_gp,
},
Smull => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
reg_req => { in => [ "gp", "gp" ], out => [ "gp", "gp" ] },
emit =>'. smull %D0, %D1, %S0, %S1',
outs => [ "low", "high" ],
},
Umull => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
reg_req => { in => [ "gp", "gp" ], out => [ "gp", "gp" ] },
emit =>'. umull %D0, %D1, %S0, %S1',
outs => [ "low", "high" ],
},
Mla => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
reg_req => { in => [ "gp", "gp", "gp" ], out => [ "!in_r1" ] },
emit =>'. mla %D0, %S0, %S1, %S2',
mode => $mode_gp,
},
And => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
emit => '. and %D0, %S0, %SO',
mode => $mode_gp,
attr_type => "arm_shifter_operand_t",
},
Or => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
emit => '. orr %D0, %S0, %SO',
mode => $mode_gp,
attr_type => "arm_shifter_operand_t",
},
Eor => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
emit => '. eor %D0, %S0, %SO',
mode => $mode_gp,
attr_type => "arm_shifter_operand_t",
},
Bic => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
emit => '. bic %D0, %S0, %SO',
mode => $mode_gp,
attr_type => "arm_shifter_operand_t",
},
Sub => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
emit => '. sub %D0, %S0, %SO',
mode => $mode_gp,
attr_type => "arm_shifter_operand_t",
},
Rsb => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
emit => '. rsb %D0, %S0, %SO',
mode => $mode_gp,
attr_type => "arm_shifter_operand_t",
},
Mov => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
arity => "variable",
emit => '. mov %D0, %SO',
mode => $mode_gp,
},
Mvn => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
attr_type => "arm_shifter_operand_t",
arity => "variable",
emit => '. mvn %D0, %SO',
constructors => \%unop_shifter_operand_constructors,
},
+Clz => {
+ irn_flags => [ "rematerializable" ],
+ reg_req => { in => [ "gp" ], out => [ "gp" ] },
+ emit =>'. clz %D0, %S0',
+ mode => $mode_gp,
+},
+
# mov lr, pc\n mov pc, XXX -- This combination is used for calls to function
# pointers
LinkMovPC => {
"\tarch_irn_add_flags(res, arch_irn_flags_modify_flags);",
emit => ". mov lr, pc\n".
". mov pc, %SO",
- mode => "mode_T",
},
# mov lr, pc\n ldr pc, XXX -- This combination is used for calls to function
custominit => "arch_irn_add_flags(res, arch_irn_flags_modify_flags);",
emit => ". mov lr, pc\n".
". ldr pc, %SO",
- mode => "mode_T",
},
Bl => {
attr => "ir_entity *entity, int symconst_offset",
custominit => "arch_irn_add_flags(res, arch_irn_flags_modify_flags);",
emit => '. bl %SC',
- mode => "mode_T",
},
# this node produces ALWAYS an empty (tempary) gp reg and cannot be CSE'd
EmptyReg => {
- op_flags => "c",
- irn_flags => "R",
+ op_flags => [ "constlike" ],
+ irn_flags => [ "rematerializable" ],
reg_req => { out => [ "gp" ] },
emit => '. /* %D0 now available for calculations */',
cmp_attr => 'return 1;',
},
CopyB => {
- op_flags => "F|H",
+ op_flags => [ "fragile" ],
state => "pinned",
attr => "unsigned size",
attr_type => "arm_CopyB_attr_t",
},
FrameAddr => {
- op_flags => "c",
- irn_flags => "R",
+ op_flags => [ "constlike" ],
+ irn_flags => [ "rematerializable" ],
attr => "ir_entity *entity, int symconst_offset",
reg_req => { in => [ "gp" ], out => [ "gp" ] },
ins => [ "base" ],
},
SymConst => {
- op_flags => "c",
- irn_flags => "R",
+ op_flags => [ "constlike" ],
+ irn_flags => [ "rematerializable" ],
attr => "ir_entity *entity, int symconst_offset",
reg_req => { out => [ "gp" ] },
attr_type => "arm_SymConst_attr_t",
},
Cmp => {
- irn_flags => "R|F",
+ irn_flags => [ "rematerializable", "modify_flags" ],
emit => '. cmp %S0, %SO',
mode => $mode_flags,
attr_type => "arm_cmp_attr_t",
},
Tst => {
- irn_flags => "R|F",
+ irn_flags => [ "rematerializable", "modify_flags" ],
emit => '. tst %S0, %SO',
mode => $mode_flags,
attr_type => "arm_cmp_attr_t",
},
B => {
- op_flags => "L|X|Y",
+ op_flags => [ "labeled", "cfopcode", "forking" ],
state => "pinned",
mode => "mode_T",
reg_req => { in => [ "flags" ], out => [ "none", "none" ] },
Jmp => {
state => "pinned",
- op_flags => "X",
- irn_flags => "J",
+ op_flags => [ "cfopcode" ],
+ irn_flags => [ "simple_jump" ],
reg_req => { out => [ "none" ] },
mode => "mode_X",
},
SwitchJmp => {
- op_flags => "L|X|Y",
+ op_flags => [ "labeled", "cfopcode", "forking" ],
state => "pinned",
mode => "mode_T",
attr => "int n_projs, long def_proj_num",
},
Ldr => {
- op_flags => "L|F",
+ op_flags => [ "labeled", "fragile" ],
state => "exc_pinned",
ins => [ "ptr", "mem" ],
outs => [ "res", "M" ],
},
Str => {
- op_flags => "L|F",
+ op_flags => [ "labeled", "fragile" ],
state => "exc_pinned",
ins => [ "ptr", "val", "mem" ],
- outs => [ "mem" ],
+ outs => [ "M" ],
reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] },
emit => '. str%SM %S1, [%S0, #%O]',
mode => "mode_M",
},
StoreStackM4Inc => {
- op_flags => "L|F",
- irn_flags => "R",
+ op_flags => [ "labeled", "fragile" ],
+ irn_flags => [ "rematerializable" ],
state => "exc_pinned",
reg_req => { in => [ "sp", "gp", "gp", "gp", "gp", "none" ], out => [ "sp:I|S", "none" ] },
emit => '. stmfd %S0!, {%S1, %S2, %S3, %S4}',
},
LoadStackM3Epilogue => {
- op_flags => "L|F",
- irn_flags => "R",
+ op_flags => [ "labeled", "fragile" ],
+ irn_flags => [ "rematerializable" ],
state => "exc_pinned",
reg_req => { in => [ "sp", "none" ], out => [ "r11:I", "sp:I|S", "pc:I", "none" ] },
emit => '. ldmfd %S0, {%D0, %D1, %D2}',
Adf => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
reg_req => { in => [ "fpa", "fpa" ], out => [ "fpa" ] },
emit => '. adf%AM %D0, %S0, %S1',
attr_type => "arm_farith_attr_t",
},
Muf => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
reg_req => { in => [ "fpa", "fpa" ], out => [ "fpa" ] },
emit =>'. muf%AM %D0, %S0, %S1',
attr_type => "arm_farith_attr_t",
},
Suf => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
reg_req => { in => [ "fpa", "fpa" ], out => [ "fpa" ] },
emit => '. suf%AM %D0, %S0, %S1',
attr_type => "arm_farith_attr_t",
},
Mvf => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
reg_req => { in => [ "fpa" ], out => [ "fpa" ] },
emit => '. mvf%AM %S0, %D0',
attr_type => "arm_farith_attr_t",
},
FltX => {
- irn_flags => "R",
+ irn_flags => [ "rematerializable" ],
reg_req => { in => [ "gp" ], out => [ "fpa" ] },
emit => '. flt%AM %D0, %S0',
attr_type => "arm_farith_attr_t",
},
Cmfe => {
- irn_flags => "R|F",
+ irn_flags => [ "rematerializable", "modify_flags" ],
mode => $mode_flags,
attr_type => "arm_cmp_attr_t",
attr => "bool ins_permuted",
},
Ldf => {
- op_flags => "L|F",
+ op_flags => [ "labeled", "fragile" ],
state => "exc_pinned",
ins => [ "ptr", "mem" ],
outs => [ "res", "M" ],
},
Stf => {
- op_flags => "L|F",
+ op_flags => [ "labeled", "fragile" ],
state => "exc_pinned",
ins => [ "ptr", "val", "mem" ],
outs => [ "M" ],
# floating point constants
#
fConst => {
- op_flags => "c",
- irn_flags => "R",
+ op_flags => [ "constlike" ],
+ irn_flags => [ "rematerializable" ],
attr => "tarval *tv",
init_attr => "attr->tv = tv;",
mode => "get_tarval_mode(tv)",