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

GCC 4.4.1 issue


Hi all ,


We Build tool chain for ARM architecture(cortex A8) and when we build
below code we face Build error.



arm-none-linux-gnueabi-gcc  test.c

test.c: In function 'main':
test.c:13: error: can't find a register in class 'GENERAL_REGS' while
reloading 'asm'
test.c:13: error: 'asm' operand has impossible constraints


test.c
int main(void)
{
        unsigned int u32PosFrac;
        int s32PosInt;
        int s16CoeffOrg[100][100];
        unsigned int u32In3[(1024>>2)+4];
        unsigned int* pu8In4;  //pu8In4 = (UInt8*)u32In3;
        unsigned char*  u8Out;
        unsigned int u32Step;
        unsigned int u32TgtWidth;
        asm volatile (
                "\n\t"
                                :
                                : "r" (pu8In4), "r" (s32PosInt), "r"
(s16CoeffOrg), "r" (u32PosFrac), "r" (u8Out), "r" (u32Step), "r"
(u32TgtWidth)
                                : "r2", "r3", "r4", "r5", "r6", "r7", "r8"
                                );
        return 1;
}



Will you please let me know the reason and fix for this.


Kind regards
keshav


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