On 1/8/23 17:22, Keith Packard via wrote:
Instead of using R_ARG0 (the semihost function number), use R_ARG1
(the provided exit status).
Signed-off-by: Keith Packard
---
target/nios2/nios2-semi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Thanks, queued via misc-fixes.
On Tue, 1 Aug 2023 at 16:28, Keith Packard wrote:
>
>
> > Yeah, the closest to a "standard" we have for nios2 is that
> > I asked the Codesourcery folks to document it in the libgloss
> > sources and put the URL to it in a comment at the top of
> > nios2-semi.c, given that there's no official spec
> Yeah, the closest to a "standard" we have for nios2 is that
> I asked the Codesourcery folks to document it in the libgloss
> sources and put the URL to it in a comment at the top of
> nios2-semi.c, given that there's no official spec and the
> original and main guest-side user is libgloss.
> m6
On Tue, 1 Aug 2023 at 16:23, Keith Packard via wrote:
>
> Instead of using R_ARG0 (the semihost function number), use R_ARG1
> (the provided exit status).
>
> Signed-off-by: Keith Packard
> ---
> target/nios2/nios2-semi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git
Instead of using R_ARG0 (the semihost function number), use R_ARG1
(the provided exit status).
Signed-off-by: Keith Packard
---
target/nios2/nios2-semi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c
index 3738774976
On Tue, 1 Aug 2023 at 16:10, Keith Packard wrote:
>
>
> > says that for HOSTED_EXIT the exit code is in r5,
> > not in a parameter block pointed to by r5. That
> > would imply that the correct change is to use
> > R_ARG1 rather than R_ARG0 here.
>
> Ah, thanks -- I hadn't managed to find the actua
> says that for HOSTED_EXIT the exit code is in r5,
> not in a parameter block pointed to by r5. That
> would imply that the correct change is to use
> R_ARG1 rather than R_ARG0 here.
Ah, thanks -- I hadn't managed to find the actual standard yet. I'll
resubmit with that fixed.
--
-keith
sign
On Mon, 31 Jul 2023 at 23:42, Keith Packard via wrote:
>
> Instead of using the function number (which is always zero), fetch the
> application-provided exit code argument and pass that to the two exit
> functions.
>
> Signed-off-by: Keith Packard
> ---
> target/nios2/nios2-semi.c | 5 +++--
> 1
Instead of using the function number (which is always zero), fetch the
application-provided exit code argument and pass that to the two exit
functions.
Signed-off-by: Keith Packard
---
target/nios2/nios2-semi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/nios2