| OLD | NEW |
| 1 #!/usr/bin/env perl | 1 #!/usr/bin/env perl |
| 2 ## | 2 ## |
| 3 ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 3 ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 4 ## | 4 ## |
| 5 ## Use of this source code is governed by a BSD-style license | 5 ## Use of this source code is governed by a BSD-style license |
| 6 ## that can be found in the LICENSE file in the root of the source | 6 ## that can be found in the LICENSE file in the root of the source |
| 7 ## tree. An additional intellectual property rights grant can be found | 7 ## tree. An additional intellectual property rights grant can be found |
| 8 ## in the file PATENTS. All contributing project authors may | 8 ## in the file PATENTS. All contributing project authors may |
| 9 ## be found in the AUTHORS file in the root of the source tree. | 9 ## be found in the AUTHORS file in the root of the source tree. |
| 10 ## | 10 ## |
| 11 | 11 |
| 12 | 12 |
| 13 # ads2gas.pl | 13 # ads2gas_apple.pl |
| 14 # Author: Eric Fung (efung (at) acm.org) | 14 # Author: Eric Fung (efung (at) acm.org) |
| 15 # | 15 # |
| 16 # Convert ARM Developer Suite 1.0.1 syntax assembly source to GNU as format | 16 # Convert ARM Developer Suite 1.0.1 syntax assembly source to GNU as format |
| 17 # | 17 # |
| 18 # Usage: cat inputfile | perl ads2gas.pl > outputfile | 18 # Usage: cat inputfile | perl ads2gas_apple.pl > outputfile |
| 19 # | 19 # |
| 20 print "@ This file was created from a .asm file\n"; | 20 print "@ This file was created from a .asm file\n"; |
| 21 print "@ using the ads2gas_apple.pl script.\n\n"; | 21 print "@ using the ads2gas_apple.pl script.\n\n"; |
| 22 print "\t.set WIDE_REFERENCE, 0\n"; | 22 print "\t.set WIDE_REFERENCE, 0\n"; |
| 23 print "\t.set ARCHITECTURE, 5\n"; | 23 print "\t.set ARCHITECTURE, 5\n"; |
| 24 print "\t.set DO1STROUNDING, 0\n"; | 24 print "\t.set DO1STROUNDING, 0\n"; |
| 25 | 25 |
| 26 my %register_aliases; | 26 my %register_aliases; |
| 27 my %macro_aliases; | 27 my %macro_aliases; |
| 28 | 28 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 $key =~ s/\$/\\\$/; | 205 $key =~ s/\$/\\\$/; |
| 206 s/$key\b/$value/g; | 206 s/$key\b/$value/g; |
| 207 } | 207 } |
| 208 | 208 |
| 209 # For macros, use \ to reference formal params | 209 # For macros, use \ to reference formal params |
| 210 # s/\$/\\/g; # End macro definition | 210 # s/\$/\\/g; # End macro definition |
| 211 s/MEND/.endm/; # No need to tell it where to stop assembling | 211 s/MEND/.endm/; # No need to tell it where to stop assembling |
| 212 next if /^\s*END\s*$/; | 212 next if /^\s*END\s*$/; |
| 213 print; | 213 print; |
| 214 } | 214 } |
| OLD | NEW |