inteupt handler code: void ivic3_handler (void) __attribute__ ((__interrupt__ ("ilink1"))); void ivic3_handler (void) { } produce the asn code: .cpu base .section .text .align 4 .global _ivic3_handler .type _ivic3_handler,@function _ivic3_handler: ; interrupt handler sub sp,sp,16 ; BEGIN PROLOGUE ; vars= 0, regs= 0, args= 0, extra= 0 st fp,[sp] mov fp,sp ; END PROLOGUE ; EPILOGUE ld.a fp,[sp,0] j.d ilink1 add sp,sp,16 .Lfe1: .size _ivic3_handler,.Lfe1-_ivic3_handler .ident "GCC: (GNU) 3.2" the return statement: j.d ilink1 should be j.d.f (to update the flags) Release: gcc version 3.2 Environment: Configured with: ./configure --prefix=/afs/iil/home/o/oporan/fw/gcc/gcc-3.2/../install/ --target=arc-7-elf. Linux gcc as cross-compiler
Fix: lines 1337 in gcc/config/arc/arc.c should be replaced with: if (fn_type == ARC_FUNCTION_ILINK1 || fn_type == ARC_FUNCTION_ILINK2) fprintf (file, "\tj.d.f %s\n", reg_names[regs[fn_type]]); else fprintf (file, "\tj.d %s\n", reg_names[regs[fn_type]]);
Hello, this bug is still present on gcc 3.3 branch and mainline (20030524). Dara
See Dara's comment.
Subject: RE: [arc-7-elf] the interrupt handler does not return properly, uses j.d insted of j.d.f It's extremely easy to solve this bug, I patched the version I have, see above comments. -----Original Message----- From: pinskia@physics.uc.edu [mailto:gcc-bugzilla@gcc.gnu.org] Sent: Monday, May 26, 2003 11:48 PM To: Poran, Or Subject: [Bug target/8973] [arc-7-elf] the interupt handler does not return properly, uses j.d insted of j.d.f PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8973 pinskia@physics.uc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2003-05-26 20:48:04 date| | ------- Additional Comments From pinskia@physics.uc.edu 2003-05-26 20:48 ------- See Dara's comment. ------- You are receiving this mail because: ------- You reported the bug, or are watching the reporter.
Hello, I'm not sure if you simply didn't respond correctly, or Bugzilla is being stupid, but your followup did not appear here (in the bug report). Can you please resend it? Entering it through the comment field should work fine too... Thanks, Dara
It's extremely easy to solve this bug, I patched the version I have, see above comments.
Thanks for the comment and the patch. Would it be possible for you to create the patch using the diff utility (using the -u option) and post the resulting patch to the gcc-patches mailing list? The problem is that there is no one officially responsible for the arc port (no maintainer), so fixes are dealt with in a rather ad hoc manner, unless posted to gcc-patches... Thanks, Dara
Suspending until ARC gets a maintainer. At the moment, there appears to be nobody both * willing to patch arc and * able to do it correctly.
Posted the patch on gcc-patches: http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00951.html Cannot commit/change bug status, since i don't have the required permissions
Marking as waiting for feedback (See patch link above)
No that's wrong. WAITING means waiting feedback *from submitter*.
(In reply to comment #11) > No that's wrong. WAITING means waiting feedback *from submitter*. This has been approved at : http://gcc.gnu.org/ml/gcc-patches/2005-06/msg01918.html Can this be committed into 3.4.5 as well as mainline ?
Fixed on the mainline for 4.1.0.
Subject: Bug 8973 CVSROOT: /cvs/gcc Module name: gcc Changes by: pinskia@gcc.gnu.org 2005-09-06 22:29:46 Modified files: gcc : ChangeLog gcc/config/arc : arc.c Log message: 2005-09-06 Saurabh Verma <saurabh.verma@codito.com> PR target/8973 * config/arc/arc.c (arc_output_function_epilogue): Update flags while returning from an interrupt handler. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9909&r2=2.9910 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arc/arc.c.diff?cvsroot=gcc&r1=1.74&r2=1.75