sim: Generalize the GuestABI Result::allocate() mechanism.
authorGabe Black <gabeblack@google.com>
Sat, 21 Dec 2019 05:04:19 +0000 (21:04 -0800)
committerGabe Black <gabeblack@google.com>
Thu, 12 Mar 2020 07:21:13 +0000 (07:21 +0000)
commit61f3b66214378d6abda970fba7a9aadf8e925843
tree09aaddcd4cd01631aa8c7af3a64fa1d0ae7c7b5d
parent978782f23cc12ee17fca76cc18cdc1544ad67df8
sim: Generalize the GuestABI Result::allocate() mechanism.

This change generalizes the GuestABI Result template family's
allocate() mechanism so that it can also be used with arguments. This
is useful in cases like the 32 bit ARM ISA which says that variadic
functions treat their floating point arguments differently than
non-variadic functions do. This mechanism will give the ABI a chance
to detect that the function is variadic (by checking for VarArgs) and
then to behave differently in that case.

This also makes the GuestABI mechanism a little more regular by
supporting allocate() on both arguments and return values instead of
just return values.

Change-Id: I67050a0ad7ccf15ee75b800dca4eae4fdc0e564e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24103
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabeblack@google.com>
src/sim/guest_abi.hh
src/sim/guest_abi.test.cc