Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: source/libvpx/build/make/ads2gas.pl

Issue 7671004: Update libvpx snapshot to v0.9.7-p1 (Cayuga). (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/build/make/Makefile ('k') | source/libvpx/build/make/ads2gas_apple.pl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/build/make/ads2gas.pl
===================================================================
--- source/libvpx/build/make/ads2gas.pl (revision 96967)
+++ source/libvpx/build/make/ads2gas.pl (working copy)
@@ -21,8 +21,14 @@
print "@ using the ads2gas.pl script.\n";
print "\t.equ DO1STROUNDING, 0\n";
+# Stack of procedure names.
+@proc_stack = ();
+
while (<STDIN>)
{
+ # Load and store alignment
+ s/@/,:/g;
+
# Comment character
s/;/@/g;
@@ -79,7 +85,10 @@
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
@@ -114,8 +123,8 @@
# put the colon at the end of the line in the macro
s/^([a-zA-Z_0-9\$]+)/$1:/ if !/EQU/;
- # Strip ALIGN
- s/\sALIGN/@ ALIGN/g;
+ # ALIGN directive
+ s/ALIGN/.balign/g;
# Strip ARM
s/\sARM/@ ARM/g;
@@ -127,9 +136,23 @@
# Strip PRESERVE8
s/\sPRESERVE8/@ PRESERVE8/g;
- # Strip PROC and ENDPROC
- s/\sPROC/@/g;
- s/\sENDP/@/g;
+ # Use PROC and ENDP to give the symbols a .size directive.
+ # This makes them show up properly in debugging tools like gdb and valgrind.
+ if (/\bPROC\b/)
+ {
+ my $proc;
+ /^_([\.0-9A-Z_a-z]\w+)\b/;
+ $proc = $1;
+ push(@proc_stack, $proc) if ($proc);
+ s/\bPROC\b/@ $&/;
+ }
+ if (/\bENDP\b/)
+ {
+ my $proc;
+ s/\bENDP\b/@ $&/;
+ $proc = pop(@proc_stack);
+ $_ = "\t.size $proc, .-$proc".$_ if ($proc);
+ }
# EQU directive
s/(.*)EQU(.*)/.equ $1, $2/;
@@ -148,3 +171,6 @@
next if /^\s*END\s*$/;
print;
}
+
+# Mark that this object doesn't need an executable stack.
+printf ("\t.section\t.note.GNU-stack,\"\",\%\%progbits\n");
« no previous file with comments | « source/libvpx/build/make/Makefile ('k') | source/libvpx/build/make/ads2gas_apple.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698