• Erik de Castro Lopo's avatar
    Linker: Fix type in m32_free_internal · 8ddf4174
    Erik de Castro Lopo authored
    The code:
        uint64_t c = __sync_sub_and_fetch((uint64_t*)addr, 1);
    was causing GCC to emit atomic instructions for 64 bit values which
    are not available on PowerPC. However, since PowerPC only has a 32
    bit address space, use of a 64 bit value is superflous.
    Switching the type from `uint64_t` to `uintptr_t` should simply do
    the correct thing on all 32 and 64 bit architectures.
    Reviewers: austin, bgamari, simonmar
    Subscribers: thomie
    Differential Revision: https://phabricator.haskell.org/D1399
    GHC Trac Issues: #11036
Linker.c 217 KB