summaryrefslogtreecommitdiff
path: root/src/arch/power
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/power')
-rw-r--r--src/arch/power/isa/decoder.isa2
-rw-r--r--src/arch/power/isa/operands.isa3
-rw-r--r--src/arch/power/linux/process.cc6
-rw-r--r--src/arch/power/linux/process.hh2
4 files changed, 9 insertions, 4 deletions
diff --git a/src/arch/power/isa/decoder.isa b/src/arch/power/isa/decoder.isa
index 060d6a34d..3f10fe48b 100644
--- a/src/arch/power/isa/decoder.isa
+++ b/src/arch/power/isa/decoder.isa
@@ -517,7 +517,7 @@ decode OPCODE default Unknown::unknown() {
55: stfdu({{ Mem_df = Fs; }});
}
- 17: IntOp::sc({{ xc->syscall(R0, &fault); }},
+ 17: IntOp::sc({{ xc->syscall(&fault); }},
[ IsSyscall, IsNonSpeculative, IsSerializeAfter ]);
format FloatArithOp {
diff --git a/src/arch/power/isa/operands.isa b/src/arch/power/isa/operands.isa
index a72a0714d..117c8ad02 100644
--- a/src/arch/power/isa/operands.isa
+++ b/src/arch/power/isa/operands.isa
@@ -75,7 +75,4 @@ def operands {{
'Rsv': ('IntReg', 'uw', 'INTREG_RSV', 'IsInteger', 9),
'RsvLen': ('IntReg', 'uw', 'INTREG_RSV_LEN', 'IsInteger', 9),
'RsvAddr': ('IntReg', 'uw', 'INTREG_RSV_ADDR', 'IsInteger', 9),
-
- # Hack for non-full-system syscall emulation
- 'R0': ('IntReg', 'uw', '0', None, 1),
}};
diff --git a/src/arch/power/linux/process.cc b/src/arch/power/linux/process.cc
index ac032275e..a63d9a30c 100644
--- a/src/arch/power/linux/process.cc
+++ b/src/arch/power/linux/process.cc
@@ -468,6 +468,12 @@ PowerLinuxProcess::initState()
PowerProcess::initState();
}
+void
+PowerLinuxProcess::syscall(ThreadContext *tc, Fault *fault)
+{
+ doSyscall(tc->readIntReg(0), tc, fault);
+}
+
RegVal
PowerLinuxProcess::getSyscallArg(ThreadContext *tc, int &i)
{
diff --git a/src/arch/power/linux/process.hh b/src/arch/power/linux/process.hh
index 5a2ad92a4..ef96dae5f 100644
--- a/src/arch/power/linux/process.hh
+++ b/src/arch/power/linux/process.hh
@@ -45,6 +45,8 @@ class PowerLinuxProcess : public PowerProcess
void initState();
+ void syscall(ThreadContext *tc, Fault *fault) override;
+
RegVal getSyscallArg(ThreadContext *tc, int &i);
/// Explicitly import the otherwise hidden getSyscallArg
using Process::getSyscallArg;