Message ID | 1520326712-19031-2-git-send-email-martin@martin.st |
---|---|
State | Committed |
Headers | show |
Series |
|
Related | show |
On 2018-03-06 10:58:31 +0200, Martin Storsjö wrote: > The version of armasm64 in Visual Studio 2017 15.5 can assemble > these just fine. > --- > gas-preprocessor.pl | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl > index 9ff47a9..cb2f912 100755 > --- a/gas-preprocessor.pl > +++ b/gas-preprocessor.pl > @@ -1020,10 +1020,12 @@ sub handle_serialized_line { > # Convert "cset w0, lo" into "csetlo w0" > $line =~ s/(cset)\s+([xw]\w+)\s*,\s*($arm_cond_codes)/\1\3 \2/; > > - # Strip out prfum; armasm64 fails to assemble any > - # variant/combination of prfum tested so far, but it can be > - # left out without any > - $line =~ s/prfum.*\]//; > + if ($ENV{GASPP_ARMASM64_SKIP_PRFUM}) { > + # Strip out prfum; armasm64 (VS < 15.5) fails to assemble any > + # variant/combination of prfum tested so far, but it can be > + # left out without any Maybe replace the last incomplete sentence after the comma with "Since it is a prefetch instruction it can be skipped without changing results." > + $line =~ s/prfum.*\]//; > + } > > # Convert "ldrb w0, [x0, #-1]" into "ldurb w0, [x0, #-1]". > # Don't do this for forms with writeback though. otherwise ok Janne
diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index 9ff47a9..cb2f912 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -1020,10 +1020,12 @@ sub handle_serialized_line { # Convert "cset w0, lo" into "csetlo w0" $line =~ s/(cset)\s+([xw]\w+)\s*,\s*($arm_cond_codes)/\1\3 \2/; - # Strip out prfum; armasm64 fails to assemble any - # variant/combination of prfum tested so far, but it can be - # left out without any - $line =~ s/prfum.*\]//; + if ($ENV{GASPP_ARMASM64_SKIP_PRFUM}) { + # Strip out prfum; armasm64 (VS < 15.5) fails to assemble any + # variant/combination of prfum tested so far, but it can be + # left out without any + $line =~ s/prfum.*\]//; + } # Convert "ldrb w0, [x0, #-1]" into "ldurb w0, [x0, #-1]". # Don't do this for forms with writeback though.