[GASPP,3/6] Handle cinc just like ccmp/csel

Message ID 1508182699-10436-4-git-send-email-martin@martin.st
State Committed
Headers show

Commit Message

Martin Storsjö Oct. 16, 2017, 7:38 p.m.
This can be squashed into "Add support for MS armasm64"; this
was found while trying to build x264.
---
 gas-preprocessor.pl | 3 +++
 1 file changed, 3 insertions(+)

Comments

Janne Grunau Oct. 18, 2017, 6:42 a.m. | #1
On 2017-10-16 22:38:16 +0300, Martin Storsjö wrote:
> This can be squashed into "Add support for MS armasm64"; this
> was found while trying to build x264.
> ---
>  gas-preprocessor.pl | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
> index 2add3dd..552ed0c 100755
> --- a/gas-preprocessor.pl
> +++ b/gas-preprocessor.pl
> @@ -1002,6 +1002,9 @@ sub handle_serialized_line {
>              # and "csel w0, w0, w0, ne" into "cselne w0, w0, w0".
>              $line =~ s/(ccmp|csel)\s+([xw]\w+)\s*,\s*([xw#]\w+)\s*,\s*([xw#]\w+)\s*,\s*($arm_cond_codes)/\1\5 \2, \3, \4/;
>  
> +            # Convert "cinc w0, w0, ne" into "cincne w0, w0".
> +            $line =~ s/(cinc)\s+([xw]\w+)\s*,\s*([xw]\w+)\s*,\s*($arm_cond_codes)/\1\4 \2, \3/;
> +
>              # Convert "cset w0, lo" into "csetlo w0"
>              $line =~ s/(cset)\s+([xw]\w+)\s*,\s*($arm_cond_codes)/\1\3 \2/;
>  

ok

Janne

Patch

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 2add3dd..552ed0c 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -1002,6 +1002,9 @@  sub handle_serialized_line {
             # and "csel w0, w0, w0, ne" into "cselne w0, w0, w0".
             $line =~ s/(ccmp|csel)\s+([xw]\w+)\s*,\s*([xw#]\w+)\s*,\s*([xw#]\w+)\s*,\s*($arm_cond_codes)/\1\5 \2, \3, \4/;
 
+            # Convert "cinc w0, w0, ne" into "cincne w0, w0".
+            $line =~ s/(cinc)\s+([xw]\w+)\s*,\s*([xw]\w+)\s*,\s*($arm_cond_codes)/\1\4 \2, \3/;
+
             # Convert "cset w0, lo" into "csetlo w0"
             $line =~ s/(cset)\s+([xw]\w+)\s*,\s*($arm_cond_codes)/\1\3 \2/;