target/tilegx: avoid integer overflow in next_page PC check
commit5c433a7aac1a34c199ed5a7a07f4f71349562a8f
authorEmilio G. Cota <cota@braap.org>
Tue, 10 Apr 2018 14:47:41 +0000 (10 10:47 -0400)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 9 May 2018 17:12:21 +0000 (9 10:12 -0700)
tree55a728503dbf3cd555a9d54ef560736d2d387782
parent818c187781a0e9dcfd0cbaffd90c9485f2edcccd
target/tilegx: 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>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/tilegx/translate.c