This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] off_t: fix register pair calculation for 64-bit case


On Fri, Jun 24, 2016 at 5:41 AM, Yury Norov <ynorov@caviumnetworks.com> wrote:
> On Fri, Jun 24, 2016 at 05:30:32AM -0700, H.J. Lu wrote:
>> On Fri, Jun 24, 2016 at 5:23 AM, Yury Norov <ynorov@caviumnetworks.com> wrote:
>> > There are 3 syscall wrappers under sysdeps/unix/sysv/linux that
>> > calculate register pair for off_t like this:
>> >         __LONG_LONG_PAIR (offset >> 31, offset)
>> >
>> > While it works for 32-bit off_t, new 32-bit APIs that use 64-bit
>> > off_t will be broken with it. This patch redirects affected syscalls
>> > to their 64-bit versions. It also saves few instructions and symbols
>> > in glibc, as 32-bit syscall wrappers are not generated anymore.
>>
>> If you have 64-bit register, should you use wordsize-64, like
>>
>> sysdeps/unix/sysv/linux/wordsize-64
>>
>> H.J.
>
> Sometimes it's not possible. AARCh64/ILP32 requires to pass 64-bit
> parameters as pair. (this is one of two options for ILP32 that is
> under discussion)

You should still use wordsize-64 and make special exceptions if needed.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]