On 2014-02-07 21:03:12 +0200, Martin Storsjö wrote:
> This avoids interpreting instructions such as e.g. bic as
> a branch with the condition 'ic'.
> ---
> Updated to check the condition against the list of conditions
> from ARM ARM.
> ---
>  gas-preprocessor.pl | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
> index 1c9a1d5..611a3a0 100755
> --- a/gas-preprocessor.pl
> +++ b/gas-preprocessor.pl
> @@ -480,11 +480,16 @@ foreach my $line (@pass1_lines) {
>          $thumb_labels{$1}++;
>      }
>  
> -    if ($line =~ /^\s*((\w+\s*:\s*)?bl?x?(?:..)?(?:\.w)?|\.globl)\s+(\w+)/) {
> -        if (exists $thumb_labels{$3}) {
> -            print ASMFILE ".thumb_func $3\n";
> -        } else {
> -            $call_targets{$3}++;
> +    if ($line =~ /^\s*((\w+\s*:\s*)?bl?x?(..)?(?:\.w)?|\.globl)\s+(\w+)/) {
> +        my $cond = $3;
> +        my $label = $4;
> +        # Don't interpret e.g. bic as b<cc> with ic as conditional code
> +        if ($cond =~ /|eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al/) {

hs and lo missing, synonyms for cs and cc

> +            if (exists $thumb_labels{$label}) {
> +                print ASMFILE ".thumb_func $label\n";
> +            } else {
> +                $call_targets{$label}++;
> +            }
>          }
>      }

otherwise ok

Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to