Subject: re: Linux/Mips syscall shift
To: Emmanuel Dreyfus <manu@netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: tech-kern
Date: 09/16/2001 02:00:41
Linux/Mips emulation is progressing quickly. To fix the system call
shift, I added a -4000 offset in sys/arch/mips/mips/linux_syscall.c, but
it would be nice to have a nicer implementation: I have to completely
duplicate sys/arch/mips/mips/syscall.c just to have a -4000 on two
lines.
Adding a new field to struct emul would a cleaner way of dealing with
this. Something like e_sysshift which would be zero for everyone, and
4000 for Linux/Mips.
couldn't you:
- have a runtime test in mips/syscall.c ?
- or, have mips/linux_syscall.c #include mips/syscall.c, but
#define some magic first? kinda like kern/exec_elf64.c?