X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fia32%2Fia32_spec.pl;h=fcb14afdca4b22faa983e55624d621aa2bf4a4ba;hb=bfc8b05685e863c76fc0788bbc1d8ad97b8d699a;hp=a31fd7a43e4d7e88179db4238b970e4280b17aa8;hpb=f8ead9acbe48af00885e64a6f2f895d1b6cae434;p=libfirm diff --git a/ir/be/ia32/ia32_spec.pl b/ir/be/ia32/ia32_spec.pl index a31fd7a43..fcb14afdc 100644 --- a/ir/be/ia32/ia32_spec.pl +++ b/ir/be/ia32/ia32_spec.pl @@ -58,7 +58,7 @@ $mode_fpcw = "ia32_mode_fpcw"; { mode => $mode_fp87 } ], fp_cw => [ # the floating point control word - { name => "fpcw", dwarf => 37, type => "ignore | state" }, + { name => "fpcw", dwarf => 37, type => "state" }, { mode => $mode_fpcw, flags => "manual_ra | state" } ], flags => [ @@ -67,21 +67,8 @@ $mode_fpcw = "ia32_mode_fpcw"; ], ); # %reg_classes -%cpu = ( - GP => [ 1, "GP_EAX", "GP_EBX", "GP_ECX", "GP_EDX", "GP_ESI", "GP_EDI", "GP_EBP" ], - SSE => [ 1, "SSE_XMM0", "SSE_XMM1", "SSE_XMM2", "SSE_XMM3", "SSE_XMM4", "SSE_XMM5", "SSE_XMM6", "SSE_XMM7" ], - VFP => [ 1, "VFP_VF0", "VFP_VF1", "VFP_VF2", "VFP_VF3", "VFP_VF4", "VFP_VF5", "VFP_VF6", "VFP_VF7" ], - BRANCH => [ 1, "BRANCH1", "BRANCH2" ], -); # %cpu - -%vliw = ( - bundle_size => 1, - bundels_per_cycle => 1 -); # vliw - -$default_op_attr_type = "ia32_op_attr_t"; -$default_attr_type = "ia32_attr_t"; -$default_copy_attr = "ia32_copy_attr"; +$default_attr_type = "ia32_attr_t"; +$default_copy_attr = "ia32_copy_attr"; sub ia32_custom_init_attr { my $constr = shift; @@ -160,6 +147,17 @@ $status_flags_wo_cf = [ "PF", "AF", "ZF", "SF", "OF" ]; $fpcw_flags = [ "FP_IM", "FP_DM", "FP_ZM", "FP_OM", "FP_UM", "FP_PM", "FP_PC0", "FP_PC1", "FP_RC0", "FP_RC1", "FP_X" ]; +my %binop_flags_constructors = ( + "" => { + reg_req => { in => [ "gp", "gp", "none", "gp", "gp" ], + out => [ "flags", "none", "none" ] }, + }, + "8bit" => { + reg_req => { in => [ "gp", "gp", "none", "eax ebx ecx edx", "eax ebx ecx edx" ], + out => [ "flags", "none", "none" ] }, + } +); + %nodes = ( Immediate => { @@ -192,7 +190,6 @@ ProduceVal => { irn_flags => [ "rematerializable" ], reg_req => { out => [ "gp" ] }, emit => "", - units => [ ], latency => 0, mode => $mode_gp, cmp_attr => "return 1;", @@ -207,7 +204,6 @@ Add => { outs => [ "res", "flags", "M" ], emit => 'add%M %B', am => "source,binary", - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -219,7 +215,6 @@ AddMem => { reg_req => { in => [ "gp", "gp", "none", "gp" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "val" ], emit => "add%M %#S3, %AM", - units => [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -231,7 +226,6 @@ AddMem8Bit => { reg_req => { in => [ "gp", "gp", "none", "eax ebx ecx edx" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "val" ], emit => "add%M %#S3, %AM", - units => [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -245,7 +239,6 @@ Adc => { outs => [ "res", "flags", "M" ], emit => 'adc%M %B', am => "source,binary", - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -274,7 +267,6 @@ Mul => { outs => [ "res_low", "flags", "M", "res_high" ], am => "source,binary", latency => 10, - units => [ "GP" ], modified_flags => $status_flags }, @@ -296,7 +288,6 @@ IMul => { outs => [ "res", "flags", "M" ], am => "source,binary", latency => 5, - units => [ "GP" ], mode => $mode_gp, modified_flags => $status_flags }, @@ -311,7 +302,6 @@ IMul1OP => { outs => [ "res_low", "flags", "M", "res_high" ], am => "source,binary", latency => 5, - units => [ "GP" ], modified_flags => $status_flags }, @@ -331,7 +321,6 @@ And => { outs => [ "res", "flags", "M" ], am => "source,binary", emit => 'and%M %B', - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -343,7 +332,6 @@ AndMem => { reg_req => { in => [ "gp", "gp", "none", "gp" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "val" ], emit => 'and%M %#S3, %AM', - units => [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -355,7 +343,6 @@ AndMem8Bit => { reg_req => { in => [ "gp", "gp", "none", "eax ebx ecx edx" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "val" ], emit => 'and%M %#S3, %AM', - units => [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -370,7 +357,6 @@ Or => { outs => [ "res", "flags", "M" ], am => "source,binary", emit => 'or%M %B', - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -382,7 +368,6 @@ OrMem => { reg_req => { in => [ "gp", "gp", "none", "gp" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "val" ], emit => 'or%M %#S3, %AM', - units => [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -394,7 +379,6 @@ OrMem8Bit => { reg_req => { in => [ "gp", "gp", "none", "eax ebx ecx edx" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "val" ], emit => 'or%M %#S3, %AM', - units => [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -409,7 +393,6 @@ Xor => { outs => [ "res", "flags", "M" ], am => "source,binary", emit => 'xor%M %B', - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -421,7 +404,6 @@ Xor0 => { reg_req => { out => [ "gp", "flags" ] }, outs => [ "res", "flags" ], emit => "xor%M %D0, %D0", - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -433,7 +415,6 @@ XorMem => { reg_req => { in => [ "gp", "gp", "none", "gp" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "val" ], emit => 'xor%M %#S3, %AM', - units => [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -445,7 +426,6 @@ XorMem8Bit => { reg_req => { in => [ "gp", "gp", "none", "eax ebx ecx edx" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "val" ], emit => 'xor%M %#S3, %AM', - units => [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -460,7 +440,6 @@ Sub => { outs => [ "res", "flags", "M" ], am => "source,binary", emit => 'sub%M %B', - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -472,7 +451,6 @@ SubMem => { reg_req => { in => [ "gp", "gp", "none", "gp" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "subtrahend" ], emit => 'sub%M %#S3, %AM', - units => [ "GP" ], latency => 1, mode => 'mode_M', modified_flags => $status_flags @@ -484,7 +462,6 @@ SubMem8Bit => { reg_req => { in => [ "gp", "gp", "none", "eax ebx ecx edx" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "subtrahend" ], emit => 'sub%M %#S3, %AM', - units => [ "GP" ], latency => 1, mode => 'mode_M', modified_flags => $status_flags @@ -498,7 +475,6 @@ Sbb => { outs => [ "res", "flags", "M" ], am => "source,binary", emit => 'sbb%M %B', - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -510,7 +486,6 @@ Sbb0 => { reg_req => { in => [ "flags" ], out => [ "gp", "flags" ] }, outs => [ "res", "flags" ], emit => "sbb%M %D0, %D0", - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -538,7 +513,6 @@ IDiv => { am => "source,unary", emit => "idiv%M %AS3", latency => 25, - units => [ "GP" ], modified_flags => $status_flags }, @@ -552,7 +526,6 @@ Div => { am => "source,unary", emit => "div%M %AS3", latency => 25, - units => [ "GP" ], modified_flags => $status_flags }, @@ -563,7 +536,6 @@ Shl => { ins => [ "val", "count" ], outs => [ "res", "flags" ], emit => 'shl%M % [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -575,7 +547,6 @@ ShlMem => { reg_req => { in => [ "gp", "gp", "none", "ecx" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "count" ], emit => 'shl%M % [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -589,7 +560,6 @@ ShlD => { outs => [ "res", "flags" ], emit => "shld%M % 6, - units => [ "GP" ], mode => $mode_gp, modified_flags => $status_flags }, @@ -601,7 +571,6 @@ Shr => { ins => [ "val", "count" ], outs => [ "res", "flags" ], emit => 'shr%M % [ "GP" ], mode => $mode_gp, latency => 1, modified_flags => $status_flags @@ -613,7 +582,6 @@ ShrMem => { reg_req => { in => [ "gp", "gp", "none", "ecx" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "count" ], emit => 'shr%M % [ "GP" ], mode => "mode_M", latency => 1, modified_flags => $status_flags @@ -627,7 +595,6 @@ ShrD => { outs => [ "res", "flags" ], emit => "shrd%M % 6, - units => [ "GP" ], mode => $mode_gp, modified_flags => $status_flags }, @@ -639,7 +606,6 @@ Sar => { ins => [ "val", "count" ], outs => [ "res", "flags" ], emit => 'sar%M % [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -651,7 +617,6 @@ SarMem => { reg_req => { in => [ "gp", "gp", "none", "ecx" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "count" ], emit => 'sar%M % [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -664,7 +629,6 @@ Ror => { ins => [ "val", "count" ], outs => [ "res", "flags" ], emit => 'ror%M % [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -676,7 +640,6 @@ RorMem => { reg_req => { in => [ "gp", "gp", "none", "ecx" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "count" ], emit => 'ror%M % [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -689,7 +652,6 @@ Rol => { ins => [ "val", "count" ], outs => [ "res", "flags" ], emit => 'rol%M % [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -701,7 +663,6 @@ RolMem => { reg_req => { in => [ "gp", "gp", "none", "ecx" ], out => [ "none" ] }, ins => [ "base", "index", "mem", "count" ], emit => 'rol%M % [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -714,7 +675,6 @@ Neg => { emit => 'neg%M %S0', ins => [ "val" ], outs => [ "res", "flags" ], - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -726,7 +686,6 @@ NegMem => { reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] }, ins => [ "base", "index", "mem" ], emit => 'neg%M %AM', - units => [ "GP" ], latency => 1, mode => "mode_M", modified_flags => $status_flags @@ -736,7 +695,6 @@ Minus64Bit => { irn_flags => [ "rematerializable" ], reg_req => { in => [ "gp", "gp" ], out => [ "in_r1", "in_r2" ] }, outs => [ "low_res", "high_res" ], - units => [ "GP" ], latency => 3, modified_flags => $status_flags }, @@ -749,7 +707,6 @@ Inc => { ins => [ "val" ], outs => [ "res", "flags" ], emit => 'inc%M %S0', - units => [ "GP" ], mode => $mode_gp, latency => 1, modified_flags => $status_flags_wo_cf @@ -761,7 +718,6 @@ IncMem => { reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] }, ins => [ "base", "index", "mem" ], emit => 'inc%M %AM', - units => [ "GP" ], mode => "mode_M", latency => 1, modified_flags => $status_flags_wo_cf @@ -774,7 +730,6 @@ Dec => { ins => [ "val" ], outs => [ "res", "flags" ], emit => 'dec%M %S0', - units => [ "GP" ], mode => $mode_gp, latency => 1, modified_flags => $status_flags_wo_cf @@ -786,7 +741,6 @@ DecMem => { reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] }, ins => [ "base", "index", "mem" ], emit => 'dec%M %AM', - units => [ "GP" ], mode => "mode_M", latency => 1, modified_flags => $status_flags_wo_cf @@ -799,7 +753,6 @@ Not => { ins => [ "val" ], outs => [ "res" ], emit => 'not%M %S0', - units => [ "GP" ], latency => 1, mode => $mode_gp, # no flags modified @@ -811,7 +764,6 @@ NotMem => { reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] }, ins => [ "base", "index", "mem" ], emit => 'not%M %AM', - units => [ "GP" ], latency => 1, mode => "mode_M", # no flags modified @@ -820,7 +772,6 @@ NotMem => { Cmc => { reg_req => { in => [ "flags" ], out => [ "flags" ] }, emit => 'cmc', - units => [ "GP" ], latency => 1, mode => $mode_flags, modified_flags => $status_flags @@ -829,7 +780,6 @@ Cmc => { Stc => { reg_req => { out => [ "flags" ] }, emit => 'stc', - units => [ "GP" ], latency => 1, mode => $mode_flags, modified_flags => $status_flags @@ -838,8 +788,7 @@ Stc => { Cmp => { irn_flags => [ "rematerializable" ], state => "exc_pinned", - reg_req => { in => [ "gp", "gp", "none", "gp", "gp" ], - out => [ "flags", "none", "none" ] }, + constructors => \%binop_flags_constructors, ins => [ "base", "index", "mem", "left", "right" ], outs => [ "eflags", "unused", "M" ], am => "source,binary", @@ -847,24 +796,6 @@ Cmp => { attr => "bool ins_permuted", init_attr => "attr->data.ins_permuted = ins_permuted;", latency => 1, - units => [ "GP" ], - mode => $mode_flags, - modified_flags => $status_flags -}, - -Cmp8Bit => { - irn_flags => [ "rematerializable" ], - state => "exc_pinned", - reg_req => { in => [ "gp", "gp", "none", "eax ebx ecx edx", "eax ebx ecx edx" ] , - out => [ "flags", "none", "none" ] }, - ins => [ "base", "index", "mem", "left", "right" ], - outs => [ "eflags", "unused", "M" ], - am => "source,binary", - emit => 'cmpb %B', - attr => "bool ins_permuted", - init_attr => "attr->data.ins_permuted = ins_permuted;", - latency => 1, - units => [ "GP" ], mode => $mode_flags, modified_flags => $status_flags }, @@ -877,7 +808,6 @@ XorHighLow => { emit => 'xorb %>S0, % [ "value" ], outs => [ "res", "flags" ], - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags, @@ -886,8 +816,7 @@ XorHighLow => { Test => { irn_flags => [ "rematerializable" ], state => "exc_pinned", - reg_req => { in => [ "gp", "gp", "none", "gp", "gp" ] , - out => [ "flags", "none", "none" ] }, + constructors => \%binop_flags_constructors, ins => [ "base", "index", "mem", "left", "right" ], outs => [ "eflags", "unused", "M" ], am => "source,binary", @@ -895,24 +824,6 @@ Test => { attr => "bool ins_permuted", init_attr => "attr->data.ins_permuted = ins_permuted;", latency => 1, - units => [ "GP" ], - mode => $mode_flags, - modified_flags => $status_flags -}, - -Test8Bit => { - irn_flags => [ "rematerializable" ], - state => "exc_pinned", - reg_req => { in => [ "gp", "gp", "none", "eax ebx ecx edx", "eax ebx ecx edx" ] , - out => [ "flags", "none", "none" ] }, - ins => [ "base", "index", "mem", "left", "right" ], - outs => [ "eflags", "unused", "M" ], - am => "source,binary", - emit => 'testb %B', - attr => "bool ins_permuted", - init_attr => "attr->data.ins_permuted = ins_permuted;", - latency => 1, - units => [ "GP" ], mode => $mode_flags, modified_flags => $status_flags }, @@ -932,7 +843,6 @@ Setcc => { . "\t\t/* attr->latency = 3; */\n" . "\t}\n", latency => 1, - units => [ "GP" ], mode => $mode_gp, }, @@ -946,7 +856,6 @@ SetccMem => { init_attr => "set_ia32_ls_mode(res, mode_Bu);\n", emit => 'set%P3 %AM', latency => 1, - units => [ "GP" ], mode => 'mode_M', }, @@ -963,7 +872,6 @@ CMovcc => { attr_type => "ia32_condcode_attr_t", attr => "ia32_condition_code_t condition_code", latency => 1, - units => [ "GP" ], mode => $mode_gp, }, @@ -976,7 +884,6 @@ Jcc => { attr_type => "ia32_condcode_attr_t", attr => "ia32_condition_code_t condition_code", latency => 2, - units => [ "BRANCH" ], }, SwitchJmp => { @@ -988,7 +895,6 @@ SwitchJmp => { attr_type => "ia32_switch_attr_t", attr => "const ir_switch_table *switch_table", latency => 2, - units => [ "BRANCH" ], }, Jmp => { @@ -997,7 +903,6 @@ Jmp => { op_flags => [ "cfopcode" ], reg_req => { out => [ "none" ] }, latency => 1, - units => [ "BRANCH" ], mode => "mode_X", }, @@ -1011,7 +916,6 @@ IJmp => { am => "source,unary", emit => 'jmp %*AS3', latency => 1, - units => [ "BRANCH" ], mode => "mode_X", }, @@ -1020,7 +924,6 @@ Const => { irn_flags => [ "rematerializable" ], reg_req => { out => [ "gp" ] }, emit => "movl %I, %D0", - units => [ "GP" ], attr => "ir_entity *symconst, int symconst_sign, int no_pic_adjust, long offset", attr_type => "ia32_immediate_attr_t", latency => 1, @@ -1039,7 +942,6 @@ Unknown => { GetEIP => { op_flags => [ "constlike" ], reg_req => { out => [ "gp" ] }, - units => [ "GP" ], latency => 5, mode => $mode_gp, modified_flags => $status_flags, @@ -1050,8 +952,6 @@ NoReg_GP => { op_flags => [ "constlike", "dump_noblock" ], irn_flags => [ "not_scheduled" ], reg_req => { out => [ "gp_NOREG:I" ] }, - units => [], - emit => "", latency => 0, mode => $mode_gp }, @@ -1061,8 +961,6 @@ NoReg_FP => { op_flags => [ "constlike", "dump_noblock" ], irn_flags => [ "not_scheduled" ], reg_req => { out => [ "fp_NOREG:I" ] }, - units => [], - emit => "", mode => $mode_fp87, latency => 0, attr_type => "ia32_x87_attr_t", @@ -1073,8 +971,6 @@ NoReg_XMM => { op_flags => [ "constlike", "dump_noblock" ], irn_flags => [ "not_scheduled" ], reg_req => { out => [ "xmm_NOREG:I" ] }, - units => [], - emit => "", latency => 0, mode => $mode_xmm, }, @@ -1083,22 +979,20 @@ ChangeCW => { state => "pinned", op_flags => [ "constlike" ], irn_flags => [ "not_scheduled" ], - reg_req => { out => [ "fpcw:I" ] }, + reg_req => { out => [ "fpcw" ] }, mode => $mode_fpcw, latency => 3, - units => [ "GP" ], modified_flags => $fpcw_flags }, FldCW => { op_flags => [ "uses_memory" ], state => "pinned", - reg_req => { in => [ "gp", "gp", "none" ], out => [ "fpcw:I" ] }, + reg_req => { in => [ "gp", "gp", "none" ], out => [ "fpcw" ] }, ins => [ "base", "index", "mem" ], latency => 5, emit => "fldcw %AM", mode => $mode_fpcw, - units => [ "GP" ], modified_flags => $fpcw_flags }, @@ -1110,7 +1004,6 @@ FnstCW => { latency => 5, emit => "fnstcw %AM", mode => "mode_M", - units => [ "GP" ], }, FnstCWNOP => { @@ -1130,7 +1023,6 @@ Cltd => { emit => 'cltd', latency => 1, mode => $mode_gp, - units => [ "GP" ], }, # Load / Store @@ -1147,7 +1039,6 @@ Load => { outs => [ "res", "unused", "M", "X_regular", "X_except" ], latency => 0, emit => "mov%#Ml %AM, %D0", - units => [ "GP" ], }, Store => { @@ -1159,7 +1050,6 @@ Store => { outs => [ "M", "X_regular", "X_except" ], emit => 'mov%M %#S3, %AM', latency => 2, - units => [ "GP" ], }, Store8Bit => { @@ -1171,7 +1061,6 @@ Store8Bit => { outs => [ "M", "X_regular", "X_except" ], emit => 'mov%M %#S3, %AM', latency => 2, - units => [ "GP" ], }, Lea => { @@ -1180,7 +1069,6 @@ Lea => { ins => [ "base", "index" ], emit => 'leal %AM, %D0', latency => 2, - units => [ "GP" ], mode => $mode_gp, # lea doesn't modify the flags, but setting this seems advantageous since it # increases chances that the Lea is transformed back to an Add @@ -1195,7 +1083,6 @@ Push => { outs => [ "stack", "M" ], am => "source,unary", latency => 2, - units => [ "GP" ], }, PushEax => { @@ -1205,7 +1092,6 @@ PushEax => { outs => [ "stack" ], emit => 'pushl %%eax', latency => 2, - units => [ "GP" ], mode => $mode_gp, }, @@ -1216,7 +1102,6 @@ Pop => { outs => [ "res", "M", "unused", "stack" ], emit => 'pop%M %D0', latency => 3, # Pop is more expensive than Push on Athlon - units => [ "GP" ], }, PopEbp => { @@ -1226,7 +1111,6 @@ PopEbp => { outs => [ "res", "M", "unused", "stack" ], emit => 'pop%M %D0', latency => 3, # Pop is more expensive than Push on Athlon - units => [ "GP" ], }, CopyEbpEsp => { @@ -1236,7 +1120,6 @@ CopyEbpEsp => { outs => [ "esp" ], emit => 'movl %S0, %D0', latency => 1, - units => [ "GP" ], mode => $mode_gp, }, @@ -1247,7 +1130,6 @@ PopMem => { outs => [ "unused0", "M", "unused1", "stack" ], emit => 'pop%M %AM', latency => 3, # Pop is more expensive than Push on Athlon - units => [ "GP" ], }, Enter => { @@ -1255,7 +1137,6 @@ Enter => { emit => 'enter', outs => [ "frame", "stack", "M" ], latency => 15, - units => [ "GP" ], }, Leave => { @@ -1263,7 +1144,6 @@ Leave => { emit => 'leave', outs => [ "frame", "stack" ], latency => 3, - units => [ "GP" ], state => "exc_pinned", }, @@ -1275,7 +1155,6 @@ AddSP => { emit => 'addl %B', latency => 1, outs => [ "stack", "M" ], - units => [ "GP" ], modified_flags => $status_flags }, @@ -1288,7 +1167,6 @@ SubSP => { "movl %%esp, %D1", latency => 2, outs => [ "stack", "addr", "M" ], - units => [ "GP" ], modified_flags => $status_flags }, @@ -1303,7 +1181,6 @@ RepPrefix => { LdTls => { irn_flags => [ "rematerializable" ], reg_req => { out => [ "gp" ] }, - units => [ "GP" ], emit => "movl %%gs:0, %D0", mode => $mode_gp, latency => 1, @@ -1318,7 +1195,6 @@ Bt => { reg_req => { in => [ "gp", "gp" ], out => [ "flags" ] }, ins => [ "left", "right" ], emit => 'bt%M %S1, %S0', - units => [ "GP" ], latency => 1, mode => $mode_flags, modified_flags => $status_flags # only CF is set, but the other flags are undefined @@ -1333,7 +1209,6 @@ Bsf => { outs => [ "res", "flags", "M" ], am => "source,binary", emit => 'bsf%M %AS3, %D0', - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -1348,7 +1223,6 @@ Bsr => { outs => [ "res", "flags", "M" ], am => "source,binary", emit => 'bsr%M %AS3, %D0', - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -1366,7 +1240,6 @@ Popcnt => { outs => [ "res", "flags", "M" ], am => "source,binary", emit => 'popcnt%M %AS3, %D0', - units => [ "GP" ], latency => 1, mode => $mode_gp, modified_flags => $status_flags @@ -1377,7 +1250,7 @@ Call => { state => "exc_pinned", reg_req => { in => [ "gp", "gp", "none", "gp", "esp", "fpcw", "eax", "ecx", "edx" ], - out => [ "esp:I|S", "fpcw:I", "none", "eax", "ecx", "edx", "st0", "st1", "st2", "st3", "st4", "st5", "st6", "st7", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "none", "none" ] + out => [ "esp:I|S", "fpcw", "none", "eax", "ecx", "edx", "st0", "st1", "st2", "st3", "st4", "st5", "st6", "st7", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "none", "none" ] }, ins => [ "base", "index", "mem", "addr", "stack", "fpcw", "eax", "ecx", "edx" ], outs => [ "stack", "fpcw", "M", "eax", "ecx", "edx", "st0", "st1", "st2", "st3", "st4", "st5", "st6", "st7", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "X_regular", "X_except" ], @@ -1385,7 +1258,6 @@ Call => { attr_type => "ia32_call_attr_t", attr => "unsigned pop, ir_type *call_tp", am => "source,unary", - units => [ "BRANCH" ], latency => 4, # random number modified_flags => $status_flags }, @@ -1402,7 +1274,6 @@ ClimbFrame => { latency => 4, # random number attr_type => "ia32_climbframe_attr_t", attr => "unsigned count", - units => [ "GP" ], mode => $mode_gp }, @@ -1416,7 +1287,6 @@ Bswap => { outs => [ "res" ], emit => 'bswap%M %S0', ins => [ "val" ], - units => [ "GP" ], latency => 1, mode => $mode_gp, }, @@ -1430,7 +1300,6 @@ Bswap16 => { out => [ "in_r1" ] }, emit => 'xchg %S0', ins => [ "val" ], - units => [ "GP" ], latency => 1, mode => $mode_gp, }, @@ -1444,7 +1313,6 @@ Breakpoint => { ins => [ "mem" ], latency => 0, emit => "int3", - units => [ "GP" ], mode => mode_M, }, @@ -1457,7 +1325,6 @@ UD2 => { ins => [ "mem" ], latency => 0, emit => "ud2", - units => [ "GP" ], mode => mode_M, }, @@ -1470,7 +1337,6 @@ Outport => { reg_req => { in => [ "edx", "eax", "none" ], out => [ "none" ] }, ins => [ "port", "value", "mem" ], emit => 'out%M %^S0, %#S1', - units => [ "GP" ], latency => 1, mode => mode_M, modified_flags => $status_flags @@ -1486,7 +1352,6 @@ Inport => { ins => [ "port", "mem" ], outs => [ "res", "M" ], emit => 'in%M %#D0, %^S0', - units => [ "GP" ], latency => 1, mode => mode_T, modified_flags => $status_flags @@ -1503,7 +1368,6 @@ Prefetch0 => { outs => [ "M" ], latency => 0, emit => "prefetcht0 %AM", - units => [ "GP" ], }, Prefetch1 => { @@ -1514,7 +1378,6 @@ Prefetch1 => { outs => [ "M" ], latency => 0, emit => "prefetcht1 %AM", - units => [ "GP" ], }, Prefetch2 => { @@ -1525,7 +1388,6 @@ Prefetch2 => { outs => [ "M" ], latency => 0, emit => "prefetcht2 %AM", - units => [ "GP" ], }, PrefetchNTA => { @@ -1536,7 +1398,6 @@ PrefetchNTA => { outs => [ "M" ], latency => 0, emit => "prefetchnta %AM", - units => [ "GP" ], }, # @@ -1550,7 +1411,6 @@ Prefetch => { outs => [ "M" ], latency => 0, emit => "prefetch %AM", - units => [ "GP" ], }, PrefetchW => { @@ -1561,7 +1421,6 @@ PrefetchW => { outs => [ "M" ], latency => 0, emit => "prefetchw %AM", - units => [ "GP" ], }, # produces a 0/+0.0 @@ -1570,7 +1429,6 @@ xZero => { reg_req => { out => [ "xmm" ] }, emit => 'xorp%FX %D0, %D0', latency => 3, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1588,7 +1446,6 @@ xPzero => { reg_req => { out => [ "xmm" ] }, emit => 'pxor %D0, %D0', latency => 3, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1598,7 +1455,6 @@ xAllOnes => { reg_req => { out => [ "xmm" ] }, emit => 'pcmpeqb %D0, %D0', latency => 3, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1608,7 +1464,6 @@ xPslld => { reg_req => { in => [ "xmm", "xmm" ], out => [ "in_r1 !in_r2" ] }, emit => 'pslld %#S1, %D0', latency => 3, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1618,7 +1473,6 @@ xPsllq => { reg_req => { in => [ "xmm", "xmm" ], out => [ "in_r1 !in_r2" ] }, emit => 'psllq %#S1, %D0', latency => 3, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1628,7 +1482,6 @@ xPsrld => { reg_req => { in => [ "xmm", "xmm" ], out => [ "in_r1 !in_r2" ] }, emit => 'psrld %#S1, %D0', latency => 1, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1638,7 +1491,6 @@ xMovd => { reg_req => { in => [ "gp" ], out => [ "xmm" ] }, emit => 'movd %S0, %D0', latency => 1, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1652,7 +1504,6 @@ xAdd => { am => "source,binary", emit => 'adds%FX %B', latency => 4, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1666,7 +1517,6 @@ xMul => { am => "source,binary", emit => 'muls%FX %B', latency => 4, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1680,7 +1530,6 @@ xMax => { am => "source,binary", emit => 'maxs%FX %B', latency => 2, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1694,7 +1543,6 @@ xMin => { am => "source,binary", emit => 'mins%FX %B', latency => 2, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1708,7 +1556,6 @@ xAnd => { am => "source,binary", emit => 'andp%FX %B', latency => 3, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1722,7 +1569,6 @@ xOr => { am => "source,binary", emit => 'orp%FX %B', latency => 3, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1736,7 +1582,6 @@ xXor => { am => "source,binary", emit => 'xorp%FX %B', latency => 3, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1750,7 +1595,6 @@ xAndNot => { am => "source,binary", emit => 'andnp%FX %B', latency => 3, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1764,7 +1608,6 @@ xSub => { am => "source,binary", emit => 'subs%FX %B', latency => 4, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1778,7 +1621,6 @@ xDiv => { am => "source,binary", emit => 'divs%FX %B', latency => 16, - units => [ "SSE" ], }, Ucomi => { @@ -1793,7 +1635,6 @@ Ucomi => { init_attr => "attr->data.ins_permuted = ins_permuted;", emit => 'ucomis%FX %B', latency => 3, - units => [ "SSE" ], mode => $mode_flags, modified_flags => 1, }, @@ -1809,7 +1650,6 @@ xLoad => { attr => "ir_mode *load_mode", init_attr => "attr->ls_mode = load_mode;", latency => 0, - units => [ "SSE" ], }, xStore => { @@ -1821,7 +1661,6 @@ xStore => { outs => [ "M", "X_regular", "X_except" ], emit => 'movs%FX %S3, %AM', latency => 0, - units => [ "SSE" ], }, xStoreSimple => { @@ -1833,7 +1672,6 @@ xStoreSimple => { outs => [ "M", "X_regular", "X_except" ], emit => 'movs%FX %S3, %AM', latency => 0, - units => [ "SSE" ], }, CvtSI2SS => { @@ -1843,7 +1681,6 @@ CvtSI2SS => { am => "source,unary", emit => 'cvtsi2ss %AS3, %D0', latency => 2, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1854,7 +1691,6 @@ CvtSI2SD => { am => "source,unary", emit => 'cvtsi2sd %AS3, %D0', latency => 2, - units => [ "SSE" ], mode => $mode_xmm }, @@ -1881,7 +1717,6 @@ CopyB => { outs => [ "dest", "source", "count", "M", "X_regular", "X_except" ], attr_type => "ia32_copyb_attr_t", attr => "unsigned size", - units => [ "GP" ], latency => 3, # we don't care about this flag, so no need to mark this node # modified_flags => [ "DF" ] @@ -1896,7 +1731,6 @@ CopyB_i => { outs => [ "dest", "source", "M", "X_regular", "X_except" ], attr_type => "ia32_copyb_attr_t", attr => "unsigned size", - units => [ "GP" ], latency => 3, # we don't care about this flag, so no need to mark this node # modified_flags => [ "DF" ] @@ -1908,7 +1742,6 @@ Cwtl => { ins => [ "val" ], outs => [ "res" ], emit => 'cwtl', - units => [ "GP" ], latency => 1, mode => $mode_gp, }, @@ -1922,7 +1755,6 @@ Conv_I2I => { outs => [ "res", "flags", "M", "X_regular", "X_except" ], emit => "mov%#Ml %#AS3, %D0", am => "source,unary", - units => [ "GP" ], latency => 1, attr => "ir_mode *smaller_mode", init_attr => "attr->ls_mode = smaller_mode;", @@ -1938,7 +1770,6 @@ Conv_I2I8Bit => { outs => [ "res", "flags", "M", "X_regular", "X_except" ], emit => "mov%#Ml %#AS3, %D0", am => "source,unary", - units => [ "GP" ], latency => 1, attr => "ir_mode *smaller_mode", init_attr => "attr->ls_mode = smaller_mode;", @@ -1951,7 +1782,6 @@ Conv_I2FP => { ins => [ "base", "index", "mem", "val" ], am => "source,unary", latency => 10, - units => [ "SSE" ], mode => $mode_xmm, }, @@ -1961,7 +1791,6 @@ Conv_FP2I => { ins => [ "base", "index", "mem", "val" ], am => "source,unary", latency => 10, - units => [ "SSE" ], mode => $mode_gp, }, @@ -1971,7 +1800,6 @@ Conv_FP2FP => { ins => [ "base", "index", "mem", "val" ], am => "source,unary", latency => 8, - units => [ "SSE" ], mode => $mode_xmm, }, @@ -1988,7 +1816,6 @@ fadd => { emit => 'fadd%FP%FM %AF', am => "source,binary", latency => 4, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2003,7 +1830,6 @@ fmul => { emit => 'fmul%FP%FM %AF', am => "source,binary", latency => 4, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2018,7 +1844,6 @@ fsub => { emit => 'fsub%FR%FP%FM %AF', am => "source,binary", latency => 4, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2032,7 +1857,6 @@ fdiv => { emit => 'fdiv%FR%FP%FM %AF', am => "source,binary", latency => 20, - units => [ "VFP" ], attr_type => "ia32_x87_attr_t", }, @@ -2041,7 +1865,6 @@ fprem => { ins => [ "left", "right", "fpcw" ], emit => 'fprem1', latency => 20, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2052,7 +1875,6 @@ fabs => { ins => [ "value" ], emit => 'fabs', latency => 2, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2063,7 +1885,6 @@ fchs => { emit => 'fchs', ins => [ "value" ], latency => 2, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2080,7 +1901,6 @@ fld => { attr => "ir_mode *load_mode", init_attr => "attr->attr.ls_mode = load_mode;", latency => 2, - units => [ "VFP" ], attr_type => "ia32_x87_attr_t", }, @@ -2096,7 +1916,6 @@ fst => { attr => "ir_mode *store_mode", init_attr => "attr->attr.ls_mode = store_mode;", latency => 2, - units => [ "VFP" ], attr_type => "ia32_x87_attr_t", }, @@ -2108,7 +1927,6 @@ fild => { ins => [ "base", "index", "mem" ], emit => 'fild%FM %AM', latency => 4, - units => [ "VFP" ], attr_type => "ia32_x87_attr_t", }, @@ -2121,7 +1939,6 @@ fist => { outs => [ "dummy", "M", "X_regular", "X_except" ], emit => 'fist%FP%FM %AM', latency => 4, - units => [ "VFP" ], attr_type => "ia32_x87_attr_t", }, @@ -2135,7 +1952,6 @@ fisttp => { outs => [ "res", "M", "X_regular", "X_except" ], emit => 'fisttp%FM %AM', latency => 4, - units => [ "VFP" ], attr_type => "ia32_x87_attr_t", }, @@ -2145,7 +1961,6 @@ fldz => { outs => [ "res" ], emit => 'fldz', latency => 4, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2156,7 +1971,6 @@ fld1 => { outs => [ "res" ], emit => 'fld1', latency => 4, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2167,7 +1981,6 @@ fldpi => { outs => [ "res" ], emit => 'fldpi', latency => 4, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2178,7 +1991,6 @@ fldln2 => { outs => [ "res" ], emit => 'fldln2', latency => 4, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2189,7 +2001,6 @@ fldlg2 => { emit => 'fldlg2', outs => [ "res" ], latency => 4, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2200,7 +2011,6 @@ fldl2t => { emit => 'fldll2t', outs => [ "res" ], latency => 4, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2211,7 +2021,6 @@ fldl2e => { emit => 'fldl2e', outs => [ "res" ], latency => 4, - units => [ "VFP" ], mode => $mode_fp87, attr_type => "ia32_x87_attr_t", }, @@ -2228,7 +2037,6 @@ FucomFnstsw => { attr => "bool ins_permuted", init_attr => "attr->attr.data.ins_permuted = ins_permuted;", latency => 3, - units => [ "VFP" ], attr_type => "ia32_x87_attr_t", mode => $mode_gp }, @@ -2245,7 +2053,6 @@ FucomppFnstsw => { attr => "bool ins_permuted", init_attr => "attr->attr.data.ins_permuted = ins_permuted;", latency => 3, - units => [ "VFP" ], attr_type => "ia32_x87_attr_t", mode => $mode_gp }, @@ -2259,7 +2066,6 @@ Fucomi => { attr => "bool ins_permuted", init_attr => "attr->attr.data.ins_permuted = ins_permuted;", latency => 3, - units => [ "VFP" ], attr_type => "ia32_x87_attr_t", mode => $mode_gp }, @@ -2274,7 +2080,6 @@ FtstFnstsw => { attr => "bool ins_permuted", init_attr => "attr->attr.data.ins_permuted = ins_permuted;", latency => 3, - units => [ "VFP" ], attr_type => "ia32_x87_attr_t", mode => $mode_gp }, @@ -2286,7 +2091,6 @@ Sahf => { outs => [ "flags" ], emit => 'sahf', latency => 1, - units => [ "GP" ], mode => $mode_flags, }, @@ -2372,7 +2176,6 @@ xxLoad => { emit => 'movdqu %D0, %AM', ins => [ "base", "index", "mem" ], outs => [ "res", "M", "X_regular", "X_except" ], - units => [ "SSE" ], latency => 1, }, @@ -2384,7 +2187,6 @@ xxStore => { ins => [ "base", "index", "mem", "val" ], outs => [ "M", "X_regular", "X_except" ], emit => 'movdqu %B', - units => [ "SSE" ], latency => 1, },