diff options
author | Hongliang Wang <wanghongliang@loongson.cn> | 2023-09-26 09:12:01 +0800 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2024-02-16 09:33:10 -0500 |
commit | 522bd54edaa2fa404fd428f8ad0bcb0f0bec5639 (patch) | |
tree | dfe88361bcbbd17ac53b8af36cb52337f21095e9 /src/signal | |
parent | 4a16ddf53e7c634169d0a649782f8a724611f263 (diff) | |
download | musl-522bd54edaa2fa404fd428f8ad0bcb0f0bec5639.tar.gz musl-522bd54edaa2fa404fd428f8ad0bcb0f0bec5639.tar.xz musl-522bd54edaa2fa404fd428f8ad0bcb0f0bec5639.zip |
add loongarch64 port
Author: Xiaojuan Zhai <zhaixiaojuan@loongson.cn> Author: Meidan Li <limeidan@loongson.cn> Author: Guoqi Chen <chenguoqi@loongson.cn> Author: Xiaolin Zhao <zhaoxiaolin@loongson.cn> Author: Fan peng <fanpeng@loongson.cn> Author: Jiantao Shan <shanjiantao@loongson.cn> Author: Xuhui Qiang <qiangxuhui@loongson.cn> Author: Jingyun Hua <huajingyun@loongson.cn> Author: Liu xue <liuxue@loongson.cn> Author: Hongliang Wang <wanghongliang@loongson.cn>
Diffstat (limited to 'src/signal')
-rw-r--r-- | src/signal/loongarch64/restore.s | 10 | ||||
-rw-r--r-- | src/signal/loongarch64/sigsetjmp.s | 25 |
2 files changed, 35 insertions, 0 deletions
diff --git a/src/signal/loongarch64/restore.s b/src/signal/loongarch64/restore.s new file mode 100644 index 00000000..d90a8ebb --- /dev/null +++ b/src/signal/loongarch64/restore.s @@ -0,0 +1,10 @@ +.global __restore_rt +.global __restore +.hidden __restore_rt +.hidden __restore +.type __restore_rt,@function +.type __restore,@function +__restore_rt: +__restore: + li.w $a7, 139 + syscall 0 diff --git a/src/signal/loongarch64/sigsetjmp.s b/src/signal/loongarch64/sigsetjmp.s new file mode 100644 index 00000000..9c0e3ae2 --- /dev/null +++ b/src/signal/loongarch64/sigsetjmp.s @@ -0,0 +1,25 @@ +.global sigsetjmp +.global __sigsetjmp +.type sigsetjmp,@function +.type __sigsetjmp,@function +sigsetjmp: +__sigsetjmp: + beq $a1, $zero, 1f + st.d $ra, $a0, 184 + st.d $s0, $a0, 200 #184+8+8 + move $s0, $a0 + + la.global $t0, setjmp + jirl $ra, $t0, 0 + + move $a1, $a0 # Return from 'setjmp' or 'longjmp' + move $a0, $s0 + ld.d $ra, $a0, 184 + ld.d $s0, $a0, 200 #184+8+8 + +.hidden __sigsetjmp_tail + la.global $t0, __sigsetjmp_tail + jr $t0 +1: + la.global $t0, setjmp + jr $t0 |