Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/23192 )
Change subject: sim: Use the Guest ABI mechanism in writeFunc.
......................................................................
sim: Use the Guest ABI mechanism in writeFunc.
This change only modifies the writeFunc since it's easy to test using
the hello world test programs.
Jira Issue: https://gem5.atlassian.net/browse/GEM5-187
Change-Id: Ia4a7bacdb9938d9fbe4093fc6958904d6c423360
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23192
Reviewed-by: Gabe Black <gabebl...@google.com>
Maintainer: Gabe Black <gabebl...@google.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/sim/syscall_emul.hh
1 file changed, 2 insertions(+), 5 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 6202039..a0c3cf5 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -2645,13 +2645,10 @@
template <class OS>
SyscallReturn
-writeFunc(SyscallDesc *desc, int num, ThreadContext *tc)
+writeFunc(SyscallDesc *desc, int num, ThreadContext *tc,
+ int tgt_fd, Addr buf_ptr, int nbytes)
{
- int index = 0;
auto p = tc->getProcessPtr();
- int tgt_fd = p->getSyscallArg(tc, index);
- Addr buf_ptr = p->getSyscallArg(tc, index);
- int nbytes = p->getSyscallArg(tc, index);
auto hbfdp = std::dynamic_pointer_cast<HBFDEntry>((*p->fds)[tgt_fd]);
if (!hbfdp)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/23192
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: Ia4a7bacdb9938d9fbe4093fc6958904d6c423360
Gerrit-Change-Number: 23192
Gerrit-PatchSet: 13
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Brandon Potter <brandon.pot...@amd.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev