From 31e4b1c0990daaa780524bf61f060049571f018b Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sun, 25 Apr 1993 13:00:40 -0400 Subject: [PATCH] (make_decl_rtl): If a variable has an asm operand that refers to, e.g., fp, make a distinct RTL for it. From-SVN: r4215 --- gcc/varasm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/varasm.c b/gcc/varasm.c index 50b348fe8c05..16bb816aac85 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -354,7 +354,16 @@ make_decl_rtl (decl, asmspec, top_level) error ("global register variable follows a function definition"); if (TREE_THIS_VOLATILE (decl)) warning ("volatile register variables don't work as you might wish"); - DECL_RTL (decl) = gen_rtx (REG, DECL_MODE (decl), reg_number); + + /* If the user specified one of the eliminables registers here, + e.g., FRAME_POINTER_REGNUM, we don't want to get this variable + confused with that register and be eliminated. Although this + usage is somewhat suspect, we nevertheless use the following + kludge to avoid setting DECL_RTL to frame_pointer_rtx. */ + + DECL_RTL (decl) + = gen_rtx (REG, DECL_MODE (decl), FIRST_PSEUDO_REGISTER); + REGNO (DECL_RTL (decl)) = reg_number; REG_USERVAR_P (DECL_RTL (decl)) = 1; if (top_level) -- 2.43.5