x86: Let the pseudoInst dispatch function handle the return value.
authorGabe Black <gabe.black@gmail.com>
Tue, 1 Dec 2020 23:48:08 +0000 (15:48 -0800)
committerGabe Black <gabe.black@gmail.com>
Wed, 2 Dec 2020 23:02:55 +0000 (23:02 +0000)
When the result is returned to the caller from the pseudoInst dispatch
function, the default behavior is to not store that value using the
guestABI mechanism. In the x86 definition, I accidentally used this
version but then didn't store the result manually. The fix should simply
be to not return the result to the instruction definition and to let the
guestABI mechanism handle everything normally.

Change-Id: Ib69f266ad6314032622e5d8d69e9ff114c62657a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38195
Reviewed-by: Daniel Gerzhoy <daniel.gerzhoy@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/x86/isa/decoder/two_byte_opcodes.isa

index 2236c4f8565331e773c37d54195c884e419726d5..f70e7bd1d659faefc0f51d86536c062915cbf801 100644 (file)
             // instructions.
             //0x04: loadall_or_reset_or_hang();
             0x4: BasicOperate::gem5Op({{
-                uint64_t ret;
                 bool recognized = PseudoInst::pseudoInst<X86PseudoInstABI>(
-                        xc->tcBase(), IMMEDIATE, ret);
+                        xc->tcBase(), IMMEDIATE);
                 if (!recognized)
                     fault = std::make_shared<InvalidOpcode>();
             }}, IsNonSpeculative);