Commit e130a54b by Richard Henderson Committed by Richard Henderson

c-common.def (ASM_STMT): Remove.

        * c-common.def (ASM_STMT): Remove.
        * c-common.h (c_common_stmt_codes): Remove ASM_STMT.
        * c-dump.c (c_dump_tree): Likewise.
        * c-gimplify.c (c_gimplify_stmt): Likewise.
        * c-pretty-print.c (pp_c_statement): Likewise.
        * c-typeck.c (build_asm_expr): Use ASM_EXPR.
        * tree.h: Fix commentary.
cp/
        * parser.c (cp_parser_asm_definition): Update commentary.
        * pt.c (tsubst_expr): Use ASM_EXPR.
        * semantics.c (finish_asm_stmt): Likewise.

From-SVN: r83260
parent 9e14e18f
2004-06-16 Richard Henderson <rth@redhat.com>
* c-common.def (ASM_STMT): Remove.
* c-common.h (c_common_stmt_codes): Remove ASM_STMT.
* c-dump.c (c_dump_tree): Likewise.
* c-gimplify.c (c_gimplify_stmt): Likewise.
* c-pretty-print.c (pp_c_statement): Likewise.
* c-typeck.c (build_asm_expr): Use ASM_EXPR.
* tree.h: Fix commentary.
2004-06-16 Richard Henderson <rth@redhat.com>
* c-common.def (GOTO_STMT, LABEL_STMT): Remove.
* c-common.c (c_add_case_label): Use LABEL_EXPR.
* c-common.h (GOTO_FAKE_P, LABEL_STMT_LABEL): Remove.
......
......@@ -71,9 +71,6 @@ DEFTREECODE (CONTINUE_STMT, "continue_stmt", 'e', 0)
SWITCH_COND, SWITCH_BODY and SWITCH_TYPE, respectively. */
DEFTREECODE (SWITCH_STMT, "switch_stmt", 'e', 3)
/* Used to represent an inline assembly statement. */
DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 4)
/* Used to represent a CASE_LABEL. The operands are CASE_LOW and
CASE_HIGH, respectively. If CASE_LOW is NULL_TREE, the label is a
'default' label. If CASE_HIGH is NULL_TREE, the label is a normal case
......
......@@ -30,7 +30,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
0: TREE_NEGATED_INT (in INTEGER_CST).
IDENTIFIER_MARKED (used by search routines).
DECL_PRETTY_FUNCTION_P (in VAR_DECL)
ASM_INPUT_P (in ASM_STMT)
STMT_EXPR_NO_SCOPE (in STMT_EXPR)
1: C_DECLARED_LABEL_FLAG (in LABEL_DECL)
STMT_IS_FULL_EXPR_P (in _STMT)
......@@ -1009,7 +1008,7 @@ enum c_tree_code {
DECL_STMT, IF_STMT, FOR_STMT, \
WHILE_STMT, DO_STMT, RETURN_STMT, \
BREAK_STMT, CONTINUE_STMT, \
SWITCH_STMT, ASM_STMT, CASE_LABEL
SWITCH_STMT, CASE_LABEL
/* TRUE if a code represents a statement. The front end init
langhook should take care of initialization of this array. */
......
......@@ -63,17 +63,6 @@ c_dump_tree (void *dump_info, tree t)
dump_string (di, "bitfield");
break;
case ASM_STMT:
dump_stmt (di, t);
if (ASM_VOLATILE_P (t))
dump_string (di, "volatile");
dump_child ("strg", ASM_STRING (t));
dump_child ("outs", ASM_OUTPUTS (t));
dump_child ("ins", ASM_INPUTS (t));
dump_child ("clbr", ASM_CLOBBERS (t));
dump_next_stmt (di, t);
break;
case BREAK_STMT:
case CONTINUE_STMT:
dump_stmt (di, t);
......
......@@ -283,18 +283,6 @@ c_gimplify_stmt (tree *stmt_p)
ret = GS_OK;
break;
case ASM_STMT:
{
tree new_stmt = build (ASM_EXPR, void_type_node, ASM_STRING (stmt),
ASM_OUTPUTS (stmt), ASM_INPUTS (stmt),
ASM_CLOBBERS (stmt));
ASM_INPUT_P (new_stmt) = ASM_INPUT_P (stmt);
ASM_VOLATILE_P (new_stmt) = ASM_VOLATILE_P (stmt);
stmt = new_stmt;
ret = GS_OK;
}
break;
default:
if (lang_gimplify_stmt && (*lang_gimplify_stmt) (&stmt))
{
......
......@@ -2117,37 +2117,6 @@ pp_c_statement (c_pretty_printer *pp, tree stmt)
pp_needs_newline (pp) = true;
break;
case ASM_STMT:
{
bool has_volatile_p = ASM_VOLATILE_P (stmt);
bool is_extended = has_volatile_p || ASM_INPUTS (stmt)
|| ASM_OUTPUTS (stmt) || ASM_CLOBBERS (stmt);
pp_c_identifier (pp, is_extended ? "__asm__" : "asm");
if (has_volatile_p)
pp_c_identifier (pp, "__volatile__");
pp_space (pp);
pp_c_left_paren (pp);
pp_c_string_literal (pp, ASM_STRING (stmt));
if (is_extended)
{
pp_space (pp);
pp_separate_with (pp, ':');
if (ASM_OUTPUTS (stmt))
pp_expression (pp, ASM_OUTPUTS (stmt));
pp_space (pp);
pp_separate_with (pp, ':');
if (ASM_INPUTS (stmt))
pp_expression (pp, ASM_INPUTS (stmt));
pp_space (pp);
pp_separate_with (pp, ':');
if (ASM_CLOBBERS (stmt))
pp_expression (pp, ASM_CLOBBERS (stmt));
}
pp_c_right_paren (pp);
pp_newline (pp);
}
break;
default:
pp_unsupported_tree (pp, stmt);
}
......
......@@ -6124,7 +6124,7 @@ process_init_element (tree value)
/* Build a complete asm-statement, whose components are a CV_QUALIFIER
(guaranteed to be 'volatile' or null) and ARGS (represented using
an ASM_STMT node). */
an ASM_EXPR node). */
tree
build_asm_stmt (tree cv_qualifier, tree args)
{
......@@ -6137,7 +6137,7 @@ build_asm_stmt (tree cv_qualifier, tree args)
some INPUTS, and some CLOBBERS. The latter three may be NULL.
SIMPLE indicates whether there was anything at all after the
string in the asm expression -- asm("blah") and asm("blah" : )
are subtly different. We use a ASM_STMT node to represent this. */
are subtly different. We use a ASM_EXPR node to represent this. */
tree
build_asm_expr (tree string, tree outputs, tree inputs, tree clobbers,
bool simple)
......@@ -6188,7 +6188,7 @@ build_asm_expr (tree string, tree outputs, tree inputs, tree clobbers,
for (tail = inputs; tail; tail = TREE_CHAIN (tail))
TREE_VALUE (tail) = default_function_array_conversion (TREE_VALUE (tail));
args = build_stmt (ASM_STMT, string, outputs, inputs, clobbers);
args = build_stmt (ASM_EXPR, string, outputs, inputs, clobbers);
/* Simple asm statements are treated as volatile. */
if (simple)
......
2004-06-16 Richard Henderson <rth@redhat.com>
* parser.c (cp_parser_asm_definition): Update commentary.
* pt.c (tsubst_expr): Use ASM_EXPR.
* semantics.c (finish_asm_stmt): Likewise.
2004-06-16 Richard Henderson <rth@redhat.com>
* decl.c (finish_destructor_body): Use LABEL_EXPR.
* parser.c (cp_parser_statement): Update commentary.
* pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
......
......@@ -10035,12 +10035,12 @@ cp_parser_asm_definition (cp_parser* parser)
/*consume_paren=*/true);
cp_parser_require (parser, CPP_SEMICOLON, "`;'");
/* Create the ASM_STMT. */
/* Create the ASM_EXPR. */
if (at_function_scope_p ())
{
asm_stmt = finish_asm_stmt (volatile_p, string, outputs,
inputs, clobbers);
/* If the extended syntax was not used, mark the ASM_STMT. */
/* If the extended syntax was not used, mark the ASM_EXPR. */
if (!extended_p)
ASM_INPUT_P (asm_stmt) = 1;
}
......
......@@ -7997,7 +7997,7 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
finish_goto_stmt (tmp);
break;
case ASM_STMT:
case ASM_EXPR:
prep_stmt (t);
tmp = finish_asm_stmt
(ASM_VOLATILE_P (t),
......
......@@ -1073,7 +1073,7 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands,
}
}
r = build_stmt (ASM_STMT, string,
r = build_stmt (ASM_EXPR, string,
output_operands, input_operands,
clobbers);
ASM_VOLATILE_P (r) = volatile_p;
......
......@@ -1081,7 +1081,7 @@ struct tree_vec GTY(())
a goto statement. */
#define GOTO_DESTINATION(NODE) TREE_OPERAND ((NODE), 0)
/* ASM_STMT accessors. ASM_STRING returns a STRING_CST for the
/* ASM_EXPR accessors. ASM_STRING returns a STRING_CST for the
instruction (e.g., "mov x, y"). ASM_OUTPUTS, ASM_INPUTS, and
ASM_CLOBBERS represent the outputs, inputs, and clobbers for the
statement. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment