On February 7, 2014 4:51:19 PM EET, Janne Grunau <[email protected]> wrote:
>On 2014-02-07 16:31:38 +0200, Martin Storsjö wrote:
>
>Do not instead of Don't in the commit msg
>
>> ---
>> This doesn't help much right now, but in a number of experimental
>> branches I've added things in this clause, and I've had to hack
>> around misidentifying bic as a branch in all of them.
>> ---
>>  gas-preprocessor.pl | 16 +++++++++++-----
>>  1 file changed, 11 insertions(+), 5 deletions(-)
>> 
>> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
>> index 1c9a1d5..14c07bf 100755
>> --- a/gas-preprocessor.pl
>> +++ b/gas-preprocessor.pl
>> @@ -480,11 +480,17 @@ 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 bic as b<cc> with ic as conditional code,
>although
>> +        # there's no harm in adding the register to @call_targets.
>
>the second part is useless information
>
>> +        if ($cond ne "ic") {
>> +            if (exists $thumb_labels{$label}) {
>> +                print ASMFILE ".thumb_func $label\n";
>> +            } else {
>> +                $call_targets{$label}++;
>> +            }
>>          }
>>      }
>
>ok,
>
>doing it this way is probably best for clarity

I now later came to think that I could probably stuff it into the RE as well, 
having the (..) match anything but ic, saving one indentation level here. But 
do you still prefer the explicit check here over extending the RE?

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

Reply via email to