Re: [libav-devel] [GASPP PATCH 2/2] Don't match whitespace as branch condition codes

2018-10-22 Thread Janne Grunau
On 2018-10-20 00:18:27 +0300, Martin Storsjö wrote:
> For cases like "b1b", this could previously be matched as
> $cond = "  ".
> 
> This fixes preprocessing with a preprocessor that preserves multiple
> consecutive spaces, like cl.exe does.
> ---
> Better fix, which also works in a number of cases where the previous
> version failed.
> ---
>  gas-preprocessor.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
> index b22ee8a..c42412f 100755
> --- a/gas-preprocessor.pl
> +++ b/gas-preprocessor.pl
> @@ -879,7 +879,7 @@ sub handle_serialized_line {
>  
>  
>  # Check branch instructions
> -if ($line =~ 
> /(?:^|\n)\s*(\w+\s*:\s*)?(bl?x?\.?(..)?(\.w)?)\s+(\w+)/) {
> +if ($line =~ 
> /(?:^|\n)\s*(\w+\s*:\s*)?(bl?x?\.?([^\s]{2})?(\.w)?)\s+(\w+)/) {
>  my $instr = $2;
>  my $cond = $3;
>  my $width = $4;

both ok

Janne
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [GASPP PATCH 2/2] Don't match whitespace as branch condition codes

2018-10-22 Thread Luca Barbato
On 19/10/2018 23:18, Martin Storsjo wrote:
> For cases like "b1b", this could previously be matched as
> $cond = "  ".
> 
> This fixes preprocessing with a preprocessor that preserves multiple
> consecutive spaces, like cl.exe does.
> ---
> Better fix, which also works in a number of cases where the previous
> version failed.
> ---
>  gas-preprocessor.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
> index b22ee8a..c42412f 100755
> --- a/gas-preprocessor.pl
> +++ b/gas-preprocessor.pl
> @@ -879,7 +879,7 @@ sub handle_serialized_line {
>  
>  
>  # Check branch instructions
> -if ($line =~ 
> /(?:^|\n)\s*(\w+\s*:\s*)?(bl?x?\.?(..)?(\.w)?)\s+(\w+)/) {
> +if ($line =~ 
> /(?:^|\n)\s*(\w+\s*:\s*)?(bl?x?\.?([^\s]{2})?(\.w)?)\s+(\w+)/) {
>  my $instr = $2;
>  my $cond = $3;
>  my $width = $4;
> 

Looks fine.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [GASPP PATCH 2/2] Don't match whitespace as branch condition codes

2018-10-19 Thread Martin Storsjo
For cases like "b1b", this could previously be matched as
$cond = "  ".

This fixes preprocessing with a preprocessor that preserves multiple
consecutive spaces, like cl.exe does.
---
Better fix, which also works in a number of cases where the previous
version failed.
---
 gas-preprocessor.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index b22ee8a..c42412f 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -879,7 +879,7 @@ sub handle_serialized_line {
 
 
 # Check branch instructions
-if ($line =~ /(?:^|\n)\s*(\w+\s*:\s*)?(bl?x?\.?(..)?(\.w)?)\s+(\w+)/) {
+if ($line =~ 
/(?:^|\n)\s*(\w+\s*:\s*)?(bl?x?\.?([^\s]{2})?(\.w)?)\s+(\w+)/) {
 my $instr = $2;
 my $cond = $3;
 my $width = $4;
-- 
2.7.4

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel