target/mips: avoid integer overflow in next_page PC check
commit6cd79443d33e6ba6b4c5b787eb713ca1cec56328
authorEmilio G. Cota <cota@braap.org>
Tue, 10 Apr 2018 15:13:54 +0000 (10 11:13 -0400)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 9 May 2018 17:12:21 +0000 (9 10:12 -0700)
tree469a17801bb5ae04fe4903acaa6f00e5cdeb4e82
parent071bd2b628cedbb640be8ca6c25d1949b2e6fe4a
target/mips: 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>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Yongbok Kim <yongbok.kim@mips.com>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/mips/translate.c