summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwolfgang <unknown>2005-06-13 02:03:42 +0000
committerwolfgang <unknown>2005-06-13 02:03:42 +0000
commit4302b12e6fd876a190ce6091e6ce14dbeb15bc00 (patch)
tree8752abb3fc7d2e4bbb2cd9af0a45f73c5820bd22
parentcd22d3c799c6f9552cd7d3218b7c2445b91b7ab2 (diff)
downloadhaskell-4302b12e6fd876a190ce6091e6ce14dbeb15bc00.tar.gz
[project @ 2005-06-13 02:03:42 by wolfgang]
Darwin/x86: Instead of aligning all literals at 16 bytes, reuse the hack from x86-64.
-rw-r--r--ghc/driver/mangler/ghc-asm.lprl8
1 files changed, 5 insertions, 3 deletions
diff --git a/ghc/driver/mangler/ghc-asm.lprl b/ghc/driver/mangler/ghc-asm.lprl
index b95cad8b2a..cd142dbad3 100644
--- a/ghc/driver/mangler/ghc-asm.lprl
+++ b/ghc/driver/mangler/ghc-asm.lprl
@@ -332,7 +332,8 @@ sub init_TARGET_STUFF {
$T_DOT_WORD = '\.(long|short|byte|fill|space)';
$T_DOT_GLOBAL = '\.globl';
$T_HDR_toc = "\.toc\n";
- $T_HDR_literal = "\t\.const\n\t\.align 4\n"; # align for SSE
+ $T_HDR_literal16= "\t\.literal8\n\t\.align 4\n";
+ $T_HDR_literal = "\t\.const\n\t\.align 4\n";
$T_HDR_misc = "\t\.text\n\t\.align 2\n";
$T_HDR_data = "\t\.data\n\t\.align 2\n";
$T_HDR_rodata = "\t\.const\n\t\.align 2\n";
@@ -1211,8 +1212,9 @@ sub mangle_asm {
# HACK: try to detect 16-byte constants and align them
# on a 16-byte boundary. x86_64 sometimes needs 128-bit
- # aligned constants.
- if ( $TargetPlatform =~ /^x86_64/ ) {
+ # aligned constants, and so does Darwin/x86.
+ if ( $TargetPlatform =~ /^x86_64/
+ || $TargetPlatform =~ /^i386-apple-darwin/ ) {
$z = $chk[$i];
if ($z =~ /(\.long.*\n.*\.long.*\n.*\.long.*\n.*\.long|\.quad.*\n.*\.quad)/) {
print OUTASM $T_HDR_literal16;