Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/23454 )
Change subject: sim: Convert ftruncate64 to GuestABI.
......................................................................
sim: Convert ftruncate64 to GuestABI.
This function was specifying a particular width to getSyscallArg. The
new ISA specific ABIs now handle that automatically.
Change-Id: I141655d3bcb78f56c2a9278d140dfbc0d69e1ff4
---
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index a75fa6e..53928ff 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -616,12 +616,10 @@
}
SyscallReturn
-ftruncate64Func(SyscallDesc *desc, int num, ThreadContext *tc)
+ftruncate64Func(SyscallDesc *desc, int num, ThreadContext *tc,
+ int tgt_fd, int64_t length)
{
- int index = 0;
auto p = tc->getProcessPtr();
- int tgt_fd = p->getSyscallArg(tc, index);
- int64_t length = p->getSyscallArg(tc, index, 64);
auto ffdp = std::dynamic_pointer_cast<FileFDEntry>((*p->fds)[tgt_fd]);
if (!ffdp)
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index db31ca5..5537817 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -238,8 +238,8 @@
Addr pathname, int64_t length);
/// Target ftruncate64() handler.
-SyscallReturn ftruncate64Func(SyscallDesc *desc, int num, ThreadContext
*tc);
-
+SyscallReturn ftruncate64Func(SyscallDesc *desc, int num, ThreadContext
*tc,
+ int tgt_fd, int64_t length);
/// Target umask() handler.
SyscallReturn umaskFunc(SyscallDesc *desc, int num, ThreadContext *tc);
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/23454
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I141655d3bcb78f56c2a9278d140dfbc0d69e1ff4
Gerrit-Change-Number: 23454
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev