[GASPP] Extend armasm64 workaround for uxtw/sxtw to uxth/sxth and uxtb/sxtb as well

Message ID 1540201907-13744-1-git-send-email-martin@martin.st
State New
Headers show
Series
  • [GASPP] Extend armasm64 workaround for uxtw/sxtw to uxth/sxth and uxtb/sxtb as well
Related show

Commit Message

Martin Storsjö Oct. 22, 2018, 9:51 a.m.
---
 gas-preprocessor.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Luca Barbato Oct. 22, 2018, 3:39 p.m. | #1
On 22/10/2018 11:51, Martin Storsjo wrote:
> ---
>  gas-preprocessor.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
> index 7efe3b9..669d435 100755
> --- a/gas-preprocessor.pl
> +++ b/gas-preprocessor.pl
> @@ -1011,7 +1011,7 @@ sub handle_serialized_line {
>  
>              # Convert e.g. "add x0, x0, w0, uxtw" into "add x0, x0, w0, uxtw #0",
>              # or "ldr x0, [x0, w0, uxtw]" into "ldr x0, [x0, w0, uxtw #0]".
> -            $line =~ s/(uxtw|sxtw)(\s*\]?\s*)$/\1 #0\2/i;
> +            $line =~ s/(uxt[whb]|sxt[whb])(\s*\]?\s*)$/\1 #0\2/i;
>  
>              # Convert "mov x0, v0.d[0]" into "umov x0, v0.d[0]"
>              $line =~ s/\bmov\s+[xw]\d+\s*,\s*v\d+\.[ds]/u$&/i;
> 

Seems ok.
Janne Grunau Oct. 22, 2018, 6:01 p.m. | #2
On 2018-10-22 12:51:47 +0300, Martin Storsjö wrote:
> ---
>  gas-preprocessor.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
> index 7efe3b9..669d435 100755
> --- a/gas-preprocessor.pl
> +++ b/gas-preprocessor.pl
> @@ -1011,7 +1011,7 @@ sub handle_serialized_line {
>  
>              # Convert e.g. "add x0, x0, w0, uxtw" into "add x0, x0, w0, uxtw #0",
>              # or "ldr x0, [x0, w0, uxtw]" into "ldr x0, [x0, w0, uxtw #0]".
> -            $line =~ s/(uxtw|sxtw)(\s*\]?\s*)$/\1 #0\2/i;
> +            $line =~ s/(uxt[whb]|sxt[whb])(\s*\]?\s*)$/\1 #0\2/i;
>  
>              # Convert "mov x0, v0.d[0]" into "umov x0, v0.d[0]"
>              $line =~ s/\bmov\s+[xw]\d+\s*,\s*v\d+\.[ds]/u$&/i;

ok,

Janne

Patch

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 7efe3b9..669d435 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -1011,7 +1011,7 @@  sub handle_serialized_line {
 
             # Convert e.g. "add x0, x0, w0, uxtw" into "add x0, x0, w0, uxtw #0",
             # or "ldr x0, [x0, w0, uxtw]" into "ldr x0, [x0, w0, uxtw #0]".
-            $line =~ s/(uxtw|sxtw)(\s*\]?\s*)$/\1 #0\2/i;
+            $line =~ s/(uxt[whb]|sxt[whb])(\s*\]?\s*)$/\1 #0\2/i;
 
             # Convert "mov x0, v0.d[0]" into "umov x0, v0.d[0]"
             $line =~ s/\bmov\s+[xw]\d+\s*,\s*v\d+\.[ds]/u$&/i;