sim: sh: rework carry checks to not rely on integer overflows
authorMike Frysinger <vapier@gentoo.org>
Fri, 12 Nov 2021 00:30:41 +0000 (19:30 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 13 Nov 2021 05:57:00 +0000 (00:57 -0500)
commitdc5a4621600e650b89deb92c79eaacc73fcc767a
tree751639d6cd55b404a0ec0ccc03411649abfa7eb2
parentb9252d079a28c6da1b42e501217f25e8a6652321
sim: sh: rework carry checks to not rely on integer overflows

In <=gcc-7 versions, -fstrict-overflow is enabled by default, and that
triggers warnings in this code that relies on integer overflows to test
for carries.  Change the logic to test against the limit directly.
sim/sh/gencode.c