This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new f404cb60b8 mpfs_head.S: Change j/jal to tail call
f404cb60b8 is described below
commit f404cb60b882bfe439f9346e5849bf6bf2ec3656
Author: Ville Juven <[email protected]>
AuthorDate: Fri Dec 8 12:28:39 2023 +0200
mpfs_head.S: Change j/jal to tail call
In order to avoid linker truncation error (address unreachable), making
it a tail call ensures this does not happen.
---
arch/risc-v/src/mpfs/mpfs_head.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/risc-v/src/mpfs/mpfs_head.S b/arch/risc-v/src/mpfs/mpfs_head.S
index 50dd270922..ec2c3d3a04 100644
--- a/arch/risc-v/src/mpfs/mpfs_head.S
+++ b/arch/risc-v/src/mpfs/mpfs_head.S
@@ -166,7 +166,7 @@ __start:
csrw mip, zero
/* Jump to application */
- j mpfs_jump_to_app
+ tail mpfs_jump_to_app
.continue_boot:
@@ -187,7 +187,7 @@ __start:
/* Jump to __mpfs_start with mhartid in a0 */
- jal __mpfs_start
+ tail __mpfs_start
/* We shouldn't return from __mpfs_start
* in case of return, loop forever. nop's added so can be seen in debugger