public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/39663]  New: mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with  -Os and -mthumb
@ 2009-04-06 13:44 info dot gnu at rt-labs dot com
  2009-04-06 13:50 ` [Bug target/39663] " info dot gnu at rt-labs dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: info dot gnu at rt-labs dot com @ 2009-04-06 13:44 UTC (permalink / raw)
  To: gcc-bugs

Mingw hosted arm-elf output differs from linux hosted arm-elf when compiling
with -Os and -mthumb for the code added below. Remove -mthumb and the output
won't differ.

Mingw hosted toolchain:
Target: arm-elf
Configured with: ../gcc-4.2.2/configure --target=arm-elf
--prefix=/proj/crossgcc/arm-elf --disable-nls --with-gnu-as --with-gnu-ld
--enable-languages=c --disable-shared --disable-threads --disable-libssp
--disable-__cxa_atexit --disable-libstdcxx-pch --enable-interwork
--enable-multilib
Thread model: single
gcc version 4.2.2

Linux hosted toolchain:
Target: arm-elf
Configured with: ../gcc-4.2.2/configure --target=arm-elf
--prefix=/proj/crossgcc/arm-elf --disable-nls --with-gnu-as --with-gnu-ld
--enable-languages=c --disable-shared --disable-threads --disable-libssp
--disable-__cxa_atexit --disable-libstdcxx-pch --enable-interwork
--enable-multilib
Thread model: single
gcc version 4.2.2

arm-elf-gcc -Wall -mlittle-endian -mthumb -mthumb-interwork -Os -save-temps  -c
main.c

main.c: 

typedef struct pic
{
   unsigned int soft_set;
   unsigned int soft_clear;
} pic_t;

typedef struct isr
{
   void (*func)(void *);
   void * arg;
} isr_t;

static volatile pic_t * const pSIC = (pic_t *)0xCA000000;
static isr_t isr_table[32];

static void isr1 (void * arg)
{
   /* Clear high priority IRQ */
   pSIC->soft_clear = (1 << 0);
}

int main (void)
{
   /* Install interrupt handlers */
   isr_table[0].func = isr1;
   isr_table[0].arg  = (void *)3;

   while(1);

   return (1);   
}

regards Andreas


-- 
           Summary: mingw hosted arm-elf output differs from linux hosted
                    arm-elf when compiling with  -Os and -mthumb
           Product: gcc
           Version: 4.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: info dot gnu at rt-labs dot com
 GCC build triplet: x86_64-unknown-linux-gnu, i686-pc-mingw32
  GCC host triplet: x86_64-unknown-linux-gnu, i686-pc-mingw32
GCC target triplet: arm-elf


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-04-07 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-06 13:44 [Bug target/39663] New: mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb info dot gnu at rt-labs dot com
2009-04-06 13:50 ` [Bug target/39663] " info dot gnu at rt-labs dot com
2009-04-06 13:51 ` info dot gnu at rt-labs dot com
2009-04-07  0:39 ` hp at gcc dot gnu dot org
2009-04-07 16:52 ` info dot gnu at rt-labs dot com

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).