From 712384442b8f12d6fd1f668cfa5ed8cac4dfa2b9 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Mon, 5 Aug 2013 13:26:10 +0200 Subject: [PATCH] Fix replacements for macro variables with spaces "\var1" is sometines replaced with "\ rx" instead of "\rx" --- gas-preprocessor.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index 082f71b..620986c 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -356,6 +356,7 @@ sub expand_macros { # when argument names are subsets of each other foreach (reverse sort {length $a <=> length $b} keys %replacements) { $macro_line =~ s/\\$_/$replacements{$_}/g; + $macro_line =~ s/\\ $_/$replacements{$_}/g; } $macro_line =~ s/\\\@/$count/g; $macro_line =~ s/\\\(\)//g; # remove \()