From 6899620dbb01bd0e62a962f78e652a4f94be6bad Mon Sep 17 00:00:00 2001 From: simonm Date: Wed, 3 Mar 1999 16:05:21 +0000 Subject: [PATCH] [project @ 1999-03-03 16:05:21 by simonm] HPPA tweaks. --- ghc/driver/ghc-asm.lprl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ghc/driver/ghc-asm.lprl b/ghc/driver/ghc-asm.lprl index da664ad..d81240c 100644 --- a/ghc/driver/ghc-asm.lprl +++ b/ghc/driver/ghc-asm.lprl @@ -89,7 +89,7 @@ sub init_TARGET_STUFF { $T_COPY_DIRVS = '^\s+\.(IMPORT|EXPORT)'; $T_hsc_cc_PAT = '\.STRING.*\)(hsc|cc) (.*)\\\\x09(.*)\\\\x00"'; - $T_DOT_WORD = '\.word'; + $T_DOT_WORD = '\.(blockz|word|half|byte)'; $T_DOT_GLOBAL = '^\s+\.EXPORT'; $T_HDR_literal = "\t.SPACE \$TEXT\$\n\t.SUBSPA \$LIT\$\n"; $T_HDR_misc = "\t.SPACE \$TEXT\$\n\t.SUBSPA \$CODE\$\n\t\.align 4\n"; @@ -1156,7 +1156,7 @@ sub print_doctored { if ( $TargetPlatform !~ /^i386-/ || ! /^\t[a-z]/ # no instructions in here, apparently - || /^${T_US}_reg[A-Za-z0-9_]+:/) { + || /^${T_US}_reg[A-Za-z0-9_]+${T_POST_LBL}/) { print OUTASM $_; return; } @@ -1334,7 +1334,7 @@ sub rev_tbl { push(@words, $lines[$i]); } } else { # hppa weirdness - for ( ; $i <= $#lines && $lines[$i] =~ /^\s+\.(word|IMPORT)/; $i++) { + for ( ; $i <= $#lines && $lines[$i] =~ /^\s+($TDOTWORD|\.IMPORT)/; $i++) { if ($lines[$i] =~ /^\s+\.IMPORT/) { push(@imports, $lines[$i]); } else { @@ -1349,7 +1349,8 @@ sub rev_tbl { # now throw away the first word (SRT) iff it is empty. # The .zero business is for Linux/ELF. # The .skip business is for Sparc/Solaris/ELF. - if ($discard1 && $words[0] =~ /^\t?($TDOTWORD\s+0|\.zero\s+4|\.skip\s+4)/) { + # The .blockz business is for HPPA. + if ($discard1 && $words[0] =~ /^\t?($TDOTWORD\s+0|\.zero\s+4|\.skip\s+4|\.blockz\s+4)/) { shift(@words) } -- 1.7.10.4