qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] semihosting/arm-compat: Have TARGET_SYS_EXIT[_EXTENDED] retu


From: Richard Henderson
Subject: Re: [PATCH] semihosting/arm-compat: Have TARGET_SYS_EXIT[_EXTENDED] return signed
Date: Tue, 10 Oct 2023 09:16:10 -0700
User-agent: Mozilla Thunderbird

On 10/4/23 23:26, Philippe Mathieu-Daudé wrote:
Per the "Semihosting for AArch32 and AArch64" spec. v2 (2023Q3) [*]:

   6.5   SYS_EXIT (0x18)
   6.5.2   Entry (64-bit)

     On entry, the PARAMETER REGISTER contains a pointer to
     a two-field argument block:

     . field 1
       The exception type, which is one of the set of reason
       codes in the above tables.

     . field 2
       A subcode, whose meaning depends on the reason code in
       field 1.

     In particular, if field 1 is ADP_Stopped_ApplicationExit
     then field 2 is an exit status code, as passed to the C
     standard library exit() function. [...]

Having libc exit() is declared as:

   LIBRARY
        Standard C Library (libc, -lc)

   SYNOPSIS

        void
        exit(int status);

the status is expected to be signed.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]