This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] Complete PPC INLINE_SYSCALL macro
On Tuesday 24 September 2002 22:55, Jakub Jelinek wrote:
> On Tue, Sep 24, 2002 at 10:45:51PM +0200, Franz Sirl wrote:
> > Hi,
> >
> > after comparing the INLINE_SYSCALL macro with the stuff we have in
> > asm/unistd.h, I noticed a few missing bits. Main thing are the missing
> > register clobbers which may lead to subtle bugs.
>
> Doesn't look right. E.g. with INLINE_SYSCALL(name, 2, ...) you
> have r4 both in clobbers and as input which is not allowed.
Huh? has this changed post-3.2? Or hasn't the documentation been updated? In
3.2 it explicitly allows clobbering the inputs of a parallel, which is how
the asm ends up as:
(insn 18 17 20 (parallel[
(set (reg/v:SI 3 r3)
(asm_operands:SI ("sc
mfcr %1
") ("=&r") 0[
(reg/v:SI 0 r0)
(reg/v:SI 3 r3)
(reg/v:SI 4 r4)
]
[
(asm_input:SI ("1"))
(asm_input:SI ("0"))
(asm_input:SI ("r"))
] ("test-syscall.c") 56))
(set (reg/v:SI 0 r0)
(asm_operands:SI ("sc
mfcr %1
") ("=&r") 1[
(reg/v:SI 0 r0)
(reg/v:SI 3 r3)
(reg/v:SI 4 r4)
]
[
(asm_input:SI ("1"))
(asm_input:SI ("0"))
(asm_input:SI ("r"))
] ("test-syscall.c") 56))
(clobber (mem:BLK (scratch) [0 A8]))
(clobber (reg:QI 68 cr0))
(clobber (reg:QI 4 r4))
] ) -1 (nil)
(nil))
So unless this has changed, the macro is valid, or?
Franz.