Subject: Compiler Problems in tlbex-r4k.S

From: Ralf Rösch <[email-masked]>
Date: Thu, 23 Oct 2003 11:33:16 +0200

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 ?

  Ralf

---

From: Geert Uytterhoeven <[email-masked]>
Date: Thu, 23 Oct 2003 11:43:27 +0200 (MEST)

> 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 -- [email-masked]

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

---

From: Ralf Baechle <[email-masked]>
Date: Thu, 23 Oct 2003 18:33:31 +0200

> > #define PTE_PAGE_SIZE	(1 << PTE_PAGE_SHIFT)

The fix for this went into CVS yesterday.

> C compiler and the assembler.

It's a PITA that gas doesn't accept constants in the same syntax as C
does.  It means we have to extract many constants into offset.h before
they can be used in assembler code.  One of the small things on my
wishlist for x-mas ;-)

  Ralf

---

From: "Kip Walker" <[email-masked]>
Date: Thu, 23 Oct 2003 11:41:22 -0700

> The fix for this went into CVS yesterday.

Actually, this is a new problem which was my fault.  I'm checking in the
fix.

Apologies!

Kip