diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2020-10-22 12:08:34 +0800 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-11-24 19:36:40 -0500 |
commit | 993b35813f44647314b55f4792493521436d907f (patch) | |
tree | 7be3d0b42903c963e234007764510cba35991998 /rts | |
parent | 6815603f271484766425ff2e37043b78da2d073c (diff) | |
download | haskell-993b35813f44647314b55f4792493521436d907f.tar.gz |
[Sized Cmm] properly retain sizes.wip/angerman/sized
This replaces all Word<N> = W<N># Word# and Int<N> = I<N># Int# with
Word<N> = W<N># Word<N># and Int<N> = I<N># Int<N>#, thus providing us
with properly sized primitives in the codegenerator instead of pretending
they are all full machine words.
This came up when implementing darwinpcs for arm64. The darwinpcs reqires
us to pack function argugments in excess of registers on the stack. While
most procedure call standards (pcs) assume arguments are just passed in
8 byte slots; and thus the caller does not know the exact signature to make
the call, darwinpcs requires us to adhere to the prototype, and thus have
the correct sizes. If we specify CInt in the FFI call, it should correspond
to the C int, and not just be Word sized, when it's only half the size.
This does change the expected output of T16402 but the new result is no
less correct as it eliminates the narrowing (instead of the `and` as was
previously done).
Bumps the array, bytestring, text, and binary submodules.
Co-Authored-By: Ben Gamari <ben@well-typed.com>
Metric Increase:
T13701
T14697
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Libdw.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/Libdw.c b/rts/Libdw.c index 9619479313..25399a00fe 100644 --- a/rts/Libdw.c +++ b/rts/Libdw.c @@ -133,6 +133,11 @@ int libdwLookupLocation(LibdwSession *session, Location *frame, Dwfl_Module *mod = dwfl_addrmodule(session->dwfl, addr); if (mod == NULL) return 1; + // avoid unaligned pointer value + // Using &frame->object_file as argument to dwfl_module_info leads to + // + // error: taking address of packed member of ‘struct Location_’ may result in an unaligned pointer value [-Werror=address-of-packed-member] + // void *object_file = &frame->object_file; dwfl_module_info(mod, NULL, NULL, NULL, NULL, NULL, object_file, NULL); |