From 784d5a936a73f0f0676fef782422c54ed280f599 Mon Sep 17 00:00:00 2001 From: mengqinggang Date: Thu, 23 Nov 2023 15:42:49 +0800 Subject: LoongArch: Add call36 and tail36 pseudo instructions for medium code model For tail36, it is necessary to explicitly indicate the temporary register. Therefore, the compiler and users will know that the tail will use a register. call36 func pcalau18i $ra, %call36(func) jirl $ra, $ra, 0; tail36 $t0, func pcalau18i $t0, %call36(func) jirl $zero, $t0, 0; --- ld/testsuite/ld-loongarch-elf/medium-call.s | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ld') diff --git a/ld/testsuite/ld-loongarch-elf/medium-call.s b/ld/testsuite/ld-loongarch-elf/medium-call.s index 4d1888b..50a6b8e 100644 --- a/ld/testsuite/ld-loongarch-elf/medium-call.s +++ b/ld/testsuite/ld-loongarch-elf/medium-call.s @@ -1,7 +1,9 @@ .L1: # call .L1, r1(ra) temp register, r1(ra) return register. + call36 .L1 pcaddu18i $r1, %call36(.L1) jirl $r1, $r1, 0 # tail .L1, r12(t0) temp register, r0(zero) return register. + tail36 $r12, .L1 pcaddu18i $r12, %call36(.L1) jirl $r0, $r12, 0 -- cgit v1.1