about summary refs log tree commit diff
path: root/arch
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2017-05-31 21:49:44 -0400
committerRich Felker <dalias@aerifal.cx>2017-05-31 21:49:44 -0400
commit1c497005ee58fd237646a49231b73fd3ea79e2d5 (patch)
tree3aa8570af58e63256ac24cf87f88203570e99c3b /arch
parent4073f03add269be8be9f84d374fe69920b78d53d (diff)
downloadmusl-1c497005ee58fd237646a49231b73fd3ea79e2d5.tar.gz
musl-1c497005ee58fd237646a49231b73fd3ea79e2d5.tar.xz
musl-1c497005ee58fd237646a49231b73fd3ea79e2d5.zip
remove long-obsolete clang workarounds from mips* syscall_arch.h files
at one point, clang reportedly failed to support the asm register
constraints needed for inline syscalls. versions of clang that old
have much bigger problems that preclude using them to compile musl
libc.
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/syscall_arch.h41
-rw-r--r--arch/mips64/syscall_arch.h75
-rw-r--r--arch/mipsn32/syscall_arch.h41
3 files changed, 0 insertions, 157 deletions
diff --git a/arch/mips/syscall_arch.h b/arch/mips/syscall_arch.h
index 39c0ea32..3ac4da21 100644
--- a/arch/mips/syscall_arch.h
+++ b/arch/mips/syscall_arch.h
@@ -20,8 +20,6 @@ static inline void __stat_fix(long p)
 }
 #endif
 
-#ifndef __clang__
-
 static inline long __syscall0(long n)
 {
 	register long r7 __asm__("$7");
@@ -105,45 +103,6 @@ static inline long __syscall4(long n, long a, long b, long c, long d)
 	return ret;
 }
 
-#else
-
-static inline long __syscall0(long n)
-{
-	return (__syscall)(n);
-}
-
-static inline long __syscall1(long n, long a)
-{
-	return (__syscall)(n, a);
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	long r2 = (__syscall)(n, a, b);
-	if (r2 > -4096UL) return r2;
-	if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b);
-	return r2;
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	long r2 = (__syscall)(n, a, b, c);
-	if (r2 > -4096UL) return r2;
-	if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b);
-	return r2;
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	long r2 = (__syscall)(n, a, b, c, d);
-	if (r2 > -4096UL) return r2;
-	if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b);
-	if (n == SYS_fstatat) __stat_fix(c);
-	return r2;
-}
-
-#endif
-
 static inline long __syscall5(long n, long a, long b, long c, long d, long e)
 {
 	long r2 = (__syscall)(n, a, b, c, d, e);
diff --git a/arch/mips64/syscall_arch.h b/arch/mips64/syscall_arch.h
index bb73dc3c..5eabdf46 100644
--- a/arch/mips64/syscall_arch.h
+++ b/arch/mips64/syscall_arch.h
@@ -49,8 +49,6 @@ static void __stat_fix(struct kernel_stat *kst, struct stat *st)
 	st->st_blocks = kst->st_blocks;
 }
 
-#ifndef __clang__
-
 static inline long __syscall0(long n)
 {
 	register long r7 __asm__("$7");
@@ -176,79 +174,6 @@ static inline long __syscall4(long n, long a, long b, long c, long d)
 	return ret;
 }
 
-#else
-
-static inline long __syscall0(long n)
-{
-	return (__syscall)(n);
-}
-
-static inline long __syscall1(long n, long a)
-{
-	return (__syscall)(n, a);
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	long r2;
-	long old_b = b;
-	struct kernel_stat kst;
-
-	if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
-		b = (long) &kst;
-
-	r2 = (__syscall)(n, a, b);
-	if (r2 > -4096UL) return r2;
-
-	if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
-		__stat_fix(&kst, (struct stat *)old_b);
-
-	return r2;
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	long r2;
-	long old_b = b;
-	struct kernel_stat kst;
-
-	if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
-		b = (long) &kst;
-
-	r2 = (__syscall)(n, a, b, c);
-	if (r2 > -4096UL) return r2;
-
-	if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
-		__stat_fix(&kst, (struct stat *)old_b);
-
-	return r2;
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	long r2;
-	long old_b = b;
-	long old_c = c;
-	struct kernel_stat kst;
-
-	if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
-		b = (long) &kst;
-	if (n == SYS_newfstatat)
-		c = (long) &kst;
-
-	r2 = (__syscall)(n, a, b, c, d);
-	if (r2 > -4096UL) return r2;
-
-	if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
-		__stat_fix(&kst, (struct stat *)old_b);
-	if (n == SYS_newfstatat)
-		__stat_fix(&kst, (struct stat *)old_c);
-
-	return r2;
-}
-
-#endif
-
 static inline long __syscall5(long n, long a, long b, long c, long d, long e)
 {
 	long r2;
diff --git a/arch/mipsn32/syscall_arch.h b/arch/mipsn32/syscall_arch.h
index 58d2c8bd..37e71a7e 100644
--- a/arch/mipsn32/syscall_arch.h
+++ b/arch/mipsn32/syscall_arch.h
@@ -18,8 +18,6 @@ static inline void __stat_fix(long p)
 }
 #endif
 
-#ifndef __clang__
-
 static inline long __syscall0(long n)
 {
 	register long r7 __asm__("$7");
@@ -103,45 +101,6 @@ static inline long __syscall4(long n, long a, long b, long c, long d)
 	return ret;
 }
 
-#else
-
-static inline long __syscall0(long n)
-{
-	return (__syscall)(n);
-}
-
-static inline long __syscall1(long n, long a)
-{
-	return (__syscall)(n, a);
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	long r2 = (__syscall)(n, a, b);
-	if (r2 > -4096UL) return r2;
-	if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat) __stat_fix(b);
-	return r2;
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	long r2 = (__syscall)(n, a, b, c);
-	if (r2 > -4096UL) return r2;
-	if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat) __stat_fix(b);
-	return r2;
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	long r2 = (__syscall)(n, a, b, c, d);
-	if (r2 > -4096UL) return r2;
-	if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat) __stat_fix(b);
-	if (n == SYS_fstatat) __stat_fix(c);
-	return r2;
-}
-
-#endif
-
 static inline long __syscall5(long n, long a, long b, long c, long d, long e)
 {
 	long r2 = (__syscall)(n, a, b, c, d, e);