This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/12084] 3.3.1 emitting strange stack handling code for ARM interrupts


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12084


rearnsha at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


------- Additional Comments From rearnsha at gcc dot gnu dot org  2003-09-01 09:20 -------
You are incorrect on both counts:

> 1) The stack pointer is not being reset to its original location.

Yes it is.  The first ldm reloads the stack pointer with the value it when 
    mov  ip, sp
was executed.  The second ldm pops the original ip value off the stack and
restores sp to the value it had before the interrupt was taken.

> 2) One of those ldm** needs a ^ after it to restore the correct CPSR.

No.  Neither of the ldm instructions restores the PC, so it must not use ^ or
it would end up accessing the user-bank register set.   Instead, the final
subs (note use of condition flag) instruction restores the CPSR.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]