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)
24 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 [new file with mode: 0644]
src/setjmp/mips/longjmp.s [deleted file]
src/setjmp/mips/setjmp.S [new file with mode: 0644]
src/setjmp/mips/setjmp.s [deleted file]
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 [new file with mode: 0644]
src/setjmp/sh/longjmp.s [deleted file]
src/setjmp/sh/setjmp.S [new file with mode: 0644]
src/setjmp/sh/setjmp.s [deleted file]
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
diff --git a/src/setjmp/mips/longjmp.S b/src/setjmp/mips/longjmp.S
new file mode 100644 (file)
index 0000000..fdb6c95
--- /dev/null
@@ -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 (file)
index a972d67..0000000
+++ /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 (file)
index 0000000..501d526
--- /dev/null
@@ -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 (file)
index 53d702a..0000000
+++ /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 (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
diff --git a/src/setjmp/sh/longjmp.S b/src/setjmp/sh/longjmp.S
new file mode 100644 (file)
index 0000000..08f668b
--- /dev/null
@@ -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 (file)
index e9aa4e5..0000000
+++ /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 (file)
index 0000000..d476e63
--- /dev/null
@@ -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 (file)
index ffde868..0000000
+++ /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 (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