# %nodes = (
#
# <op-name> => {
-# op_flags => "N|L|C|X|I|F|Y|H|c|K",
-# irn_flags => "R|N|I"
-# arity => "0|1|2|3 ... |variable|dynamic|any",
-# state => "floats|pinned|mem_pinned|exc_pinned",
+# op_flags => "N|L|C|X|I|F|Y|H|c|K", # optional
+# irn_flags => "R|N|I" # optional
+# arity => "0|1|2|3 ... |variable|dynamic|any", # optional
+# state => "floats|pinned|mem_pinned|exc_pinned", # optional
# args => [
# { type => "type 1", name => "name 1" },
# { type => "type 2", name => "name 2" },
# ...
# ],
-# comment => "any comment for constructor",
+# comment => "any comment for constructor", # optional
# reg_req => { in => [ "reg_class|register" ], out => [ "reg_class|register|in_rX" ] },
-# cmp_attr => "c source code for comparing node attributes",
-# emit => "emit code with templates",
-# rd_constructor => "c source code which constructs an ir_node"
+# cmp_attr => "c source code for comparing node attributes", # optional
+# outs => { "out1", "out2" },# optional, creates pn_op_out1, ... consts
+# ins => { "in1", "in2" }, # optional, creates n_op_in1, ... consts
+# mode => "mode_Iu", # optional, predefines the mode
+# emit => "emit code with templates", # optional for virtual nodes
+# attr => "additional attribute arguments for constructor", # optional
+# init_attr => "emit attribute initialization template", # optional
+# rd_constructor => "c source code which constructs an ir_node", # optional
+# hash_func => "name of the hash function for this operation", # optional, get the default hash function else
+# latency => "latency of this operation (can be float)" # optional
+# attr_type => "name of the attribute struct", # optional
# },
#
# ... # (all nodes you need to describe)
); # %reg_classes
%emit_templates = (
- S1 => "${arch}_emit_source_register(env, node, 0);",
- S2 => "${arch}_emit_source_register(env, node, 1);",
- S3 => "${arch}_emit_source_register(env, node, 2);",
- S4 => "${arch}_emit_source_register(env, node, 3);",
- S5 => "${arch}_emit_source_register(env, node, 4);",
- S6 => "${arch}_emit_source_register(env, node, 5);",
- D1 => "${arch}_emit_dest_register(env, node, 0);",
- D2 => "${arch}_emit_dest_register(env, node, 1);",
- D3 => "${arch}_emit_dest_register(env, node, 2);",
- D4 => "${arch}_emit_dest_register(env, node, 3);",
- D5 => "${arch}_emit_dest_register(env, node, 4);",
- D6 => "${arch}_emit_dest_register(env, node, 5);",
- C => "${arch}_emit_immediate(env, node);"
+ S1 => "${arch}_emit_source_register(node, 0);",
+ S2 => "${arch}_emit_source_register(node, 1);",
+ S3 => "${arch}_emit_source_register(node, 2);",
+ S4 => "${arch}_emit_source_register(node, 3);",
+ S5 => "${arch}_emit_source_register(node, 4);",
+ S6 => "${arch}_emit_source_register(node, 5);",
+ D1 => "${arch}_emit_dest_register(node, 0);",
+ D2 => "${arch}_emit_dest_register(node, 1);",
+ D3 => "${arch}_emit_dest_register(node, 2);",
+ D4 => "${arch}_emit_dest_register(node, 3);",
+ D5 => "${arch}_emit_dest_register(node, 4);",
+ D6 => "${arch}_emit_dest_register(node, 5);",
+ C => "${arch}_emit_immediate(node);"
);
#--------------------------------------------------#