accel/tcg: Don't use TARGET_LONG_BITS in decode_sleb128
When we changed decode_sleb128 from target_long to int64_t, we failed to adjust the shift limit. Cc: qemu-stable@nongnu.org Fixes:c9ad8d27ca("tcg: Widen gen_insn_data to uint64_t") Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> (cherry picked from commit9401f91b9b) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
8a9a719314
commit
86b846f902
1 changed files with 1 additions and 1 deletions
|
|
@ -106,7 +106,7 @@ static int64_t decode_sleb128(const uint8_t **pp)
|
|||
val |= (int64_t)(byte & 0x7f) << shift;
|
||||
shift += 7;
|
||||
} while (byte & 0x80);
|
||||
if (shift < TARGET_LONG_BITS && (byte & 0x40)) {
|
||||
if (shift < 64 && (byte & 0x40)) {
|
||||
val |= -(int64_t)1 << shift;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue