Skip to content

Commit

Permalink
asm/arm-xlate.pl: transliterate pre-processor directives on MSVS.
Browse files Browse the repository at this point in the history
  • Loading branch information
dot-asm committed Sep 21, 2023
1 parent e1d3bc5 commit 321cc22
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/asm/arm-xlate.pl
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,17 @@ sub expand_line {

while(my $line=<>) {

if ($flavour =~ /win/) {
if ($line =~ m/^#\s*(ifdef|ifndef|else|endif)\b(.*)/) {
my ($op, $arg) = ($1, $2);
$op = " if :def:" if ($op eq "ifdef");
$op = " if :lnot::def:" if ($op eq "ifndef");
print $op.$arg."\n";
next;
}
$line =~ s|//.*||;
}

# fix up assembler-specific commentary delimiter
$line =~ s/@(?=[\s@])/\;/g if ($flavour =~ /win|coff/);

Expand Down

0 comments on commit 321cc22

Please sign in to comment.