Add the syscall number as the second parameter for the trap fault. This could be improved and syscalls could be called from the trap's invoke method.

--HG--
extra : convert_revision : 127a3673a076110fb3605c0fbc93e8d7e9fec84b
This commit is contained in:
Gabe Black 2006-11-03 10:56:47 -05:00
parent e6fed44625
commit ab651344dd

View file

@ -726,7 +726,7 @@ decode OP default Unknown::unknown()
#if FULL_SYSTEM
int lTrapNum = I ? (Rs1 + SW_TRAP) : (Rs1 + Rs2);
DPRINTF(Sparc, "The trap number is %d\n", lTrapNum);
fault = new TrapInstruction(lTrapNum);
fault = new TrapInstruction(lTrapNum, R1);
#else
DPRINTF(Sparc, "The syscall number is %d\n", R1);
xc->syscall(R1);
@ -739,7 +739,7 @@ decode OP default Unknown::unknown()
#if FULL_SYSTEM
int lTrapNum = I ? (Rs1 + SW_TRAP) : (Rs1 + Rs2);
DPRINTF(Sparc, "The trap number is %d\n", lTrapNum);
fault = new TrapInstruction(lTrapNum);
fault = new TrapInstruction(lTrapNum, R1);
#else
DPRINTF(Sparc, "The syscall number is %d\n", R1);
xc->syscall(R1);