Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: [matt-nb5-mips64] src/lib/csu/common_elf



On Sun, Aug 16, 2009 at 03:32:04AM +0000, Matt Thomas wrote:
> Module Name:  src
> Committed By: matt
> Date:         Sun Aug 16 03:32:04 UTC 2009
> 
> Modified Files:
>       src/lib/csu/common_elf [matt-nb5-mips64]: common.h
> 
> Log Message:
> __syscall return quad_t, not int (think SYS_lseek)

No ... it is just fubar.
The system calls either return a single 32 bit value, a single 64 bit
value, or two 32 bit values (pipe).

You can't cast between the different return types.
For instance sparc32 will return a 32 bit value in %o0,
but a 64bit value has the high part in %o0 and the low part in %o1.

Since most system calls return 'int' the return value should be int.
To get anything else you'd need to cast the __syscall() itself to
a different function type.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index