pdp11.h (FIRST_PARM_OFFSET): Fix case of no frame pointer.
authorPaul Koning <ni1d@arrl.net>
Fri, 19 Nov 2010 01:58:41 +0000 (20:58 -0500)
committerPaul Koning <pkoning@gcc.gnu.org>
Fri, 19 Nov 2010 01:58:41 +0000 (20:58 -0500)
* config/pdp11/pdp11.h (FIRST_PARM_OFFSET): Fix case of no frame
pointer.

From-SVN: r166929

gcc/ChangeLog
gcc/config/pdp11/pdp11.h

index 3f6bbf6c82ecf1f429b8bde405c24ead202cd3c3..b5ac12d90b11c4e1c6308d08cecbc475022fad97 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-18  Paul Koning  <ni1d@arrl.net>
+
+       * config/pdp11/pdp11.h (FIRST_PARM_OFFSET): Fix case of no frame
+       pointer.
+
 2010-11-18  Paul Koning  <ni1d@arrl.net>
 
        * config/pdp11/pdp11.md (abshi2): Delete TARGET_ABSHI_BUILTIN.
index 08b9d675cdea0af18ca54f7b1d147de054b0de0d..494d8ce33f807467a4356f51b4e33b5b277e2a85 100644 (file)
@@ -372,11 +372,10 @@ extern int current_first_parm_offset;
 /* Offset of first parameter from the argument pointer register value.  
    For the pdp11, this is nonzero to account for the return address.
        1 - return address
-       2 - frame pointer (always saved, even when not used!!!!)
-               -- change some day !!!:q!
+       2 - frame pointer, if needed
 
 */
-#define FIRST_PARM_OFFSET(FNDECL) 4
+#define FIRST_PARM_OFFSET(FNDECL) ((frame_pointer_needed) ? 4 : 2)
 
 /* Define how to find the value returned by a function.
    VALTYPE is the data type of the value (as a tree).