target-arm: A64: Avoid signed shifts in disas_ldst_pair()

Avoid shifting potentially negative signed offset values in
disas_ldst_pair() by keeping the offset in a uint64_t rather
than an int64_t.

Backports commit c2ebd862a54b7e12175d65c03ba259926cb2237a from qemu
This commit is contained in:
Peter Maydell 2018-02-12 15:04:46 -05:00 committed by Lioncash
parent 4ea6fdc986
commit 8287ec801e
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -1942,7 +1942,7 @@ static void disas_ldst_pair(DisasContext *s, uint32_t insn)
int rt = extract32(insn, 0, 5);
int rn = extract32(insn, 5, 5);
int rt2 = extract32(insn, 10, 5);
int64_t offset = sextract32(insn, 15, 7);
uint64_t offset = sextract32(insn, 15, 7);
int index = extract32(insn, 23, 2);
bool is_vector = extract32(insn, 26, 1);
bool is_load = extract32(insn, 22, 1);