Subject: sign extension for 32bit syscalls on ppc64

From: Christoph Hellwig <[email-masked]>
Date: Fri, 28 Apr 2006 15:12:54 +0200

For 32bit syscalls implemented in arch/powerpc/ we're doing our own
sign-extension where an int argument is passed as u32 in the prototype
and then casted to int later on:

asmlinkage long compat_sys_sendfile(u32 out_fd, u32 in_fd, compat_off_t
__user * offset, u32 count)

{
	...
	ret = sys_sendfile((int)out_fd, (int)in_fd, up, count);
	..
}

OTOH various syscalls in the generic code don't do that and it seems to
still work fine.  I have patches for various new generic compat
routines, and they all seem to work fine without this sign extension.

What's the exact sign extention rules for ppc64?