aboutsummaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-01-24 23:45:58 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2003-01-24 22:45:58 +0000
commita560d4d4d9f0fc66fd7634dac3b13d72ee0790d3 (patch)
tree1090cf96c575f2f136a1b44c8d8d83d0bc0b04d3 /gcc/final.c
parent1d0ea52e2dc53ed8ecc7f3e95047a2a921b7cb3a (diff)
downloadgcc-a560d4d4d9f0fc66fd7634dac3b13d72ee0790d3.zip
gcc-a560d4d4d9f0fc66fd7634dac3b13d72ee0790d3.tar.gz
gcc-a560d4d4d9f0fc66fd7634dac3b13d72ee0790d3.tar.bz2
emit-rtl.c (reg_attrs_htab): New static variable.
* emit-rtl.c (reg_attrs_htab): New static variable. (reg_attrs_htab_hash, reg_attrs_htab_eq, get_reg_attrs): New static functions. (reg_rtx): Do not maintain regno_decl. (gen_rtx_REG_offset, set_reg_attrs_from_mem, set_delc_rtx, set_mem_attrs_from_reg): New global function. (init_emit): Do not initialize regno_decl. (init_emit_once): initialize reg_attrs_htab. * final.c (alter_subreg): Do not replace REG by SUBREG. (gen_mem_expr_from_op): Improve output. (output_asm_operands): Likewise. * function.c (assign_params): Do not set REGNO_DECL. * function.h (struct function): Kill regno_decl. (REGNO_DECL): Kill. * gengtype.c (adjust_field_rtx_def): Handle new field of reg. * print_rtl.c (print_rtx): Output REG information. * regclass.c (reg_scan_mark_refs): Update attrs. * reload1.c (alter_reg): Likewise. * simplify_rtx.c (simplify_subreg): Likewise. * stmt.c (expand_decl): Likewise. * rtl.def (REG): Add new field. * rtl.h (struct reg_attrs): New. (rtunion_def): At rtreg. (X0MEMATTR): Add checking. (X0REGATTR, REG_ATTRS, REG_EXPR, REG_OFFSET): New macro. (set_reg_attrs_from_mem, set_mem_attrs_from_reg, gen_rtx_REG_offset): Declare. * tree.h (SET_DECL_RTL): Call set_decl_rtl. From-SVN: r61741
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/gcc/final.c b/gcc/final.c
index a3a9e7c..103f65d 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -2622,12 +2622,7 @@ alter_subreg (xp)
else if (GET_CODE (y) == REG)
{
unsigned int regno = subreg_hard_regno (x, 1);
- PUT_CODE (x, REG);
- REGNO (x) = regno;
- ORIGINAL_REGNO (x) = ORIGINAL_REGNO (y);
- /* This field has a different meaning for REGs and SUBREGs. Make
- sure to clear it! */
- RTX_FLAG (x, used) = 0;
+ *xp = gen_rtx_REG_offset (y, GET_MODE (x), regno, SUBREG_BYTE (x));
}
else
abort ();
@@ -2893,11 +2888,8 @@ get_mem_expr_from_op (op, paddressp)
*paddressp = 0;
- if (op == NULL)
- return 0;
-
- if (GET_CODE (op) == REG && ORIGINAL_REGNO (op) >= FIRST_PSEUDO_REGISTER)
- return REGNO_DECL (ORIGINAL_REGNO (op));
+ if (GET_CODE (op) == REG)
+ return REG_EXPR (op);
else if (GET_CODE (op) != MEM)
return 0;
@@ -2941,16 +2933,22 @@ output_asm_operand_names (operands, oporder, nops)
for (i = 0; i < nops; i++)
{
int addressp;
- tree expr = get_mem_expr_from_op (operands[oporder[i]], &addressp);
+ rtx op = operands[oporder[i]];
+ tree expr = get_mem_expr_from_op (op, &addressp);
+ fprintf (asm_out_file, "%c%s",
+ wrote ? ',' : '\t', wrote ? "" : ASM_COMMENT_START);
+ wrote = 1;
if (expr)
{
- fprintf (asm_out_file, "%c%s %s",
- wrote ? ',' : '\t', wrote ? "" : ASM_COMMENT_START,
+ fprintf (asm_out_file, "%s",
addressp ? "*" : "");
print_mem_expr (asm_out_file, expr);
wrote = 1;
}
+ else if (REG_P (op) && ORIGINAL_REGNO (op)
+ && ORIGINAL_REGNO (op) != REGNO (op))
+ fprintf (asm_out_file, " tmp%i", ORIGINAL_REGNO (op));
}
}