commit | 81817dacd6dd6f8204518ad50e0c8b534d6a4366 | [log] [tgz] |
---|---|---|
author | Mike Frysinger <vapier@gentoo.org> | Sat Nov 06 21:09:08 2021 -0400 |
committer | Mike Frysinger <vapier@gentoo.org> | Sat Nov 06 21:09:08 2021 -0400 |
tree | f847d7f68ba634a2d66a9ab948f9ae8e8d384855 | |
parent | a11cd3ddb2af90da3e5af9917a3cf1c749479983 [diff] |
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.