OLD | NEW |
1 #!/usr/bin/perl | 1 #!/usr/bin/perl |
2 # Copyright (C) 2002-2013 Xiph.org Foundation | 2 # Copyright (C) 2002-2013 Xiph.org Foundation |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions | 5 # modification, are permitted provided that the following conditions |
6 # are met: | 6 # are met: |
7 # | 7 # |
8 # - Redistributions of source code must retain the above copyright | 8 # - Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # | 10 # |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 die "I don't recognize this switch: $_\\n"; | 42 die "I don't recognize this switch: $_\\n"; |
43 } | 43 } |
44 $printit++ unless $nflag; | 44 $printit++ unless $nflag; |
45 | 45 |
46 $\ = "\n"; # automatically add newline on print | 46 $\ = "\n"; # automatically add newline on print |
47 $n=0; | 47 $n=0; |
48 | 48 |
49 $thumb = 0; # ARM mode by default, not Thumb. | 49 $thumb = 0; # ARM mode by default, not Thumb. |
50 @proc_stack = (); | 50 @proc_stack = (); |
51 | 51 |
| 52 printf (" .syntax unified\n"); |
| 53 |
52 LINE: | 54 LINE: |
53 while (<>) { | 55 while (<>) { |
54 | 56 |
55 # For ADRLs we need to add a new line after the substituted one. | 57 # For ADRLs we need to add a new line after the substituted one. |
56 $addPadding = 0; | 58 $addPadding = 0; |
57 | 59 |
58 # First, we do not dare to touch *anything* inside double quotes, do we? | 60 # First, we do not dare to touch *anything* inside double quotes, do we? |
59 # Second, if you want a dollar character in the string, | 61 # Second, if you want a dollar character in the string, |
60 # insert two of them -- that's how ARM C and assembler treat strings. | 62 # insert two of them -- that's how ARM C and assembler treat strings. |
61 s/^([A-Za-z_]\w*)[ \t]+DCB[ \t]*\"/$1: .ascii \"/ && do { s/\$\$/\$/g; n
ext }; | 63 s/^([A-Za-z_]\w*)[ \t]+DCB[ \t]*\"/$1: .ascii \"/ && do { s/\$\$/\$/g; n
ext }; |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 { | 333 { |
332 printf (" mov r0,r0\n"); | 334 printf (" mov r0,r0\n"); |
333 $addPadding = 0; | 335 $addPadding = 0; |
334 } | 336 } |
335 } | 337 } |
336 #If we had a code section, mark that this object doesn't need an executable | 338 #If we had a code section, mark that this object doesn't need an executable |
337 # stack. | 339 # stack. |
338 if ($nxstack) { | 340 if ($nxstack) { |
339 printf (" .section\t.note.GNU-stack,\"\",\%\%progbits\n"); | 341 printf (" .section\t.note.GNU-stack,\"\",\%\%progbits\n"); |
340 } | 342 } |
OLD | NEW |