[PATCH] ppc64: fix semtimedop compat syscall

Stephen Rothwell sfr at canb.auug.org.au
Mon Apr 25 13:29:22 EST 2005


On Sun, 24 Apr 2005 19:45:22 -0700 "David S. Miller" <davem at davemloft.net> wrote:
>
> On Wed, 23 Mar 2005 07:19:31 +1100
> Paul Mackerras <paulus at samba.org> wrote:
> 
> > Arnd Bergmann writes:
> > 
> > > One problem is that sign extension can not be expressed in architecture
> > > independent C code.
> > 
> > On which architectures does (long)(int) x not give the desired result?
> 
> It all depends upon what the processor ABI says about incoming arguments,
> specifically whether the caller is expected to sign extend them or not.
> 
> If the caller is expected to sign extend, then "(long) (int) x" will get
> optimized away by the compiler.

Even if x is declared as unsigned int?

And is there an architecture like this?
-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050425/dc81ddd0/attachment.pgp 


More information about the Linuxppc64-dev mailing list