sim: Fix pseudo instruction parameter loading
authorJason Lowe-Power <jason@lowepower.com>
Tue, 18 Feb 2020 18:51:58 +0000 (10:51 -0800)
committerJason Lowe-Power <jason@lowepower.com>
Thu, 20 Feb 2020 02:15:09 +0000 (02:15 +0000)
commita812d862929bb3b47329a88b97fd756a32cf971d
treee7ff931d37eccf854f0829d0ac6809d0883e3183
parent068ded195c1656b7b5e2b53efc9722ba0bc0d463
sim: Fix pseudo instruction parameter loading

With the new ABI API the position argument of the pseudo inst ABI was
not updated correctly. The position needs to be incremented (at least)
once per argument.

Note: `position++` must be outside of the function call because of a GCC
complaint:
build/X86/sim/pseudo_inst.hh:80:48: error: cannot bind non-const lvalue
reference of type 'int&' to an rvalue of type 'PseudoInstABI::Position
{aka int}'
         return TheISA::getArgument(tc, position++, sizeof(uint64_t),
false);

Issue: https://gem5.atlassian.net/browse/GEM5-351
Change-Id: Idd890a587a565b8ad819f094147a02dc1519e997
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25543
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/sim/pseudo_inst.hh