From: Rich Felker Date: Wed, 20 Jan 2016 01:44:06 +0000 (+0000) Subject: switch sh and mips setjmp asm from .sub system to .S files X-Git-Tag: v1.1.13~94 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4b9a08f29303661e9680fc1ee1569daa25df7d50;p=oweals%2Fmusl.git switch sh and mips setjmp asm from .sub system to .S files --- diff --git a/src/setjmp/mips-sf/longjmp.s b/src/setjmp/mips-sf/longjmp.s deleted file mode 100644 index 8e769675..00000000 --- a/src/setjmp/mips-sf/longjmp.s +++ /dev/null @@ -1,25 +0,0 @@ -.set noreorder - -.global _longjmp -.global longjmp -.type _longjmp,@function -.type longjmp,@function -_longjmp: -longjmp: - move $2, $5 - bne $2, $0, 1f - nop - addu $2, $2, 1 -1: lw $ra, 0($4) - lw $sp, 4($4) - lw $16, 8($4) - lw $17, 12($4) - lw $18, 16($4) - lw $19, 20($4) - lw $20, 24($4) - lw $21, 28($4) - lw $22, 32($4) - lw $23, 36($4) - lw $30, 40($4) - jr $ra - lw $28, 44($4) diff --git a/src/setjmp/mips-sf/longjmp.sub b/src/setjmp/mips-sf/longjmp.sub deleted file mode 100644 index e80331b6..00000000 --- a/src/setjmp/mips-sf/longjmp.sub +++ /dev/null @@ -1 +0,0 @@ -longjmp.s diff --git a/src/setjmp/mips-sf/setjmp.s b/src/setjmp/mips-sf/setjmp.s deleted file mode 100644 index 38ed5e00..00000000 --- a/src/setjmp/mips-sf/setjmp.s +++ /dev/null @@ -1,25 +0,0 @@ -.set noreorder - -.global __setjmp -.global _setjmp -.global setjmp -.type __setjmp,@function -.type _setjmp,@function -.type setjmp,@function -__setjmp: -_setjmp: -setjmp: - sw $ra, 0($4) - sw $sp, 4($4) - sw $16, 8($4) - sw $17, 12($4) - sw $18, 16($4) - sw $19, 20($4) - sw $20, 24($4) - sw $21, 28($4) - sw $22, 32($4) - sw $23, 36($4) - sw $30, 40($4) - sw $28, 44($4) - jr $ra - li $2, 0 diff --git a/src/setjmp/mips-sf/setjmp.sub b/src/setjmp/mips-sf/setjmp.sub deleted file mode 100644 index b7ad2210..00000000 --- a/src/setjmp/mips-sf/setjmp.sub +++ /dev/null @@ -1 +0,0 @@ -setjmp.s diff --git a/src/setjmp/mips/longjmp.S b/src/setjmp/mips/longjmp.S new file mode 100644 index 00000000..fdb6c95d --- /dev/null +++ b/src/setjmp/mips/longjmp.S @@ -0,0 +1,40 @@ +.set noreorder + +.global _longjmp +.global longjmp +.type _longjmp,@function +.type longjmp,@function +_longjmp: +longjmp: + move $2, $5 + bne $2, $0, 1f + nop + addu $2, $2, 1 +1: +#ifndef __mips_soft_float + lwc1 $20, 56($4) + lwc1 $21, 60($4) + lwc1 $22, 64($4) + lwc1 $23, 68($4) + lwc1 $24, 72($4) + lwc1 $25, 76($4) + lwc1 $26, 80($4) + lwc1 $27, 84($4) + lwc1 $28, 88($4) + lwc1 $29, 92($4) + lwc1 $30, 96($4) + lwc1 $31, 100($4) +#endif + lw $ra, 0($4) + lw $sp, 4($4) + lw $16, 8($4) + lw $17, 12($4) + lw $18, 16($4) + lw $19, 20($4) + lw $20, 24($4) + lw $21, 28($4) + lw $22, 32($4) + lw $23, 36($4) + lw $30, 40($4) + jr $ra + lw $28, 44($4) diff --git a/src/setjmp/mips/longjmp.s b/src/setjmp/mips/longjmp.s deleted file mode 100644 index a972d677..00000000 --- a/src/setjmp/mips/longjmp.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noreorder - -.global _longjmp -.global longjmp -.type _longjmp,@function -.type longjmp,@function -_longjmp: -longjmp: - move $2, $5 - bne $2, $0, 1f - nop - addu $2, $2, 1 -1: lwc1 $20, 56($4) - lwc1 $21, 60($4) - lwc1 $22, 64($4) - lwc1 $23, 68($4) - lwc1 $24, 72($4) - lwc1 $25, 76($4) - lwc1 $26, 80($4) - lwc1 $27, 84($4) - lwc1 $28, 88($4) - lwc1 $29, 92($4) - lwc1 $30, 96($4) - lwc1 $31, 100($4) - lw $ra, 0($4) - lw $sp, 4($4) - lw $16, 8($4) - lw $17, 12($4) - lw $18, 16($4) - lw $19, 20($4) - lw $20, 24($4) - lw $21, 28($4) - lw $22, 32($4) - lw $23, 36($4) - lw $30, 40($4) - jr $ra - lw $28, 44($4) diff --git a/src/setjmp/mips/setjmp.S b/src/setjmp/mips/setjmp.S new file mode 100644 index 00000000..501d5264 --- /dev/null +++ b/src/setjmp/mips/setjmp.S @@ -0,0 +1,39 @@ +.set noreorder + +.global __setjmp +.global _setjmp +.global setjmp +.type __setjmp,@function +.type _setjmp,@function +.type setjmp,@function +__setjmp: +_setjmp: +setjmp: + sw $ra, 0($4) + sw $sp, 4($4) + sw $16, 8($4) + sw $17, 12($4) + sw $18, 16($4) + sw $19, 20($4) + sw $20, 24($4) + sw $21, 28($4) + sw $22, 32($4) + sw $23, 36($4) + sw $30, 40($4) + sw $28, 44($4) +#ifndef __mips_soft_float + swc1 $20, 56($4) + swc1 $21, 60($4) + swc1 $22, 64($4) + swc1 $23, 68($4) + swc1 $24, 72($4) + swc1 $25, 76($4) + swc1 $26, 80($4) + swc1 $27, 84($4) + swc1 $28, 88($4) + swc1 $29, 92($4) + swc1 $30, 96($4) + swc1 $31, 100($4) +#endif + jr $ra + li $2, 0 diff --git a/src/setjmp/mips/setjmp.s b/src/setjmp/mips/setjmp.s deleted file mode 100644 index 53d702a9..00000000 --- a/src/setjmp/mips/setjmp.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noreorder - -.global __setjmp -.global _setjmp -.global setjmp -.type __setjmp,@function -.type _setjmp,@function -.type setjmp,@function -__setjmp: -_setjmp: -setjmp: - sw $ra, 0($4) - sw $sp, 4($4) - sw $16, 8($4) - sw $17, 12($4) - sw $18, 16($4) - sw $19, 20($4) - sw $20, 24($4) - sw $21, 28($4) - sw $22, 32($4) - sw $23, 36($4) - sw $30, 40($4) - sw $28, 44($4) - swc1 $20, 56($4) - swc1 $21, 60($4) - swc1 $22, 64($4) - swc1 $23, 68($4) - swc1 $24, 72($4) - swc1 $25, 76($4) - swc1 $26, 80($4) - swc1 $27, 84($4) - swc1 $28, 88($4) - swc1 $29, 92($4) - swc1 $30, 96($4) - swc1 $31, 100($4) - jr $ra - li $2, 0 diff --git a/src/setjmp/mipsel-sf/longjmp.sub b/src/setjmp/mipsel-sf/longjmp.sub deleted file mode 100644 index 69072029..00000000 --- a/src/setjmp/mipsel-sf/longjmp.sub +++ /dev/null @@ -1 +0,0 @@ -../mips-sf/longjmp.s diff --git a/src/setjmp/mipsel-sf/setjmp.sub b/src/setjmp/mipsel-sf/setjmp.sub deleted file mode 100644 index 99174758..00000000 --- a/src/setjmp/mipsel-sf/setjmp.sub +++ /dev/null @@ -1 +0,0 @@ -../mips-sf/setjmp.s diff --git a/src/setjmp/sh-nofpu-fdpic/longjmp.sub b/src/setjmp/sh-nofpu-fdpic/longjmp.sub deleted file mode 100644 index 62fcd2b1..00000000 --- a/src/setjmp/sh-nofpu-fdpic/longjmp.sub +++ /dev/null @@ -1 +0,0 @@ -../sh-nofpu/longjmp.s diff --git a/src/setjmp/sh-nofpu-fdpic/setjmp.sub b/src/setjmp/sh-nofpu-fdpic/setjmp.sub deleted file mode 100644 index a5bb294c..00000000 --- a/src/setjmp/sh-nofpu-fdpic/setjmp.sub +++ /dev/null @@ -1 +0,0 @@ -../sh-nofpu/setjmp.s diff --git a/src/setjmp/sh-nofpu/longjmp.s b/src/setjmp/sh-nofpu/longjmp.s deleted file mode 100644 index cda482c5..00000000 --- a/src/setjmp/sh-nofpu/longjmp.s +++ /dev/null @@ -1,22 +0,0 @@ -.global _longjmp -.global longjmp -.type _longjmp, @function -.type longjmp, @function -_longjmp: -longjmp: - mov.l @r4+, r8 - mov.l @r4+, r9 - mov.l @r4+, r10 - mov.l @r4+, r11 - mov.l @r4+, r12 - mov.l @r4+, r13 - mov.l @r4+, r14 - mov.l @r4+, r15 - lds.l @r4+, pr - - tst r5, r5 - movt r0 - add r5, r0 - - rts - nop diff --git a/src/setjmp/sh-nofpu/longjmp.sub b/src/setjmp/sh-nofpu/longjmp.sub deleted file mode 100644 index e80331b6..00000000 --- a/src/setjmp/sh-nofpu/longjmp.sub +++ /dev/null @@ -1 +0,0 @@ -longjmp.s diff --git a/src/setjmp/sh-nofpu/setjmp.s b/src/setjmp/sh-nofpu/setjmp.s deleted file mode 100644 index 41210f92..00000000 --- a/src/setjmp/sh-nofpu/setjmp.s +++ /dev/null @@ -1,24 +0,0 @@ -.global ___setjmp -.hidden ___setjmp -.global __setjmp -.global _setjmp -.global setjmp -.type __setjmp, @function -.type _setjmp, @function -.type setjmp, @function -___setjmp: -__setjmp: -_setjmp: -setjmp: - add #36, r4 - sts.l pr, @-r4 - mov.l r15 @-r4 - mov.l r14, @-r4 - mov.l r13, @-r4 - mov.l r12, @-r4 - mov.l r11, @-r4 - mov.l r10, @-r4 - mov.l r9, @-r4 - mov.l r8, @-r4 - rts - mov #0, r0 diff --git a/src/setjmp/sh-nofpu/setjmp.sub b/src/setjmp/sh-nofpu/setjmp.sub deleted file mode 100644 index b7ad2210..00000000 --- a/src/setjmp/sh-nofpu/setjmp.sub +++ /dev/null @@ -1 +0,0 @@ -setjmp.s diff --git a/src/setjmp/sh/longjmp.S b/src/setjmp/sh/longjmp.S new file mode 100644 index 00000000..08f668b8 --- /dev/null +++ b/src/setjmp/sh/longjmp.S @@ -0,0 +1,28 @@ +.global _longjmp +.global longjmp +.type _longjmp, @function +.type longjmp, @function +_longjmp: +longjmp: + mov.l @r4+, r8 + mov.l @r4+, r9 + mov.l @r4+, r10 + mov.l @r4+, r11 + mov.l @r4+, r12 + mov.l @r4+, r13 + mov.l @r4+, r14 + mov.l @r4+, r15 + lds.l @r4+, pr +#if __SH_FPU_ANY__ || __SH4__ + fmov.s @r4+, fr12 + fmov.s @r4+, fr13 + fmov.s @r4+, fr14 + fmov.s @r4+, fr15 +#endif + + tst r5, r5 + movt r0 + add r5, r0 + + rts + nop diff --git a/src/setjmp/sh/longjmp.s b/src/setjmp/sh/longjmp.s deleted file mode 100644 index e9aa4e50..00000000 --- a/src/setjmp/sh/longjmp.s +++ /dev/null @@ -1,26 +0,0 @@ -.global _longjmp -.global longjmp -.type _longjmp, @function -.type longjmp, @function -_longjmp: -longjmp: - mov.l @r4+, r8 - mov.l @r4+, r9 - mov.l @r4+, r10 - mov.l @r4+, r11 - mov.l @r4+, r12 - mov.l @r4+, r13 - mov.l @r4+, r14 - mov.l @r4+, r15 - lds.l @r4+, pr - fmov.s @r4+, fr12 - fmov.s @r4+, fr13 - fmov.s @r4+, fr14 - fmov.s @r4+, fr15 - - tst r5, r5 - movt r0 - add r5, r0 - - rts - nop diff --git a/src/setjmp/sh/setjmp.S b/src/setjmp/sh/setjmp.S new file mode 100644 index 00000000..d476e639 --- /dev/null +++ b/src/setjmp/sh/setjmp.S @@ -0,0 +1,32 @@ +.global ___setjmp +.hidden ___setjmp +.global __setjmp +.global _setjmp +.global setjmp +.type __setjmp, @function +.type _setjmp, @function +.type setjmp, @function +___setjmp: +__setjmp: +_setjmp: +setjmp: +#if __SH_FPU_ANY__ || __SH4__ + add #52, r4 + fmov.s fr15, @-r4 + fmov.s fr14, @-r4 + fmov.s fr13, @-r4 + fmov.s fr12, @-r4 +#else + add #36, r4 +#endif + sts.l pr, @-r4 + mov.l r15, @-r4 + mov.l r14, @-r4 + mov.l r13, @-r4 + mov.l r12, @-r4 + mov.l r11, @-r4 + mov.l r10, @-r4 + mov.l r9, @-r4 + mov.l r8, @-r4 + rts + mov #0, r0 diff --git a/src/setjmp/sh/setjmp.s b/src/setjmp/sh/setjmp.s deleted file mode 100644 index ffde8687..00000000 --- a/src/setjmp/sh/setjmp.s +++ /dev/null @@ -1,28 +0,0 @@ -.global ___setjmp -.hidden ___setjmp -.global __setjmp -.global _setjmp -.global setjmp -.type __setjmp, @function -.type _setjmp, @function -.type setjmp, @function -___setjmp: -__setjmp: -_setjmp: -setjmp: - add #52, r4 - fmov.s fr15, @-r4 - fmov.s fr14, @-r4 - fmov.s fr13, @-r4 - fmov.s fr12, @-r4 - sts.l pr, @-r4 - mov.l r15, @-r4 - mov.l r14, @-r4 - mov.l r13, @-r4 - mov.l r12, @-r4 - mov.l r11, @-r4 - mov.l r10, @-r4 - mov.l r9, @-r4 - mov.l r8, @-r4 - rts - mov #0, r0 diff --git a/src/setjmp/sheb-nofpu-fdpic/longjmp.sub b/src/setjmp/sheb-nofpu-fdpic/longjmp.sub deleted file mode 100644 index 62fcd2b1..00000000 --- a/src/setjmp/sheb-nofpu-fdpic/longjmp.sub +++ /dev/null @@ -1 +0,0 @@ -../sh-nofpu/longjmp.s diff --git a/src/setjmp/sheb-nofpu-fdpic/setjmp.sub b/src/setjmp/sheb-nofpu-fdpic/setjmp.sub deleted file mode 100644 index a5bb294c..00000000 --- a/src/setjmp/sheb-nofpu-fdpic/setjmp.sub +++ /dev/null @@ -1 +0,0 @@ -../sh-nofpu/setjmp.s diff --git a/src/setjmp/sheb-nofpu/longjmp.sub b/src/setjmp/sheb-nofpu/longjmp.sub deleted file mode 100644 index 62fcd2b1..00000000 --- a/src/setjmp/sheb-nofpu/longjmp.sub +++ /dev/null @@ -1 +0,0 @@ -../sh-nofpu/longjmp.s diff --git a/src/setjmp/sheb-nofpu/setjmp.sub b/src/setjmp/sheb-nofpu/setjmp.sub deleted file mode 100644 index a5bb294c..00000000 --- a/src/setjmp/sheb-nofpu/setjmp.sub +++ /dev/null @@ -1 +0,0 @@ -../sh-nofpu/setjmp.s