summaryrefslogtreecommitdiff
path: root/driver/split
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-01-16 19:56:12 +0000
committerIan Lynagh <igloo@earth.li>2008-01-16 19:56:12 +0000
commit204965d6c5447c5bab4d3f8d453c146c8a05f03f (patch)
treed292f726b801f281103bdaa1afedb1ae6678e8ae /driver/split
parent194eb4bbf6a96d08fee652e244dfc31685abf10e (diff)
downloadhaskell-204965d6c5447c5bab4d3f8d453c146c8a05f03f.tar.gz
Tweak the splitter
We were generating a label ".LnLC7", which the splitter was confusing with a literal constant (LC). The end result was the assembler tripping up on ".Ln.text".
Diffstat (limited to 'driver/split')
-rw-r--r--driver/split/ghc-split.lprl6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/split/ghc-split.lprl b/driver/split/ghc-split.lprl
index 3bdb04b4a0..1750613875 100644
--- a/driver/split/ghc-split.lprl
+++ b/driver/split/ghc-split.lprl
@@ -369,7 +369,7 @@ sub process_asm_block_iX86 {
# http://bugs6.perl.org/rt2/Ticket/Display.html?id=1760 and illustrated
# by the seg fault of perl -e '("x\n" x 5000) =~ /(.*\n)+/'
# -- ccshan 2002-09-05]
- while ( ($str =~ /(\.?(LC\d+):\n(\t\.(ascii|string).*\n|\s*\.byte.*\n){1,100})/ )) {
+ while ( ($str =~ /((?:^|\.)(LC\d+):\n(\t\.(ascii|string).*\n|\s*\.byte.*\n){1,100})/ )) {
local($label) = $2;
local($body) = $1;
local($prefix, $suffix, $*) = ($`, $', 0);
@@ -407,7 +407,7 @@ sub process_asm_block_x86_64 {
# http://bugs6.perl.org/rt2/Ticket/Display.html?id=1760 and illustrated
# by the seg fault of perl -e '("x\n" x 5000) =~ /(.*\n)+/'
# -- ccshan 2002-09-05]
- while ( ($str =~ /(\.?(LC\d+):\n(\t\.(ascii|string).*\n|\s*\.byte.*\n){1,100})/ )) {
+ while ( ($str =~ /((?:^|\.)(LC\d+):\n(\t\.(ascii|string).*\n|\s*\.byte.*\n){1,100})/ )) {
local($label) = $2;
local($body) = $1;
local($prefix, $suffix, $*) = ($`, $', 0);
@@ -502,7 +502,7 @@ sub process_asm_block_mips {
}
# remove/record any literal constants defined here
- while ( $str =~ /(\t\.rdata\n\t\.align \d\n)?(\$(LC\d+):\n(\t\.byte\t.*\n)+)/ ) {
+ while ( $str =~ /(\t\.rdata\n\t\.align \d\n)?^(\$(LC\d+):\n(\t\.byte\t.*\n)+)/ ) {
local($label) = $3;
local($body) = $2;