summaryrefslogtreecommitdiff
path: root/src/learning_gem5
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-12-10 21:48:26 -0800
committerGabe Black <gabeblack@google.com>2020-01-25 07:47:17 +0000
commit13083a1c9cdd271d0cb4d8d2eb14161f5fe5fd03 (patch)
treee3aa5ba9c3cba5be3036fc3df44926ef41942ef8 /src/learning_gem5
parent377898c4034c72b84b2662ed252fa25079a4ea62 (diff)
downloadgem5-13083a1c9cdd271d0cb4d8d2eb14161f5fe5fd03.tar.xz
sim: Add a GuestABI mechanism to allocate space for a return value.
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>
Diffstat (limited to 'src/learning_gem5')
0 files changed, 0 insertions, 0 deletions