target/unicore32: avoid integer overflow in next_page PC check
commit818c187781a0e9dcfd0cbaffd90c9485f2edcccd
authorEmilio G. Cota <cota@braap.org>
Tue, 10 Apr 2018 14:47:28 +0000 (10 10:47 -0400)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 9 May 2018 17:12:21 +0000 (9 10:12 -0700)
tree588ff81000fe5e06ee0156cabb4ba88bcb0eb394
parent4e8b44b6c2350e02ca8e410d40022122b4038bd5
target/unicore32: 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: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/unicore32/translate.c