summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldso/include/dl-syscall.h4
-rw-r--r--ldso/ldso/sparc/dl-startup.h1
-rw-r--r--libc/string/sparc/sparc32/sparcv9b/memchr.S2
-rw-r--r--libc/string/sparc/sparc32/sparcv9b/memcpy.S2
-rw-r--r--libc/string/sparc/sparc32/sparcv9b/memset.S2
-rw-r--r--libc/string/sparc/sparc32/sparcv9b/stpcpy.S2
-rw-r--r--libc/string/sparc/sparc32/sparcv9b/strcat.S2
-rw-r--r--libc/string/sparc/sparc32/sparcv9b/strchr.S2
-rw-r--r--libc/string/sparc/sparc32/sparcv9b/strcmp.S2
-rw-r--r--libc/string/sparc/sparc32/sparcv9b/strcpy.S2
-rw-r--r--libc/string/sparc/sparc32/sparcv9b/strlen.S2
-rw-r--r--libc/sysdeps/linux/sparc/Makefile.arch2
-rw-r--r--libc/sysdeps/linux/sparc/__longjmp.S3
-rw-r--r--libc/sysdeps/linux/sparc/_math_inc.h2
-rw-r--r--libc/sysdeps/linux/sparc/bits/setjmp.h2
15 files changed, 20 insertions, 12 deletions
diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
index b42416a52..ec42fbd64 100644
--- a/ldso/include/dl-syscall.h
+++ b/ldso/include/dl-syscall.h
@@ -16,7 +16,11 @@
/* Pull in whatever this particular arch's kernel thinks the kernel version of
* struct stat should look like. It turns out that each arch has a different
* opinion on the subject, and different kernel revs use different names... */
+#if defined(__sparc_v9__) && (__WORDSIZE == 64)
+#define kernel_stat64 stat
+#else
#define kernel_stat stat
+#endif
#include <bits/kernel_stat.h>
#include <bits/kernel_types.h>
diff --git a/ldso/ldso/sparc/dl-startup.h b/ldso/ldso/sparc/dl-startup.h
index 7da972269..4ceb7c55a 100644
--- a/ldso/ldso/sparc/dl-startup.h
+++ b/ldso/ldso/sparc/dl-startup.h
@@ -9,6 +9,7 @@ asm ("\
.global _start\n\
.type _start,%function\n\
.align 32\n\
+ .register %g2, #scratch\n\
_start:\n\
/* Allocate space for functions to drop their arguments. */\n\
sub %sp, 6*4, %sp\n\
diff --git a/libc/string/sparc/sparc32/sparcv9b/memchr.S b/libc/string/sparc/sparc32/sparcv9b/memchr.S
index 7e86a2972..43a16ff11 100644
--- a/libc/string/sparc/sparc32/sparcv9b/memchr.S
+++ b/libc/string/sparc/sparc32/sparcv9b/memchr.S
@@ -1,4 +1,4 @@
#define ASI_PNF 0x82
#define ASI_BLK_P 0xf0
#define XCC icc
-#include "sparc64/memchr.S"
+#include "../../sparc64/memchr.S"
diff --git a/libc/string/sparc/sparc32/sparcv9b/memcpy.S b/libc/string/sparc/sparc32/sparcv9b/memcpy.S
index 7f697542e..2024869dd 100644
--- a/libc/string/sparc/sparc32/sparcv9b/memcpy.S
+++ b/libc/string/sparc/sparc32/sparcv9b/memcpy.S
@@ -1,4 +1,4 @@
#define ASI_PNF 0x82
#define ASI_BLK_P 0xf0
#define XCC icc
-#include "sparc64/sparcv9b/memcpy.S"
+#include "../../sparc64/sparcv9b/memcpy.S"
diff --git a/libc/string/sparc/sparc32/sparcv9b/memset.S b/libc/string/sparc/sparc32/sparcv9b/memset.S
index ac67b7ab7..e49173172 100644
--- a/libc/string/sparc/sparc32/sparcv9b/memset.S
+++ b/libc/string/sparc/sparc32/sparcv9b/memset.S
@@ -1,4 +1,4 @@
#define ASI_PNF 0x82
#define ASI_BLK_P 0xf0
#define XCC icc
-#include <sparc64/memset.S>
+#include "../../sparc64/memset.S"
diff --git a/libc/string/sparc/sparc32/sparcv9b/stpcpy.S b/libc/string/sparc/sparc32/sparcv9b/stpcpy.S
index 440ad7e21..17ffa5e4d 100644
--- a/libc/string/sparc/sparc32/sparcv9b/stpcpy.S
+++ b/libc/string/sparc/sparc32/sparcv9b/stpcpy.S
@@ -1,4 +1,4 @@
#define ASI_PNF 0x82
#define ASI_BLK_P 0xf0
#define XCC icc
-#include <sparc64/stpcpy.S>
+#include "../../sparc64/stpcpy.S"
diff --git a/libc/string/sparc/sparc32/sparcv9b/strcat.S b/libc/string/sparc/sparc32/sparcv9b/strcat.S
index 7a2223570..9ed125a4b 100644
--- a/libc/string/sparc/sparc32/sparcv9b/strcat.S
+++ b/libc/string/sparc/sparc32/sparcv9b/strcat.S
@@ -1,4 +1,4 @@
#define ASI_PNF 0x82
#define ASI_BLK_P 0xf0
#define XCC icc
-#include <sparc64/strcat.S>
+#include "../../sparc64/strcat.S"
diff --git a/libc/string/sparc/sparc32/sparcv9b/strchr.S b/libc/string/sparc/sparc32/sparcv9b/strchr.S
index ddd32120d..6b2727a1f 100644
--- a/libc/string/sparc/sparc32/sparcv9b/strchr.S
+++ b/libc/string/sparc/sparc32/sparcv9b/strchr.S
@@ -1,4 +1,4 @@
#define ASI_PNF 0x82
#define ASI_BLK_P 0xf0
#define XCC icc
-#include <sparc64/strchr.S>
+#include "../../sparc64/strchr.S"
diff --git a/libc/string/sparc/sparc32/sparcv9b/strcmp.S b/libc/string/sparc/sparc32/sparcv9b/strcmp.S
index 5330f4359..854403ffd 100644
--- a/libc/string/sparc/sparc32/sparcv9b/strcmp.S
+++ b/libc/string/sparc/sparc32/sparcv9b/strcmp.S
@@ -1,4 +1,4 @@
#define ASI_PNF 0x82
#define ASI_BLK_P 0xf0
#define XCC icc
-#include <sparc64/strcmp.S>
+#include "../../sparc64/strcmp.S"
diff --git a/libc/string/sparc/sparc32/sparcv9b/strcpy.S b/libc/string/sparc/sparc32/sparcv9b/strcpy.S
index 0b35c9be0..e8102bde4 100644
--- a/libc/string/sparc/sparc32/sparcv9b/strcpy.S
+++ b/libc/string/sparc/sparc32/sparcv9b/strcpy.S
@@ -1,4 +1,4 @@
#define ASI_PNF 0x82
#define ASI_BLK_P 0xf0
#define XCC icc
-#include <sparc64/strcpy.S>
+#include "../../sparc64/strcpy.S"
diff --git a/libc/string/sparc/sparc32/sparcv9b/strlen.S b/libc/string/sparc/sparc32/sparcv9b/strlen.S
index b8f4dba4f..8673333a2 100644
--- a/libc/string/sparc/sparc32/sparcv9b/strlen.S
+++ b/libc/string/sparc/sparc32/sparcv9b/strlen.S
@@ -1,4 +1,4 @@
#define ASI_PNF 0x82
#define ASI_BLK_P 0xf0
#define XCC icc
-#include <sparc64/strlen.S>
+#include "../../sparc64/strlen.S"
diff --git a/libc/sysdeps/linux/sparc/Makefile.arch b/libc/sysdeps/linux/sparc/Makefile.arch
index 1e401fc84..4562eaba5 100644
--- a/libc/sysdeps/linux/sparc/Makefile.arch
+++ b/libc/sysdeps/linux/sparc/Makefile.arch
@@ -5,7 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c __syscall_error.c
+CSRC := brk.c __syscall_error.c qp_ops.c
SSRC := \
__longjmp.S fork.S vfork.S clone.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
diff --git a/libc/sysdeps/linux/sparc/__longjmp.S b/libc/sysdeps/linux/sparc/__longjmp.S
index fa60264ef..c7d4f0794 100644
--- a/libc/sysdeps/linux/sparc/__longjmp.S
+++ b/libc/sysdeps/linux/sparc/__longjmp.S
@@ -30,7 +30,8 @@
.type __longjmp,%function
.align 4
__longjmp:
-
+ .register %g2, #scratch
+ .register %g3, #scratch
/* Store our arguments in global registers so we can still
* use them while unwinding frames and their register windows. */
diff --git a/libc/sysdeps/linux/sparc/_math_inc.h b/libc/sysdeps/linux/sparc/_math_inc.h
index f08aa5869..1bf84f04e 100644
--- a/libc/sysdeps/linux/sparc/_math_inc.h
+++ b/libc/sysdeps/linux/sparc/_math_inc.h
@@ -7,7 +7,9 @@
#include <bits/wordsize.h>
#define __ASSEMBLY__
+#ifndef __sparc_v9__
#include <asm/traps.h>
+#endif
/* Is alignment really needed? */
diff --git a/libc/sysdeps/linux/sparc/bits/setjmp.h b/libc/sysdeps/linux/sparc/bits/setjmp.h
index dac9ac5cb..ac5a4b2d6 100644
--- a/libc/sysdeps/linux/sparc/bits/setjmp.h
+++ b/libc/sysdeps/linux/sparc/bits/setjmp.h
@@ -25,7 +25,7 @@
#include <bits/wordsize.h>
-#if __WORDSIZE == 64
+#if 0 /*__WORDSIZE == 64*/
#ifndef _ASM
typedef struct __sparc64_jmp_buf