riscv,*.S: use pesudo instruction call

* let the linker perform relaxation
This commit is contained in:
Zihao Yu 2024-02-19 12:48:06 +08:00
parent 56d4ae7165
commit 031dd9d931
4 changed files with 9 additions and 9 deletions

View file

@ -5,6 +5,6 @@
_start:
mv s0, zero
la sp, _stack_pointer
jal _trm_init
call _trm_init
.size _start, . - _start

View file

@ -58,7 +58,7 @@ __am_asm_trap:
csrw mstatus, t1
mv a0, sp
jal __am_irq_handle
call __am_irq_handle
LOAD t1, OFFSET_STATUS(sp)
LOAD t2, OFFSET_EPC(sp)

View file

@ -40,7 +40,7 @@ FUNC_BEGIN (__udivsi3)
sll a0, a0, 32
sll a1, a1, 32
move t0, ra
jal HIDDEN_JUMPTARGET(__udivdi3)
call HIDDEN_JUMPTARGET(__udivdi3)
sext.w a0, a0
jr t0
FUNC_END (__udivsi3)
@ -52,7 +52,7 @@ FUNC_BEGIN (__umodsi3)
srl a0, a0, 32
srl a1, a1, 32
move t0, ra
jal HIDDEN_JUMPTARGET(__udivdi3)
call HIDDEN_JUMPTARGET(__udivdi3)
sext.w a0, a1
jr t0
FUNC_END (__umodsi3)
@ -100,7 +100,7 @@ HIDDEN_DEF (__udivdi3)
FUNC_BEGIN (__umoddi3)
/* Call __udivdi3(a0, a1), then return the remainder, which is in a1. */
move t0, ra
jal HIDDEN_JUMPTARGET(__udivdi3)
call HIDDEN_JUMPTARGET(__udivdi3)
move a0, a1
jr t0
FUNC_END (__umoddi3)
@ -117,7 +117,7 @@ FUNC_END (__umoddi3)
neg a1, a1
.L12:
move t0, ra
jal HIDDEN_JUMPTARGET(__udivdi3)
call HIDDEN_JUMPTARGET(__udivdi3)
neg a0, a0
jr t0
FUNC_END (__divdi3)
@ -127,7 +127,7 @@ FUNC_BEGIN (__moddi3)
bltz a1, .L31
bltz a0, .L32
.L30:
jal HIDDEN_JUMPTARGET(__udivdi3) /* The dividend is not negative. */
call HIDDEN_JUMPTARGET(__udivdi3) /* The dividend is not negative. */
move a0, a1
jr t0
.L31:
@ -135,7 +135,7 @@ FUNC_BEGIN (__moddi3)
bgez a0, .L30
.L32:
neg a0, a0
jal HIDDEN_JUMPTARGET(__udivdi3) /* The dividend is hella negative. */
call HIDDEN_JUMPTARGET(__udivdi3) /* The dividend is hella negative. */
neg a0, a1
jr t0
FUNC_END (__moddi3)

View file

@ -5,4 +5,4 @@
_start:
mv s0, zero
la sp, _stack_pointer
jal _trm_init
call _trm_init