summaryrefslogtreecommitdiff
path: root/src/sim/guest_abi.test.cc
AgeCommit message (Collapse)Author
2020-01-25sim: Add a GuestABI mechanism to allocate space for a return value.Gabe Black
Some ABIs (including 32 bit ARM, 64 bit x86) allocate their argument registers differently depending on their return value. For instance, if the value needs to be returned in memory because it's too big, the caller could pass a pointer to where the result should be stored when the function returns. This pointer acts like an invisible first argument, offsetting where all the normal arguments actually live. This change adds a mechanism to handle that case. The Result templates can now declare an allocate() static method which is given a ThreadContext *, and a reference to the Position object. It can perform any adjustment it needs to before the normal argument extraction starts. Change-Id: Ibda9095f0e8c9882742d24f5effe309ccb514188 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23747 Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2020-01-13sim: Add a dumpSimcall mechanism to GuestABI.Gabe Black
This dumps a signature for a simcall as if it was going to be invoked, and can be used for debugging. Change-Id: I6262b94ad4186bac8dc5a1469e9bb3b8ae9d34e1 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23460 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
2020-01-13sim: Add a unit test for the GuestABI mechanism.Gabe Black
Jira Issue: https://gem5.atlassian.net/browse/GEM5-187 Change-Id: I76934d94b4c61570a4ca603388012c65280e2b7c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23197 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>