]> granicus.if.org Git - musl/commitdiff
switch sh and mips setjmp asm from .sub system to .S files
authorRich Felker <dalias@aerifal.cx>
Wed, 20 Jan 2016 01:44:06 +0000 (01:44 +0000)
committerRich Felker <dalias@aerifal.cx>
Wed, 20 Jan 2016 01:45:44 +0000 (01:45 +0000)
20 files changed:
src/setjmp/mips-sf/longjmp.s [deleted file]
src/setjmp/mips-sf/longjmp.sub [deleted file]
src/setjmp/mips-sf/setjmp.s [deleted file]
src/setjmp/mips-sf/setjmp.sub [deleted file]
src/setjmp/mips/longjmp.S [moved from src/setjmp/mips/longjmp.s with 92% similarity]
src/setjmp/mips/setjmp.S [moved from src/setjmp/mips/setjmp.s with 95% similarity]
src/setjmp/mipsel-sf/longjmp.sub [deleted file]
src/setjmp/mipsel-sf/setjmp.sub [deleted file]
src/setjmp/sh-nofpu-fdpic/longjmp.sub [deleted file]
src/setjmp/sh-nofpu-fdpic/setjmp.sub [deleted file]
src/setjmp/sh-nofpu/longjmp.s [deleted file]
src/setjmp/sh-nofpu/longjmp.sub [deleted file]
src/setjmp/sh-nofpu/setjmp.s [deleted file]
src/setjmp/sh-nofpu/setjmp.sub [deleted file]
src/setjmp/sh/longjmp.S [moved from src/setjmp/sh/longjmp.s with 91% similarity]
src/setjmp/sh/setjmp.S [moved from src/setjmp/sh/setjmp.s with 89% similarity]
src/setjmp/sheb-nofpu-fdpic/longjmp.sub [deleted file]
src/setjmp/sheb-nofpu-fdpic/setjmp.sub [deleted file]
src/setjmp/sheb-nofpu/longjmp.sub [deleted file]
src/setjmp/sheb-nofpu/setjmp.sub [deleted file]

diff --git a/src/setjmp/mips-sf/longjmp.s b/src/setjmp/mips-sf/longjmp.s
deleted file mode 100644 (file)
index 8e76967..0000000
+++ /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 (file)
index e80331b..0000000
+++ /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 (file)
index 38ed5e0..0000000
+++ /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 (file)
index b7ad221..0000000
+++ /dev/null
@@ -1 +0,0 @@
-setjmp.s
similarity index 92%
rename from src/setjmp/mips/longjmp.s
rename to src/setjmp/mips/longjmp.S
index a972d67788e8c3dd6fe855954e485381b0e2b852..fdb6c95d25609b465b5638d5a63b76a8d03f57c6 100644 (file)
@@ -10,7 +10,9 @@ longjmp:
        bne     $2, $0, 1f
        nop
        addu    $2, $2, 1
-1:     lwc1    $20, 56($4)
+1:
+#ifndef __mips_soft_float
+       lwc1    $20, 56($4)
        lwc1    $21, 60($4)
        lwc1    $22, 64($4)
        lwc1    $23, 68($4)
@@ -22,6 +24,7 @@ longjmp:
        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)
similarity index 95%
rename from src/setjmp/mips/setjmp.s
rename to src/setjmp/mips/setjmp.S
index 53d702a91875606447d0d68aeb308daeb71d06a4..501d5264e6b56d99df70134858ad0359993b8e39 100644 (file)
@@ -21,6 +21,7 @@ setjmp:
        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)
@@ -33,5 +34,6 @@ setjmp:
        swc1    $29, 92($4)
        swc1    $30, 96($4)
        swc1    $31, 100($4)
+#endif
        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 (file)
index 6907202..0000000
+++ /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 (file)
index 9917475..0000000
+++ /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 (file)
index 62fcd2b..0000000
+++ /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 (file)
index a5bb294..0000000
+++ /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 (file)
index cda482c..0000000
+++ /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 (file)
index e80331b..0000000
+++ /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 (file)
index 41210f9..0000000
+++ /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 (file)
index b7ad221..0000000
+++ /dev/null
@@ -1 +0,0 @@
-setjmp.s
similarity index 91%
rename from src/setjmp/sh/longjmp.s
rename to src/setjmp/sh/longjmp.S
index e9aa4e500c236e6ba3b01f618297b6143fa5ff44..08f668b8803528f64e8796f81fd6c5a87de354d0 100644 (file)
@@ -13,10 +13,12 @@ longjmp:
        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
similarity index 89%
rename from src/setjmp/sh/setjmp.s
rename to src/setjmp/sh/setjmp.S
index ffde8687372fa1423d07c421215ab7f5a975667b..d476e6395f57ab02168f2ec8cf28f016c888dd45 100644 (file)
@@ -10,11 +10,15 @@ ___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
diff --git a/src/setjmp/sheb-nofpu-fdpic/longjmp.sub b/src/setjmp/sheb-nofpu-fdpic/longjmp.sub
deleted file mode 100644 (file)
index 62fcd2b..0000000
+++ /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 (file)
index a5bb294..0000000
+++ /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 (file)
index 62fcd2b..0000000
+++ /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 (file)
index a5bb294..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../sh-nofpu/setjmp.s