Hi ,all
I wanted to port uclinux to s3c44b0x,but I met a problem when compilation.
I downloaded uclinux-dist-2090618.tar.bz2and arm-elf-gcc 2.95.3.The following code is from arch/armnommu/mach-s3c44b0x/fiq.c
****************************************************************************************
void __attribute__ ((naked)) _fiq_wrapper(void)
{
   asm("\
   mov    r8, lr                            \n\
   stmdb    sp!, {r0-r8}    /* save unbanked R0...R7+R8 */        \n\
   3:                                    \n\
   ldr    r0, %[INTPND]                        \n\
   ldmia    r0, {r0-r2}    /* R0=INTPND, R1=INTMOD, R2=INTMSK */    \n\
   and    r0, r0, r1    /* ignore IRQs */            \n\
   bic    r0, r0, r2    /* ignore masked interrupts */        \n\
                                   \n\
   cmp    r0, #0        /* sanity check: no pending FIQ ? */    \n\
   beq    2f                            \n\
                                   \n\
   /* seek for the FIQ handler through the bitmask in R1     */    \n\
   /* R0 = bitmask with pending FIQ */                \n\
   /* R1 = bitmask for checking */                    \n\
   /* R2 = handler */                        \n\
   /* R3 = working register */                    \n\
   /* R4 = pointer to handler table */                \n\
   ldr     r4, %[_fiq_table]                    \n\
   1:                                    \n\
   ldmia    r4!, {r1, r2}                        \n\
   and    r3, r0, r1                        \n\
   cmp    r3, r1                            \n\
   bne    1b                            \n\
                                   \n\
   ldr    r3, %[INTACK]    /* acknowledge the FIQ */        \n\
   str    r1, [r3]                        \n\
                                   \n\
   mov    lr, pc                            \n\
   mov    pc, r2          /* and execute the handler */        \n\
   b     3b                            \n\
   2:                                    \n\
   ldmia    sp!, {r0-r8}    /* restore unbanked R0...R7+R8 */    \n\
   mov    lr, r8                            \n\
   subs    pc, r14, #4    /* return from FIQ, restore SPSR */    \n\
   "
   :
   :'( /: [ _fiq_table ] "m" (_fiq_table),/
     [INTPND] "m" (S3C44B0X_INTPND),
     [INTACK] "m" (S3C44B0X_F_ISPC)
   : "memory"
   );
}

/****************************************************************************/
static inline void _set_fiq_stack(unsigned int fiq_sp)
{
   asm("\
   mov    r3, %[fiq_sp]                    \n\
   mrs    r2, cpsr    /* switch to FIQ mode */    \n\
   bic    r1, r2, #0x1F    /* CPSR_MODE_BITS */        \n\
   orr    r1, r1, #0x11    /* CPSR_FIQ_MODE */        \n\
   msr    cpsr, r1                    \n\
   bic    sp,r3,#0x03    /* sp is passed in R0 */    \n\
   msr    cpsr,r2        /* restore previous CPU mode */    \n\
   "
   :
 :'( /: [ fiq_sp ] "r" (fiq_sp)/
   : "r1", "r2", "r3"
   );
}
******************************************************************************
The following are error infomation printed:
fiq.c: In function `_fiq_wrapper':
fiq.c:112: parse error before `['
fiq.c: In function `_set_fiq_stack':
fiq.c:132: parse error before `['
I have noted them with :'( .what's wrong ? my arm-elf-gcc is too old ?
I can not figure it out ,so I need your help.
Thanks in advance!

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to