]> granicus.if.org Git - libvpx/commitdiff
respect alignment in arm asm files
authorJohann <johannkoenig@google.com>
Mon, 27 Jun 2011 15:38:26 +0000 (11:38 -0400)
committerJohann <johannkoenig@google.com>
Mon, 27 Jun 2011 15:38:26 +0000 (11:38 -0400)
Conversion script was discarding alignment. Also, set default alignment
to 4 bytes.

Change-Id: I1e9cbbb8c142bdf93df4e9aaccf967ed43dff906
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/789198

build/make/ads2gas.pl
build/make/ads2gas_apple.pl

index efdfce7a124112eb8fcd42fd36aa426e3515c155..be46582534851d62260f9db6639612ee48fc2fbe 100755 (executable)
@@ -82,7 +82,10 @@ while (<STDIN>)
     s/CODE([0-9][0-9])/.code $1/;
 
     # No AREA required
-    s/^\s*AREA.*$/.text/;
+    # But ALIGNs in AREA must be obeyed
+    s/^\s*AREA.*ALIGN=([0-9])$/.text\n.p2align $1/;
+    # If no ALIGN, strip the AREA and align to 4 bytes
+    s/^\s*AREA.*$/.text\n.p2align 2/;
 
     # DCD to .word
     # This one is for incoming symbols
index 1b303937431693ecc489218deaa3c14f3f928252..78f4a97f52d390d515c7495055b43d4c33cce9c4 100755 (executable)
@@ -100,7 +100,10 @@ while (<STDIN>)
     s/CODE([0-9][0-9])/.code $1/;
 
     # No AREA required
-    s/^\s*AREA.*$/.text/;
+    # But ALIGNs in AREA must be obeyed
+    s/^\s*AREA.*ALIGN=([0-9])$/.text\n.p2align $1/;
+    # If no ALIGN, strip the AREA and align to 4 bytes
+    s/^\s*AREA.*$/.text\n.p2align 2/;
 
     # DCD to .word
     # This one is for incoming symbols