From: Richard Kenner Date: Sun, 25 Apr 1993 17:00:40 +0000 (-0400) Subject: (make_decl_rtl): If a variable has an asm operand that refers to, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=31e4b1c0990daaa780524bf61f060049571f018b;p=gcc.git (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 --- diff --git a/gcc/varasm.c b/gcc/varasm.c index 50b348fe8c0..16bb816aac8 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)