sim: Make it possible for a GuestABI to init its Position based on a TC.
authorGabe Black <gabeblack@google.com>
Tue, 17 Dec 2019 05:28:40 +0000 (21:28 -0800)
committerGabe Black <gabeblack@google.com>
Thu, 6 Feb 2020 04:47:03 +0000 (04:47 +0000)
commit24be0cc1ce4422dc457648fcb17fa2d609b39752
treee2b3f4faea5fecad79cf330666f840e415693a10
parent992454e0f2df37a296ad8e173d613977b84e8703
sim: Make it possible for a GuestABI to init its Position based on a TC.

It may be necessary to initialize the GuestABI Position type based on
the current state of the thread, for instance by reading the current
stack pointer.

This change makes it possible (but not mandantory) for an ABI to supply
a constructor for Position which accepts a ThreadContext * which it can
use to intiialize itself.

Change-Id: I5609b185f746368c5f9eb2a04074dcafa088f925
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23749
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/sim/guest_abi.hh
src/sim/guest_abi.test.cc