diff options
author | Jamie Iles <[email protected]> | 2022-11-15 20:08:31 +0000 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2022-12-02 10:04:37 -0800 |
commit | dc58a24db8c12ea361e94eaf53adc5d471534694 (patch) | |
tree | 33800d8989bbdd0b2284a87b175eeed701e7ef21 /lib/mpi/mpi-mod.c | |
parent | 3bd7743f8d6d7171db9897a746038eefd52a1fbd (diff) |
RISC-V: preserve a1 in mcount
The RISC-V ELF psABI states that both a0 and a1 are used for return
values so we should preserve them both in return_to_handler. This is
especially important for RV32 for functions returning a 64-bit quantity
otherwise the return value can be corrupted and undefined behaviour
results.
Reviewed-by: Andrew Jones <[email protected]>
Signed-off-by: Jamie Iles <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions