Certain branch instructions specify that the result of (simm16 * 4) gets sign-extended before being added to the PC. Previously, that result was being sign extended as if it was still a 16-bit number. This patch fixes that by having the result be sign extended as an 18-bit number. Change-Id: Id4d430f8daa71ca7910b570e7e39790626f1decf Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41053 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>