This is the mail archive of the gcc-prs@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]

c/7941: GCC-3.2 does not work well with c-code interrupt function


>Number:         7941
>Category:       c
>Synopsis:       GCC-3.2 does not work well with c-code interrupt function
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          mistaken
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 16 19:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Adam Tong
>Release:        GCC-3.2
>Organization:
>Environment:
cygwin
>Description:
I use the gcc-3.2 for arm to compile a C-Code interrupt function, the results is very diffrent when the option 
'-mthumb-interwork' is used or not.
1: If the '-mthumb-interwork' is not used, code "ldmdb	fp, {r3, fp, ip, lr}^" will be generated, is this wrong?
2: If the '-mthumb-interwork' is not used, code "ldmdb	fp, {r3, fp, ip, pc}^" will be generated, is this right?

Compile by command: arm-elf-gcc -mthumb-interwork -gdwarf -c .\irq.c -o.\irq.o

Please reply me as soon as possible. thanks
(86)755-25620636-810
Adam Tong
>How-To-Repeat:
/**************  Source file Start************************/
   void ext_IRQ0_handler(void) __attribute__ ((interrupt ("IRQ")));

/*-----------------------------------------------------*/
/* Function Name       : ext_IRQ0_handler              */
/*-----------------------------------------------------*/
void ext_IRQ0_handler(void)
{
    int i = 1;
    return;
}
/**************  Source file End***********************/

/***Compile Command without "-mthumb-interwork" *******/
arm-elf-gcc -gdwarf -c irq.c -o irq.o

/***Compile Command with "-mthumb-interwork" *******/
arm-elf-gcc -mthumb-interwork -gdwarf -c irq.c -o irq.o

Disassemble : arm-elf-objdump -d irq.o 
you will discover their different.
>Fix:
Maybe the cpp.exe is wrong.

Please reply me as soon as possible. thanks
(86)755-25620636-810
Adam Tong
>Release-Note:
>Audit-Trail:
>Unformatted:


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