(dbxout_parms): For parameter passed by invisible
authorJim Wilson <wilson@gcc.gnu.org>
Thu, 23 Dec 1993 02:06:15 +0000 (18:06 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 23 Dec 1993 02:06:15 +0000 (18:06 -0800)
reference, use DECL_INCOMING_RTL if DECL_RTL is a pseudo-reg address.

From-SVN: r6275

gcc/dbxout.c

index 08881fc718d195c2d4d3eb5e32d47d3c6fcf2151..fd8bdd5ac89b45f7b689c8aaa14e96bf0a8c0bcf 100644 (file)
@@ -2178,8 +2178,15 @@ dbxout_parms (parms)
            current_sym_code = DBX_REGPARM_STABS_CODE;
            regparm_letter = DBX_REGPARM_STABS_LETTER;
 
-           /* DECL_RTL looks like (MEM (REG...).  Get the register number.  */
-           current_sym_value = REGNO (XEXP (DECL_RTL (parms), 0));
+           /* DECL_RTL looks like (MEM (REG...).  Get the register number.
+              If it is an unallocated pseudo-reg, then use the register where
+              it was passed instead.  */
+           if (REGNO (XEXP (DECL_RTL (parms), 0)) >= 0
+               && REGNO (XEXP (DECL_RTL (parms), 0)) < FIRST_PSEUDO_REGISTER)
+             current_sym_value = REGNO (XEXP (DECL_RTL (parms), 0));
+           else
+             current_sym_value = REGNO (DECL_INCOMING_RTL (parms));
+
            current_sym_addr = 0;
 
            FORCE_TEXT;