public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/16634] New: arm-elf-gcc 3.4.0 problems when generating code for __attribute__ ((interrupt ("IRQ")))
@ 2004-07-19 19:27 bob at cnxtech dot com
  2004-07-19 20:38 ` [Bug target/16634] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: bob at cnxtech dot com @ 2004-07-19 19:27 UTC (permalink / raw)
  To: gcc-bugs

The gcc 3.4.0 still have problems on generating the entry/exit code for
interrupts, if we supress the "apcs-frame" option. When the code is compiled
with "-mno-apcs-frame" the entry code subtracts 4 from the "lr" before pushing
it into stack, and do it again on the exit code.

__attribute__ ((interrupt ("IRQ"))) void int_handler(void)
{
	foo();
}
 
arm-elf-gcc -mcpu=arm7tdmi -mno-apcs-frame -mthumb-interwork -Wall -O2 -c test.c
00000000 <int_handler>:
   0:   e24ee004        sub     lr, lr, #4      ; 0x4
   4:   e92d500f        stmdb   sp!, {r0, r1, r2, r3, ip, lr}
   8:   ebfffffe        bl      0 <int_handler>
   c:   e8bd500f        ldmia   sp!, {r0, r1, r2, r3, ip, lr}
  10:   e25ef004        subs    pc, lr, #4      ; 0x4


arm-elf-gcc -mcpu=arm7tdmi -mapcs-frame -mthumb-interwork -Wall -O2 -c test.c
00000000 <int_handler>:
   0:   e52dc004        str     ip, [sp, -#4]!
   4:   e1a0c00d        mov     ip, sp
   8:   e92dd80f        stmdb   sp!, {r0, r1, r2, r3, fp, ip, lr, pc}
   c:   e24cb004        sub     fp, ip, #4      ; 0x4
  10:   ebfffffe        bl      0 <int_handler>
  14:   e89d680f        ldmia   sp, {r0, r1, r2, r3, fp, sp, lr}
  18:   e8bd1000        ldmia   sp!, {ip}
  1c:   e25ef004        subs    pc, lr, #4      ; 0x4

-- 
           Summary: arm-elf-gcc 3.4.0 problems when generating code for
                    __attribute__ ((interrupt ("IRQ")))
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bob at cnxtech dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-cygwin
GCC target triplet: arm-elf-gcc


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


^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <bug-16634-8979@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2010-01-09 23:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-19 19:27 [Bug c/16634] New: arm-elf-gcc 3.4.0 problems when generating code for __attribute__ ((interrupt ("IRQ"))) bob at cnxtech dot com
2004-07-19 20:38 ` [Bug target/16634] " pinskia at gcc dot gnu dot org
2004-10-07 16:14 ` [Bug target/16634] arm-elf-gcc " pinskia at gcc dot gnu dot org
2005-07-02  1:31 ` pinskia at gcc dot gnu dot org
     [not found] <bug-16634-8979@http.gcc.gnu.org/bugzilla/>
2006-08-08 23:05 ` pbrook at gcc dot gnu dot org
2006-08-08 23:47 ` pbrook at gcc dot gnu dot org
2006-09-11 10:41 ` rearnsha at gcc dot gnu dot org
2006-09-11 11:31 ` tbm at cyrius dot com
2006-11-14 16:28 ` tla at thrane dot com
2007-01-04  0:10 ` pbrook at gcc dot gnu dot org
2007-05-03  2:14 ` david+gcc at porkrind dot org
2007-08-06  9:08 ` sgh at sgh dot dk
2007-11-08 21:42 ` ralf dot guetlein at web dot de
2008-02-07 13:55 ` mmz at gmx dot net
2009-02-12 21:58 ` sgh at sgh dot dk
2010-01-09 23:27 ` ramana at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).