summaryrefslogtreecommitdiffhomepage
path: root/ir/be/TEMPLATE
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-08-04 10:37:41 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-08-04 16:27:20 +0200
commit443527605084946bb7cd67ba37ff940818093346 (patch)
tree8dfc6a543bbf7b9cfcfb491c0d4acbff0ae8a040 /ir/be/TEMPLATE
parente15523524eefa5b0fb50f494817552d0e6e3be60 (diff)
bescripts: Automatically determine the mode of nodes by default and add the option "first" to use the mode of the first output requirement.
Diffstat (limited to 'ir/be/TEMPLATE')
-rw-r--r--ir/be/TEMPLATE/TEMPLATE_spec.pl12
1 files changed, 1 insertions, 11 deletions
diff --git a/ir/be/TEMPLATE/TEMPLATE_spec.pl b/ir/be/TEMPLATE/TEMPLATE_spec.pl
index f596071..ee88bf7 100644
--- a/ir/be/TEMPLATE/TEMPLATE_spec.pl
+++ b/ir/be/TEMPLATE/TEMPLATE_spec.pl
@@ -17,7 +17,7 @@ $mode_fp = "mode_F"; # mode used by floatingpoint registers
# out_reqs => [ "reg_class|register|in_rX" ] | "...",
# ins => { "in1", "in2" }, # optional, creates n_op_in1, ... consts
# outs => { "out1", "out2" },# optional, creates pn_op_out1, ... consts
-# mode => "mode_Iu", # optional, predefines the mode
+# mode => "first" | "<mode>" # optional, determines the mode, auto-detected by default
# emit => "emit code with templates", # optional for virtual nodes
# attr => "additional attribute arguments for constructor", # optional
# init => "emit attribute initialization template", # optional
@@ -77,27 +77,23 @@ my $binop = {
irn_flags => [ "rematerializable" ],
in_reqs => [ "gp", "gp" ],
out_reqs => [ "gp" ],
- mode => $mode_gp,
};
my $constop = {
op_flags => [ "constlike" ],
irn_flags => [ "rematerializable" ],
out_reqs => [ "gp" ],
- mode => $mode_gp,
};
my $fbinop = {
in_reqs => [ "fp", "fp" ],
out_reqs => [ "fp" ],
- mode => $mode_fp,
};
my $unop = {
irn_flags => [ "rematerializable" ],
in_reqs => [ "gp" ],
out_reqs => [ "gp" ],
- mode => $mode_gp,
};
%nodes = (
@@ -168,7 +164,6 @@ Jmp => {
op_flags => [ "cfopcode" ],
irn_flags => [ "simple_jump" ],
out_reqs => [ "exec" ],
- mode => "mode_X",
},
Start => {
@@ -186,7 +181,6 @@ Return => {
out_reqs => [ "exec" ],
ins => [ "mem", "stack", "first_result" ],
outs => [ "X" ],
- mode => "mode_X",
},
# Load / Store
@@ -210,7 +204,6 @@ Store => {
out_reqs => [ "mem" ],
ins => [ "mem", "ptr", "val" ],
outs => [ "M" ],
- mode => "mode_M",
emit => '(%S1) = store %S2',
},
@@ -243,7 +236,6 @@ fMinus => {
in_reqs => [ "fp" ],
out_reqs => [ "fp" ],
emit => '%D0 = fneg %S0',
- mode => $mode_fp,
},
fConst => {
@@ -251,7 +243,6 @@ fConst => {
irn_flags => [ "rematerializable" ],
out_reqs => [ "fp" ],
emit => '%D0 = fconst %I',
- mode => $mode_fp,
},
# Load / Store
@@ -275,7 +266,6 @@ fStore => {
out_reqs => [ "mem" ],
ins => [ "mem", "ptr", "val" ],
outs => [ "M" ],
- mode => "mode_M",
emit => '(%S1) = fstore %S2',
},