public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [alpha] emulate osf/1 sys_indirect
@ 2001-11-22  0:30 Richard Henderson
  0 siblings, 0 replies; only message in thread
From: Richard Henderson @ 2001-11-22  0:30 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

Noticed that Netscape wanted to use it.


r~



--- arch/alpha/kernel/entry.S.orig	Wed Nov 21 15:59:16 2001
+++ arch/alpha/kernel/entry.S	Wed Nov 21 16:22:09 2001
@@ -488,6 +488,26 @@ entUnaUser:
 .end	entUnaUser
 
 /*
+ * No idea why OSF/1 didn't implement syscall(3) in userland.
+ * Implement this by shifting the registers around, backing up
+ * the pc to the callsys, and returning to usermode.
+ */
+.align 3
+.ent	sys_indirect
+sys_indirect:
+	ldq	$1, SP_OFF+8($30)
+	stq	$16, 0($30)
+	stq	$17, SP_OFF+24($30)
+	stq	$18, SP_OFF+32($30)
+	stq	$19, SP_OFF+40($30)
+	stq	$20, 72($30)
+	stq	$21, 80($30)
+	subq	$1, 4, $1
+	stq	$1, SP_OFF+8($30)
+	br	restore_all
+.end sys_indirect
+
+/*
  * A fork is the same as clone(SIGCHLD, 0);
  */
 .align 3
@@ -765,7 +785,7 @@ sys_rt_sigsuspend:
 	.align 3
 	.globl sys_call_table
 sys_call_table:
-	.quad alpha_ni_syscall			/* 0 */
+	.quad sys_indirect			/* 0 */
 	.quad sys_exit
 	.quad sys_fork
 	.quad sys_read

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-11-22  0:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-22  0:30 [alpha] emulate osf/1 sys_indirect Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox