Flesh out what I hope is all we need for the cris port

diff --git a/include/arch/cris/klibc/archsetjmp.h b/include/arch/cris/klibc/archsetjmp.h
new file mode 100644
index 0000000..8d20800
--- /dev/null
+++ b/include/arch/cris/klibc/archsetjmp.h
@@ -0,0 +1,24 @@
+/*
+ * arch/cris/include/klibc/archsetjmp.h
+ */
+
+#ifndef _KLIBC_ARCHSETJMP_H
+#define _KLIBC_ARCHSETJMP_H
+
+struct __jmp_buf {
+  unsigned long __r0;
+  unsigned long __r1;
+  unsigned long __r2;
+  unsigned long __r3;
+  unsigned long __r4;
+  unsigned long __r5;
+  unsigned long __r6;
+  unsigned long __r7;
+  unsigned long __r8;
+  unsigned long __sp;
+  unsigned long __srp;
+};
+
+typedef struct __jmp_buf jmp_buf[1];
+
+#endif /* _KLIBC_ARCHSETJMP_H */
diff --git a/klibc/arch/cris/crt0.S b/klibc/arch/cris/crt0.S
new file mode 100644
index 0000000..34fe875
--- /dev/null
+++ b/klibc/arch/cris/crt0.S
@@ -0,0 +1,29 @@
+#
+# arch/cris/crt0.S
+#
+# Does arch-specific initialization and invokes __libc_init
+# with the appropriate arguments.
+#
+# See __static_init.c or __shared_init.c for the expected
+# arguments.
+#
+
+	.set noreorder
+		
+	.text
+	.balign 4
+	.type	_start,@function
+	.globl	_start
+_start:
+	# Set up a dummy stack frame to keep gcc from getting confused
+	push	$p8		# p8 == 0
+	push	$p8		# p8 == 0
+	
+	# Save the address of the ELF argument array
+	move.d	$sp,$r10	# Address of ELF arguments
+
+	jump	__libc_init
+	  moveq.d	0,$r11	# atexit() function [assume null]
+
+	.size _start, .-_start
+
diff --git a/klibc/arch/cris/include/klibc/archsetjmp.h b/klibc/arch/cris/include/klibc/archsetjmp.h
new file mode 100644
index 0000000..8d20800
--- /dev/null
+++ b/klibc/arch/cris/include/klibc/archsetjmp.h
@@ -0,0 +1,24 @@
+/*
+ * arch/cris/include/klibc/archsetjmp.h
+ */
+
+#ifndef _KLIBC_ARCHSETJMP_H
+#define _KLIBC_ARCHSETJMP_H
+
+struct __jmp_buf {
+  unsigned long __r0;
+  unsigned long __r1;
+  unsigned long __r2;
+  unsigned long __r3;
+  unsigned long __r4;
+  unsigned long __r5;
+  unsigned long __r6;
+  unsigned long __r7;
+  unsigned long __r8;
+  unsigned long __sp;
+  unsigned long __srp;
+};
+
+typedef struct __jmp_buf jmp_buf[1];
+
+#endif /* _KLIBC_ARCHSETJMP_H */
diff --git a/klibc/arch/cris/setjmp.S b/klibc/arch/cris/setjmp.S
new file mode 100644
index 0000000..8506810
--- /dev/null
+++ b/klibc/arch/cris/setjmp.S
@@ -0,0 +1,38 @@
+#
+# arch/cris/setjmp.S
+#
+# setjmp/longjmp for the cris architecture
+#
+
+#
+# The jmp_buf is assumed to contain the following, in order:
+#	$r8..$r0	(in that order)
+#	$sp	($r14)
+#	return address
+#
+
+	.set noreorder
+	
+	.text
+	.align 4
+	.globl setjmp
+	.type setjmp, @function
+setjmp:
+	movem	$r8,[$r10+]		# Save $r8..$r0 at $r10..
+	move.d	$sp,[$r10+]
+	ret
+	  move	$srp,[$r10+]
+
+	.size setjmp,.-setjmp
+
+	.text
+	.align 4
+	.globl longjmp
+	.type longjmp, @function
+longjmp:
+	movem	[$r10+],$r8		# Load $r8..$r0 from $r10..
+	move.d	[$r10+],$sp
+	jump	[$r10+]
+	  move.d $r11,$r10
+	
+	.size longjmp,.-longjmp
diff --git a/klibc/arch/cris/syscall.S b/klibc/arch/cris/syscall.S
index 0bd8279..12d8ce7 100644
--- a/klibc/arch/cris/syscall.S
+++ b/klibc/arch/cris/syscall.S
@@ -19,7 +19,6 @@
 	move.d	[$sp+4],$mof
 	move.d	[$sp+8],$srp
 	break	13
-	pop	$srp
 
 	cmpq.d	-4096,$r10
 	blt	1f
@@ -27,7 +26,7 @@
 	move.d	$r11,[errno]
 	moveq.d	-1,$r10
 1:
-	ret
+	jump	[sp+]
 	  nop
 
 	.size	__syscall_common,.-__syscall_common