The syscall call uses the 'tail' instruction call

If the 'j' command is used here,it cannot always be called.
The 'tail' command is used here, let the compiler decide
which instruction to use,when the call distance is less
than 1M, it will be compiled into 'j' command, and when
the distance is greater than 1M, it will be compiled
into 'aupic' and 'jr' command.

Test: llvm-objdump -d
Change-Id: I53d8aa7f54b9c4c96fce491487dcba7b63348219
Signed-off-by: caowencheng <caowencheng@eswincomputing.com>
This commit is contained in:
caowencheng 2023-03-09 09:16:34 +08:00 committed by wencheng cao
parent 7f2f9410ab
commit c42c74138c

View file

@ -93,7 +93,7 @@ riscv64_call = syscall_stub_header + """\
ret
1:
neg a0, a0
j __set_errno_internal
tail __set_errno_internal
END(%(func)s)
"""