diff options
author | Simon Marlow <simonmar@microsoft.com> | 2008-02-05 10:14:25 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2008-02-05 10:14:25 +0000 |
commit | 07f4b8136574357e0d8d50496b535de5c9735dc5 (patch) | |
tree | 0930356fee3707b60f597b9d7d24c2511cde08fc /driver | |
parent | db54c49c5bbff861e1b8172b7d5477ce99223cae (diff) | |
download | haskell-07f4b8136574357e0d8d50496b535de5c9735dc5.tar.gz |
FIX #2047: Windows (and older Unixes): align info tables to 4 bytes, not 2
Perhaps in the past '.align 2' meant align to 4 bytes, but nowadays it
means align to 2 bytes. The compacting collector requires info tables
to be aligned to 4 bytes, because it stores tag bits in the low 2
bits.
This only affects -fvia-C - the native code generator was already
emitting the correct alignment. The incorrect alignment might well
have been adversely affecting performance with -fvia-C on Windows.
Diffstat (limited to 'driver')
-rw-r--r-- | driver/mangler/ghc-asm.lprl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/driver/mangler/ghc-asm.lprl b/driver/mangler/ghc-asm.lprl index 76961552e3..8cfd5b5716 100644 --- a/driver/mangler/ghc-asm.lprl +++ b/driver/mangler/ghc-asm.lprl @@ -150,14 +150,14 @@ sub init_TARGET_STUFF { $T_COPY_DIRVS = '\.(globl|stab|lcomm)'; $T_DOT_WORD = '\.(long|word|value|byte|space)'; $T_DOT_GLOBAL = '\.globl'; - $T_HDR_literal = "\.text\n\t\.align 2\n"; - $T_HDR_misc = "\.text\n\t\.align 2,0x90\n"; - $T_HDR_data = "\.data\n\t\.align 2\n"; - $T_HDR_rodata = "\.text\n\t\.align 2\n"; - $T_HDR_closure = "\.data\n\t\.align 2\n"; - $T_HDR_info = "\.text\n\t\.align 2\n"; # NB: requires padding + $T_HDR_literal = "\.text\n\t\.align 4\n"; + $T_HDR_misc = "\.text\n\t\.align 4,0x90\n"; + $T_HDR_data = "\.data\n\t\.align 4\n"; + $T_HDR_rodata = "\.text\n\t\.align 4\n"; + $T_HDR_closure = "\.data\n\t\.align 4\n"; + $T_HDR_info = "\.text\n\t\.align 4\n"; # NB: requires padding $T_HDR_entry = "\.text\n"; # no .align so we're right next to _info (arguably wrong...?) - $T_HDR_vector = "\.text\n\t\.align 2\n"; # NB: requires padding + $T_HDR_vector = "\.text\n\t\.align 4\n"; # NB: requires padding #--------------------------------------------------------# } elsif ( $TargetPlatform =~ /^i386-.*-(solaris2|linux|gnu|freebsd|netbsd|openbsd|kfreebsdgnu)$/m ) { |