[PATCH v7.1 01/13] ARC: ABI Implementation
Vineet Gupta
Vineet.Gupta1 at synopsys.com
Wed Jul 1 15:36:13 EDT 2020
On 7/1/20 9:50 AM, Adhemerval Zanella via Libc-alpha wrote:
>
>
> On 30/06/2020 21:06, Vineet Gupta via Libc-alpha wrote:
>> This code deals with the ARC ABI.
>> ---
>> Changes since v7:
>> - Used void * (iso int *) in tls-macros.h
>
> LGTM, with just a couple of syntax nits below.
>
> Reviewed-by: Adhemerval Zanella <adhemerval.zanella at linaro.org>
Thx. I suppose the process for new ports is to have a Reviewed-by on all patches,
squash them and push in 1 go (although in past I was asked to push the ARC elf
header patch).
Also do we need more than 1 Reviewed-by for this to be "push worthy" ?
>> +ENTRY (__longjmp)
>> +
>> + LDR (blink, r0, 0)
>> + LDR (sp, r0, 1)
>> + LDR (fp, r0, 2)
>> + LDR (gp, r0, 3)
>> +
>> + LDR (r13, r0, 4)
>> + LDR (r14, r0, 5)
>> + LDR (r15, r0, 6)
>> + LDR (r16, r0, 7)
>> + LDR (r17, r0, 8)
>> + LDR (r18, r0, 9)
>> + LDR (r19, r0, 10)
>> + LDR (r20, r0, 11)
>> + LDR (r21, r0, 12)
>> + LDR (r22, r0, 13)
>> + LDR (r23, r0, 14)
>> + LDR (r24, r0, 15)
>> +
>> + mov.f r0, r1
>> + j.d [blink]
>> + mov.z r0, 1 /* don't return 0 to setjmp callsite from longjmp. */
>> +
>> +END (__longjmp)
>
> Ok, you have removed r25 save as pre previous discussion.
Right, and GP is being saved now.
>> diff --git a/sysdeps/arc/bits/setjmp.h b/sysdeps/arc/bits/setjmp.h
>> new file mode 100644
>> index 000000000000..6bba95fafe0f
>> --- /dev/null
>> +++ b/sysdeps/arc/bits/setjmp.h
>> @@ -0,0 +1,26 @@
>> +/* Define the machine-dependent type `jmp_buf'. ARC version.
>
> I think current trend is to just use apostrophe instead of the grave
> accent in such cases.
Ok changed.
>> +reloc_index (uintptr_t plt0, uintptr_t pltn, size_t size)
>> +{
>> + unsigned long int idx = pltn - plt0;
>> +
>> + /* PLT trampoline is 16 bytes. */
>
> Double space after period.
Fixed.
>> +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
>> + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf_sp (_jmpbuf) - (_adj)))
>> +
>> +/* We use the normal longjmp for unwinding. */
>> +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
>
> Ok. As a side note teh jmpbuf-unwind.h is candidate for some consolidation
> (the same macros are replicated in each architecture).
OK.
More information about the linux-snps-arc
mailing list