arch-gcn3: Explicitly sign-extend simm16
authorKyle Roarty <kyleroarty1716@gmail.com>
Fri, 13 Nov 2020 23:51:45 +0000 (17:51 -0600)
committerKyle Roarty <kyleroarty1716@gmail.com>
Tue, 17 Nov 2020 17:08:24 +0000 (17:08 +0000)
commit9e1f5434078a656f8e68e594b38e805a200dc0a2
tree4002cbee1ab1dc28f9cb4aa62ab5fd52ab2806be
parenta107f62b41e37c421344e3c88ebf32be7d6020e9
arch-gcn3: Explicitly sign-extend simm16

In some instructions, simm16 needs to be sign extended. Previous code
simply casted the simm16 to a 32-bit or 64-bit datatype, however this
didn't actually sign-extend the value.

This patch explicitly calls sext<16> on simm16 whenever it's supposed
to be sign-extended.

Change-Id: I32f02e51fbab220d1a73dc7e68c7410937db21c7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37495
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/gcn3/insts/instructions.cc