Subject: Re: m88k system call convention
To: Toru Nishimura <email@example.com>
From: Jason Thorpe <firstname.lastname@example.org>
Date: 02/08/2000 09:49:32
On Tue, 8 Feb 2000 14:48:26 +0900 (JST)
email@example.com (Toru Nishimura) wrote:
> I'm running research about NetBSD port on OMRON luna88k. I looked
> through library codes of LUNA Mach2.5 and OpenBSD/m88k, and found that
> they use different calling convention for system call. My Q is which
> way should I use for NetBSD/m88k?
> - LUNA Mach2.5
> issue "tb0 0,r0,128" after storing the system call number in r9.
> - OpenBSD/m88k
> issue "tb0 0,r0,128" after storing the first 3 argments in r10,r11,r12,
> and system call number in r13.
I guess the question boils down to: what is the normal function calling
convention for the m88k?
If it's pass-args-on-stack, I think the Mach syscall method makes more
sense... if it's pass-args-in-regs-then-on-stack, the OpenBSD method
makes more sense.
Take a look at alpha/alpha/trap.c:syscall() ... this is probably how
the OpenBSD/m88k method works, too.
-- Jason R. Thorpe <firstname.lastname@example.org>