ARM: Handle register indexed system calls.
This commit is contained in:
parent
0a18bc0d6c
commit
99831ed938
|
@ -422,7 +422,10 @@ format DataOp {
|
|||
// ARM System Call (SoftWare Interrupt)
|
||||
1: swi({{ if (testPredicate(Cpsr, condCode))
|
||||
{
|
||||
xc->syscall(IMMED_23_0);
|
||||
if (IMMED_23_0)
|
||||
xc->syscall(IMMED_23_0);
|
||||
else
|
||||
xc->syscall(R7);
|
||||
}
|
||||
}});
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ def operands {{
|
|||
'Rm': ('IntReg', 'uw', 'RM', 'IsInteger', 2, maybePCRead, maybePCWrite),
|
||||
'Rs': ('IntReg', 'uw', 'RS', 'IsInteger', 3, maybePCRead, maybePCWrite),
|
||||
'Rn': ('IntReg', 'uw', 'RN', 'IsInteger', 4, maybePCRead, maybePCWrite),
|
||||
'R7': ('IntReg', 'uw', '7', 'IsInteger', 5),
|
||||
|
||||
#Destination register for load/store double instructions
|
||||
'Rdo': ('IntReg', 'uw', '(RD & ~1)', 'IsInteger', 4, maybePCRead, maybePCWrite),
|
||||
|
|
|
@ -448,7 +448,8 @@ ArmLinuxProcess::getDesc(int callnum)
|
|||
// Angel SWI syscalls are unsupported in this release
|
||||
if (callnum == 0x123456) {
|
||||
panic("Attempt to execute an ANGEL_SWI system call (newlib-related)");
|
||||
} else if ((callnum & 0x00f00000) == 0x00900000) {
|
||||
} else if ((callnum & 0x00f00000) == 0x00900000 ||
|
||||
(callnum & 0xf0000) == 0xf0000) {
|
||||
callnum &= 0x000fffff;
|
||||
if ((callnum & 0x0f0000) == 0xf0000) {
|
||||
callnum -= 0x0f0001;
|
||||
|
|
Loading…
Reference in a new issue