aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-08-09 23:05:27 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-08-09 23:05:27 +0000
commit95fda95ff69d945f6713bc55cd74f82d23950e61 (patch)
treecb7e6af053318be14d9f72853f0903ab3f9b64fb
parent0ee6a26999b7ab605af0eff17facd0a3153ce26e (diff)
downloadklibc-95fda95ff69d945f6713bc55cd74f82d23950e61.tar.gz
At least *try* to support a few more architectures...klibc-0.4
-rw-r--r--crt0.c11
-rw-r--r--klibc/crt0.c11
2 files changed, 22 insertions, 0 deletions
diff --git a/crt0.c b/crt0.c
index 586a130b241bd..ae5c817d11f2e 100644
--- a/crt0.c
+++ b/crt0.c
@@ -36,6 +36,17 @@ void _start(void)
uintptr_t *params = sp+16; /* SPARC needs a window save area */
#elif defined(__mips__) || defined(__mips64__)
register uintptr_t *params asm("$sp");
+#elif defined(__powerpc__)
+ register uintptr_t *params asm("r9");
+#elif defined(__hppa__)
+# define STACK_GROWS_UP
+ register uintptr_t *params asm("%r25");
+#elif defined(__s390__)
+ register uintptr_t *params asm("%r15");
+#elif defined(__alpha__)
+ register uintptr_t *params asm("$sp");
+#elif defined(__arm__)
+ register uintptr_t *params asm("sp");
#else
#error "Need crt0.c port for this architecture!"
#endif
diff --git a/klibc/crt0.c b/klibc/crt0.c
index 586a130b241bd..ae5c817d11f2e 100644
--- a/klibc/crt0.c
+++ b/klibc/crt0.c
@@ -36,6 +36,17 @@ void _start(void)
uintptr_t *params = sp+16; /* SPARC needs a window save area */
#elif defined(__mips__) || defined(__mips64__)
register uintptr_t *params asm("$sp");
+#elif defined(__powerpc__)
+ register uintptr_t *params asm("r9");
+#elif defined(__hppa__)
+# define STACK_GROWS_UP
+ register uintptr_t *params asm("%r25");
+#elif defined(__s390__)
+ register uintptr_t *params asm("%r15");
+#elif defined(__alpha__)
+ register uintptr_t *params asm("$sp");
+#elif defined(__arm__)
+ register uintptr_t *params asm("sp");
#else
#error "Need crt0.c port for this architecture!"
#endif