target/lm32: avoid integer overflow in next_page PC check
commit4302303d3c1f6f40b92791702f74d783a51ae60c
authorEmilio G. Cota <cota@braap.org>
Tue, 10 Apr 2018 14:46:58 +0000 (10 10:46 -0400)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 9 May 2018 17:12:21 +0000 (9 10:12 -0700)
tree3353637fb3fefc65c019932ddee2595da32bf9d5
parent3ac5e413c00511d10d69b8b55fc06cc0c54bd45f
target/lm32: avoid integer overflow in next_page PC check

If the PC is in the last page of the address space, next_page_start
overflows to 0. Fix it.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Michael Walle <michael@walle.cc>
Cc: Michael Walle <michael@walle.cc>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/lm32/translate.c