mie: select: add support for target-specific nodes and lowering operations
This commit is contained in:
@@ -103,12 +103,16 @@ static void node_dump_text(struct mie_select_node *node)
|
||||
mie_target_select_node_name(node->n_target, node->n_opcode, tmp, sizeof tmp);
|
||||
printf("%s", tmp);
|
||||
|
||||
if (node->n_description) {
|
||||
printf(" %s", node->n_description);
|
||||
}
|
||||
|
||||
if (node->n_flags & (MIE_SELECT_NODE_F_IVALUE | MIE_SELECT_NODE_F_PVALUE)) {
|
||||
printf("<");
|
||||
}
|
||||
|
||||
if (node->n_flags & MIE_SELECT_NODE_F_IVALUE) {
|
||||
printf("%lld", node->n_value_i);
|
||||
printf("%lld", node->n_value.i);
|
||||
}
|
||||
|
||||
if ((node->n_flags & MIE_SELECT_NODE_F_IVALUE)
|
||||
@@ -117,7 +121,7 @@ static void node_dump_text(struct mie_select_node *node)
|
||||
}
|
||||
|
||||
if (node->n_flags & MIE_SELECT_NODE_F_PVALUE) {
|
||||
write_operand(node->n_value_p, b_stdout);
|
||||
write_operand(node->n_value.v, b_stdout);
|
||||
}
|
||||
|
||||
if (node->n_flags & (MIE_SELECT_NODE_F_IVALUE | MIE_SELECT_NODE_F_PVALUE)) {
|
||||
@@ -168,12 +172,16 @@ static void node_dump_dot(struct mie_select_node *node, b_stream *out)
|
||||
mie_target_select_node_name(node->n_target, node->n_opcode, tmp, sizeof tmp);
|
||||
b_stream_write_fmt(out, NULL, "<Name> %s", tmp);
|
||||
|
||||
if (node->n_description) {
|
||||
b_stream_write_fmt(out, NULL, " %s", node->n_description);
|
||||
}
|
||||
|
||||
if (node->n_flags & (MIE_SELECT_NODE_F_IVALUE | MIE_SELECT_NODE_F_PVALUE)) {
|
||||
b_stream_write_string(out, "\\<", NULL);
|
||||
}
|
||||
|
||||
if (node->n_flags & MIE_SELECT_NODE_F_IVALUE) {
|
||||
b_stream_write_fmt(out, NULL, "%lld", node->n_value_i);
|
||||
b_stream_write_fmt(out, NULL, "%lld", node->n_value.i);
|
||||
}
|
||||
|
||||
if ((node->n_flags & MIE_SELECT_NODE_F_IVALUE)
|
||||
@@ -182,7 +190,7 @@ static void node_dump_dot(struct mie_select_node *node, b_stream *out)
|
||||
}
|
||||
|
||||
if (node->n_flags & MIE_SELECT_NODE_F_PVALUE) {
|
||||
write_operand(node->n_value_p, out);
|
||||
write_operand(node->n_value.v, out);
|
||||
}
|
||||
|
||||
if (node->n_flags & (MIE_SELECT_NODE_F_IVALUE | MIE_SELECT_NODE_F_PVALUE)) {
|
||||
|
||||
Reference in New Issue
Block a user