[GASPP,2/6] Allow register names such as xzr instead of the pattern [xw]\d+ in ccmp/csel

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

Commit Message

Martin Storsjö Oct. 16, 2017, 7:38 p.m.
Also update the csel pattern similarly.

This is required for building x264.
---
 gas-preprocessor.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Janne Grunau Oct. 18, 2017, 6:42 a.m. | #1
On 2017-10-16 22:38:15 +0300, Martin Storsjö wrote:
> Also update the csel pattern similarly.
> 
> This is required for building x264.
> ---
>  gas-preprocessor.pl | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
> index 4c91ee0..2add3dd 100755
> --- a/gas-preprocessor.pl
> +++ b/gas-preprocessor.pl
> @@ -1000,10 +1000,10 @@ sub handle_serialized_line {
>  
>              # Convert "ccmp w0, #0, #0, ne" into "ccmpne w0, #0, #0",
>              # and "csel w0, w0, w0, ne" into "cselne w0, w0, w0".
> -            $line =~ s/(ccmp|csel)\s+([xw]\d+)\s*,\s*([xw#]\d+)\s*,\s*([xw#]\d+)\s*,\s*($arm_cond_codes)/\1\5 \2, \3, \4/;
> +            $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 "cset w0, lo" into "csetlo w0"
> -            $line =~ s/(cset)\s+([xw]\d+)\s*,\s*($arm_cond_codes)/\1\3 \2/;
> +            $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

ok

Janne

Patch

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 4c91ee0..2add3dd 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -1000,10 +1000,10 @@  sub handle_serialized_line {
 
             # Convert "ccmp w0, #0, #0, ne" into "ccmpne w0, #0, #0",
             # and "csel w0, w0, w0, ne" into "cselne w0, w0, w0".
-            $line =~ s/(ccmp|csel)\s+([xw]\d+)\s*,\s*([xw#]\d+)\s*,\s*([xw#]\d+)\s*,\s*($arm_cond_codes)/\1\5 \2, \3, \4/;
+            $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 "cset w0, lo" into "csetlo w0"
-            $line =~ s/(cset)\s+([xw]\d+)\s*,\s*($arm_cond_codes)/\1\3 \2/;
+            $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