This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: [PATCH] Semihosting fix for AArch64 when heapinfo is not provided by debugger
- From: Tamar Christina <Tamar dot Christina at arm dot com>
- To: Alexander Fedotov <alfedotov at gmail dot com>, "newlib at sourceware dot org" <newlib at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Mon, 23 Oct 2017 17:23:35 +0000
- Subject: RE: [PATCH] Semihosting fix for AArch64 when heapinfo is not provided by debugger
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tamar dot Christina at arm dot com;
- Nodisclaimer: True
- References: <CAN8C2Cr0d+on0L4pnfX16d=La4R6ViPoDnhQR-4ha_cO-gsdOQ@mail.gmail.com> <20171013091612.GE20139@calimero.vinschen.de> <CAN8C2CqWUx_gcO7LUv=xbaq0jJQoxCWJui9Vro5MnrjXy21hvA@mail.gmail.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi Alex,
In principle nothing against the patch. Just a comment
> diff --git a/libgloss/aarch64/crt0.S b/libgloss/aarch64/crt0.S
> index f670e03..f831be1 100644
> --- a/libgloss/aarch64/crt0.S
> +++ b/libgloss/aarch64/crt0.S
> @@ -102,33 +102,44 @@
> ldr x0, .LC0 /* point at returned values */
> ldr x1, [x0, #8] /* get heap_limit */
>
> + /* Set __heap_limit. */
> +#ifdef __ILP32__
> + /* Sanity check on the __heap_limit. */
> + tst x1, #0xffffffff00000000
> + bne .Linsanepar
> +#endif
if x1 is 0 it won't pass the first test in ILP32 and takes the branch,
I assume you intended it to fall through in that case? So I think this test
should be re-ordered.
> + cmp x1, xzr
> + beq .LC4
> + adrp x2, __heap_limit
> + add x2, x2, #:lo12:__heap_limit
> + str x1, [x2]
> +.LC4:
Thanks,
Tamar
> -----Original Message-----
> From: newlib-owner@sourceware.org [mailto:newlib-
> owner@sourceware.org] On Behalf Of Alexander Fedotov
> Sent: 19 October 2017 22:41
> To: newlib@sourceware.org
> Subject: Re: [PATCH] Semihosting fix for AArch64 when heapinfo is not
> provided by debugger
>
> Any comments/thoughts on this patch ?
> It would be great to have this feature in newlib release version.
>
> Alex
>
> On Fri, 13 Oct 2017 at 12:16, Corinna Vinschen <vinschen@redhat.com>
> wrote:
>
> > On Oct 11 14:57, Alexander Fedotov wrote:
> > > Use the same approach as in ARM port for case when Debugger not
> > > providing necessary info for semihosting.
> >
> > I'd like to see an ACK from some arm folks.
> >
> >
> > Thanks,
> > Corinna
> >
> > --
> > Corinna Vinschen
> > Cygwin Maintainer
> > Red Hat
> >
> --
> Best regards,
> AF