From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2309 invoked by alias); 19 Jul 2004 19:27:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2256 invoked by uid 48); 19 Jul 2004 19:27:27 -0000 Date: Mon, 19 Jul 2004 19:27:00 -0000 From: "bob at cnxtech dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20040719192719.16634.bob@cnxtech.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/16634] New: arm-elf-gcc 3.4.0 problems when generating code for __attribute__ ((interrupt ("IRQ"))) X-Bugzilla-Reason: CC X-SW-Source: 2004-07/txt/msg02354.txt.bz2 List-Id: 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 : 0: e24ee004 sub lr, lr, #4 ; 0x4 4: e92d500f stmdb sp!, {r0, r1, r2, r3, ip, lr} 8: ebfffffe bl 0 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 : 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 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