On Thu, 2 Jan 2014, Martin Storsjo wrote:

The built-in arm assembler in clang doesn't support .dn/.qn
aliases, even Apple's normal standalone binutils-derived as
supports them.
---
gas-preprocessor.pl |   30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 54694c5..d0555c8 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -408,6 +408,9 @@ my %call_targets;
my @irp_args;
my $irp_param;

+my %neon_alias_reg;
+my %neon_alias_type;
+
# pass 2: parse .rept and .if variants
foreach my $line (@pass1_lines) {
    # handle .previous (only with regard to .section not .subsection)
@@ -482,6 +485,33 @@ foreach my $line (@pass1_lines) {
            $line .= ".unreq " . uc($1) . "\n";
        }
    }
+    if ($line =~ /\.unreq\s+(.*)/) {
+        if (defined $neon_alias_reg{$1}) {
+            delete $neon_alias_reg{$1};
+            delete $neon_alias_type{$1};
+            next;
+        }
+    }
+
+    if ($line =~ /(\w+)\s+\.(dn|qn)\s+(\w+)\.(\w+)/) {
+        $neon_alias_reg{$1}  = $3;
+        $neon_alias_type{$1} = $4;
+        next;
+    }
+    if ($line =~ /^\s+v\w+/ and scalar keys %neon_alias_reg > 0) {
+        # This line seems to possibly have a neon instruction
+        foreach (keys %neon_alias_reg) {
+            my $alias = $_;

I guess the second half of the condition ( > 0) is kinda redundant - if neon_alisa_reg is empty, the foreach loop below won't do anything at all anyway.

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

Reply via email to