about summary refs log tree commit diff
path: root/src/setjmp
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-01-20 01:44:06 +0000
committerRich Felker <dalias@aerifal.cx>2016-01-20 01:45:44 +0000
commit4b9a08f29303661e9680fc1ee1569daa25df7d50 (patch)
tree13d9b55f34c7cc76235fb4544c8b27e27d7d5ed7 /src/setjmp
parent56764601af17aa6fb8b70b714c6bd8bb1d9f4229 (diff)
downloadmusl-4b9a08f29303661e9680fc1ee1569daa25df7d50.tar.gz
musl-4b9a08f29303661e9680fc1ee1569daa25df7d50.tar.xz
musl-4b9a08f29303661e9680fc1ee1569daa25df7d50.zip
switch sh and mips setjmp asm from .sub system to .S files
Diffstat (limited to 'src/setjmp')
-rw-r--r--src/setjmp/mips-sf/longjmp.s25
-rw-r--r--src/setjmp/mips-sf/longjmp.sub1
-rw-r--r--src/setjmp/mips-sf/setjmp.s25
-rw-r--r--src/setjmp/mips-sf/setjmp.sub1
-rw-r--r--src/setjmp/mips/longjmp.S (renamed from src/setjmp/mips/longjmp.s)5
-rw-r--r--src/setjmp/mips/setjmp.S (renamed from src/setjmp/mips/setjmp.s)2
-rw-r--r--src/setjmp/mipsel-sf/longjmp.sub1
-rw-r--r--src/setjmp/mipsel-sf/setjmp.sub1
-rw-r--r--src/setjmp/sh-nofpu-fdpic/longjmp.sub1
-rw-r--r--src/setjmp/sh-nofpu-fdpic/setjmp.sub1
-rw-r--r--src/setjmp/sh-nofpu/longjmp.s22
-rw-r--r--src/setjmp/sh-nofpu/longjmp.sub1
-rw-r--r--src/setjmp/sh-nofpu/setjmp.s24
-rw-r--r--src/setjmp/sh-nofpu/setjmp.sub1
-rw-r--r--src/setjmp/sh/longjmp.S (renamed from src/setjmp/sh/longjmp.s)2
-rw-r--r--src/setjmp/sh/setjmp.S (renamed from src/setjmp/sh/setjmp.s)4
-rw-r--r--src/setjmp/sheb-nofpu-fdpic/longjmp.sub1
-rw-r--r--src/setjmp/sheb-nofpu-fdpic/setjmp.sub1
-rw-r--r--src/setjmp/sheb-nofpu/longjmp.sub1
-rw-r--r--src/setjmp/sheb-nofpu/setjmp.sub1
20 files changed, 12 insertions, 109 deletions
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
index a972d677..fdb6c95d 100644
--- a/src/setjmp/mips/longjmp.s
+++ b/src/setjmp/mips/longjmp.S
@@ -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)
diff --git a/src/setjmp/mips/setjmp.s b/src/setjmp/mips/setjmp.S
index 53d702a9..501d5264 100644
--- a/src/setjmp/mips/setjmp.s
+++ b/src/setjmp/mips/setjmp.S
@@ -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
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
index e9aa4e50..08f668b8 100644
--- a/src/setjmp/sh/longjmp.s
+++ b/src/setjmp/sh/longjmp.S
@@ -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
diff --git a/src/setjmp/sh/setjmp.s b/src/setjmp/sh/setjmp.S
index ffde8687..d476e639 100644
--- a/src/setjmp/sh/setjmp.s
+++ b/src/setjmp/sh/setjmp.S
@@ -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
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