]> granicus.if.org Git - libvpx/commitdiff
ads2gas_apple.pl: remove gcc-isms
authorJohann <johannkoenig@google.com>
Sat, 12 Mar 2022 22:02:03 +0000 (07:02 +0900)
committerJohann <johannkoenig@google.com>
Sat, 12 Mar 2022 22:50:37 +0000 (07:50 +0900)
The gcc assembler was incompatible for a long
time. It is now based on clang and accepts
more modern syntax, although not enough to
remove the script entirely.

Change-Id: I667d29dca005ea02a995c1025c45eb844081f64b

build/make/ads2gas_apple.pl

index 0a3fccc4b04a417992b5114da00c24b3852515a3..af10b436a939e0f66c5bc29c789f60d3c2be3bf8 100755 (executable)
@@ -94,35 +94,17 @@ while (<STDIN>)
     s/\bENDP\b//g;
 
     # EQU directive
-    s/(\S+\s+)EQU(\s+\S+)/.set $1, $2/;
+    s/(\S+\s+)EQU(\s+\S+)/.equ $1, $2/;
 
     # Begin macro definition
     if (/\bMACRO\b/) {
         # Process next line down, which will be the macro definition
         $_ = <STDIN>;
-
-        $trimmed = trim($_);
-
-        # remove commas that are separating list
-        $trimmed =~ s/,//g;
-
-        # string to array
-        @incoming_array = split(/\s+/, $trimmed);
-
-        print ".macro @incoming_array[0]\n";
-
-        # remove the first element, as that is the name of the macro
-        shift (@incoming_array);
-
-        @macro_aliases{@incoming_array} = @mapping_list;
-
-        next;
+        s/^/.macro/;
+        s/\$//g;             # Remove $ from the variables in the declaration
     }
 
-    while (($key, $value) = each(%macro_aliases)) {
-        $key =~ s/\$/\\\$/;
-        s/$key\b/$value/g;
-    }
+    s/\$/\\/g;               # Use \ to reference formal parameters
     # End macro definition
 
     s/\bMEND\b/.endm/;       # No need to tell it where to stop assembling