sim: sh: fix conversion of PC to an integer
authorMike Frysinger <vapier@gentoo.org>
Sun, 7 Nov 2021 01:09:08 +0000 (21:09 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 7 Nov 2021 01:09:08 +0000 (21:09 -0400)
commit81817dacd6dd6f8204518ad50e0c8b534d6a4366
treef847d7f68ba634a2d66a9ab948f9ae8e8d384855
parenta11cd3ddb2af90da3e5af9917a3cf1c749479983
sim: sh: fix conversion of PC to an integer

On LLP64 targets where sizeof(long) != sizeof(void*), this code fails:
sim/sh/interp.c:704:24: error: cast from pointer to integer of different size  -Werror=pointer-to-int-cast]
  704 |   do { memstalls += ((((long) PC & 3) != 0) ? (n) : ((n) - 1)); } while (0)
      |                        ^

Since this code simply needs to check alignment, cast it using uintptr_t
which is the right type for this.
sim/sh/interp.c