linux-mips
[Top] [All Lists]

Re: Compiler Problems in tlbex-r4k.S

To: Ralf Rösch <ralf.roesch@rw-gmbh.de>
Subject: Re: Compiler Problems in tlbex-r4k.S
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Thu, 23 Oct 2003 11:43:27 +0200 (MEST)
Cc: Linux/MIPS Development <linux-mips@linux-mips.org>
In-reply-to: <NHBBLBCCGMJFJIKAMKLHOEIJCBAA.ralf.roesch@rw-gmbh.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
On Thu, 23 Oct 2003, [iso-8859-1] Ralf Rösch wrote:
> The latest update in tlbex-r4k.S (tag 2_4) produces
> following compiler errors on my machine:
> 
> mipsel-linux-gcc -D__ASSEMBLY__ -D__KERNEL__ -I/build/linux-2.4.22-rthal5g-s
> trom
> boli/include -I /build/linux-2.4.22-rthal5g-stromboli/include/asm/gcc -G
> 0 -mno-
> abicalls -fno-pic -pipe   -mcpu=r4600 -mips2 -Wa,--trap   -c -o tlbex-r4k.o
> tlbe
> x-r4k.S
> tlbex-r4k.S: Assembler messages:
> tlbex-r4k.S:179: Error: missing ')'
> tlbex-r4k.S:179: Error: missing ')'
> tlbex-r4k.S:179: Error: missing ')'
> tlbex-r4k.S:179: Error: illegal operands `and'
> tlbex-r4k.S:207: Error: missing ')'
> tlbex-r4k.S:207: Error: missing ')'
> tlbex-r4k.S:207: Error: missing ')'
> tlbex-r4k.S:207: Error: illegal operands `and'
> tlbex-r4k.S:243: Error: missing ')'
> tlbex-r4k.S:243: Error: missing ')'
> tlbex-r4k.S:243: Error: missing ')'
> ...
> 
> If I change the line 43 from:
> #define PTE_PAGE_SIZE (1L << PTE_PAGE_SHIFT)
> to
> #define PTE_PAGE_SIZE (1 << PTE_PAGE_SHIFT)
> the compiling is o.k.
> 
> Is that a compiler problem or an programming error ?

That's a programming error. The assembler doesn't know 1L, it needs plain 1.

Yes, it makes life hard, if you want to share your definitions between the
C compiler and the assembler.

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds


<Prev in Thread] Current Thread [Next in Thread>