This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 10/15] riscv: Avoid clobbering register parameters in syscall
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Palmer Dabbelt <palmerdabbelt at google dot com>, dj at redhat dot com
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 10 Feb 2020 18:55:12 -0300
- Subject: Re: [PATCH 10/15] riscv: Avoid clobbering register parameters in syscall
- References: <mhng-92cfd6f4-b58f-48b0-826b-97e8a1aea943@palmerdabbelt-glaptop1>
On 10/02/2020 18:27, Palmer Dabbelt wrote:
> On Mon, 10 Feb 2020 11:51:05 PST (-0800), dj@redhat.com wrote:
>>
>> Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
>>> long int _sys_result; \
>>> + long int _arg0 = (long int) (arg0); \
>>> \
>>> { \
>>> register long int __a7 asm ("a7") = number; \
>>> - register long int __a0 asm ("a0") = (long int) (arg0); \
>>> + register long int __a0 asm ("a0") = _arg0; \
>>
>> Ok
>
> Ya, thanks -- I found this behavior super surprising. I'm assuming you're
> commiting this one (you is Adhemerval here)?
Yes, this should be independent from the patchset.