[U-Boot] [PATCH 4/6] riscv: replace use of callee-saved register in standalone

Bin Meng bmeng.cn at gmail.com
Mon Dec 31 06:06:00 UTC 2018


On Mon, Dec 31, 2018 at 2:30 AM Lukas Auer
<lukas.auer at aisec.fraunhofer.de> wrote:
>
> Register x19 (s3) is a callee-saved register. It must not be used to
> load and jump to exported functions without saving it beforehand.
> Replace it with t0, a temporary and caller-saved register.
>
> Change the code comment to reflect this and fix it to correctly list gp
> as the register with the pointer to global data.
>
> Signed-off-by: Lukas Auer <lukas.auer at aisec.fraunhofer.de>
> ---
>
>  examples/standalone/stubs.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
Tested-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list