• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env perl
2##
3##  Copyright (c) 2013 The WebM project authors. All Rights Reserved.
4##
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
7##  tree. An additional intellectual property rights grant can be found
8##  in the file PATENTS.  All contributing project authors may
9##  be found in the AUTHORS file in the root of the source tree.
10##
11
12use FindBin;
13use lib $FindBin::Bin;
14use thumb;
15
16print "; This file was created from a .asm file\n";
17print ";  using the ads2armasm_ms.pl script.\n";
18
19while (<STDIN>)
20{
21    undef $comment;
22    undef $line;
23
24    s/REQUIRE8//;
25    s/PRESERVE8//;
26    s/^\s*ARM\s*$//;
27    s/AREA\s+\|\|(.*)\|\|/AREA |$1|/;
28    s/qsubaddx/qsax/i;
29    s/qaddsubx/qasx/i;
30
31    thumb::FixThumbInstructions($_, 1);
32
33    s/ldrneb/ldrbne/i;
34    s/ldrneh/ldrhne/i;
35    s/^(\s*)ENDP.*/$&\n$1ALIGN 4/;
36
37    print;
38}
39
40