This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/51002] SP_H register is used even on targets that do not have it (eg attiny26)
- From: "himself at claus-justus-heine dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 18 Mar 2012 14:50:15 +0000
- Subject: [Bug target/51002] SP_H register is used even on targets that do not have it (eg attiny26)
- Auto-submitted: auto-generated
- References: <bug-51002-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51002
Claus-Justus Heine <himself@claus-justus-heine.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |himself@claus-justus-heine.
| |de
--- Comment #6 from Claus-Justus Heine <himself@claus-justus-heine.de> 2012-03-18 14:50:15 UTC ---
Jut a comment: at least I was using -mtiny-stack on targets with 16-bit stack
to reduce the size of the prologue/epilogue of a function. This worked quite
well, of course only if the actual stack usage really stayed below 256 bytes.
With this "fix" this is no longer possible, because now the prologue only loads
the lower 8 bits of the stack pointer into the _frame_pointer_. Then the
frame-pointer will refer the wrong address region. As a hack-around I'm using
(in my own hacked gcc-4.7 version)
avr_current_device->short_sp instead of AVR_HAVE_8BIT_SP
to decide whether to load SP_H or not into the frame-pointer.
Best,
Claus