summaryrefslogtreecommitdiff
path: root/src/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/mips')
-rw-r--r--src/arch/mips/isa/decoder.isa2
-rw-r--r--src/arch/mips/isa/operands.isa3
-rw-r--r--src/arch/mips/linux/process.cc9
-rw-r--r--src/arch/mips/linux/process.hh2
4 files changed, 9 insertions, 7 deletions
diff --git a/src/arch/mips/isa/decoder.isa b/src/arch/mips/isa/decoder.isa
index 3406ed5d2..856a34083 100644
--- a/src/arch/mips/isa/decoder.isa
+++ b/src/arch/mips/isa/decoder.isa
@@ -163,7 +163,7 @@ decode OPCODE_HI default Unknown::unknown() {
0x2: movz({{ Rd = (Rt == 0) ? Rs : Rd; }});
0x3: movn({{ Rd = (Rt != 0) ? Rs : Rd; }});
0x4: decode FullSystemInt {
- 0: syscall_se({{ xc->syscall(R2, &fault); }},
+ 0: syscall_se({{ xc->syscall(&fault); }},
IsSerializeAfter, IsNonSpeculative);
default: syscall({{ fault = std::make_shared<SystemCallFault>(); }});
}
diff --git a/src/arch/mips/isa/operands.isa b/src/arch/mips/isa/operands.isa
index 2d44bb30e..f81df73fd 100644
--- a/src/arch/mips/isa/operands.isa
+++ b/src/arch/mips/isa/operands.isa
@@ -51,9 +51,8 @@ def operands {{
#Immediate Value operand
'IntImm': ('IntReg', 'uw', 'INTIMM', 'IsInteger', 3),
- #Operands used for Link or Syscall Insts
+ #Operands used for Link Insts
'R31': ('IntReg', 'uw','31','IsInteger', 4),
- 'R2': ('IntReg', 'uw','2', 'IsInteger', 5),
#Special Integer Reg operands
'LO0': ('IntReg', 'uw','INTREG_LO', 'IsInteger', 6),
diff --git a/src/arch/mips/linux/process.cc b/src/arch/mips/linux/process.cc
index adfbfd3f6..2dc1bcdaf 100644
--- a/src/arch/mips/linux/process.cc
+++ b/src/arch/mips/linux/process.cc
@@ -509,7 +509,8 @@ MipsLinuxProcess::getDesc(int callnum)
return &syscallDescs[m5_sys_idx];
}
-
-
-
-
+void
+MipsLinuxProcess::syscall(ThreadContext *tc, Fault *fault)
+{
+ doSyscall(tc->readIntReg(2), tc, fault);
+}
diff --git a/src/arch/mips/linux/process.hh b/src/arch/mips/linux/process.hh
index cbf0d78ea..7fcb6f014 100644
--- a/src/arch/mips/linux/process.hh
+++ b/src/arch/mips/linux/process.hh
@@ -51,6 +51,8 @@ class MipsLinuxProcess : public MipsProcess
/// ID of the thread group leader for the process
uint64_t __tgid;
+ void syscall(ThreadContext *tc, Fault *fault) override;
+
/// Array of syscall descriptors, indexed by call number.
static SyscallDesc syscallDescs[];
const int Num_Syscall_Descs;