2014-02-28 23:56:14 +04:00
|
|
|
#!/usr/bin/env perl
|
2016-09-02 00:32:49 +03:00
|
|
|
## Copyright (c) 2016, Alliance for Open Media. All rights reserved
|
2012-11-20 18:05:40 +04:00
|
|
|
##
|
2016-09-02 00:32:49 +03:00
|
|
|
## This source code is subject to the terms of the BSD 2 Clause License and
|
|
|
|
## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
|
|
|
|
## was not distributed with this source code in the LICENSE file, you can
|
|
|
|
## obtain it at www.aomedia.org/license/software. If the Alliance for Open
|
|
|
|
## Media Patent License 1.0 was not distributed with this source code in the
|
|
|
|
## PATENTS file, you can obtain it at www.aomedia.org/license/patent.
|
2012-11-20 18:05:40 +04:00
|
|
|
##
|
|
|
|
|
|
|
|
use FindBin;
|
|
|
|
use lib $FindBin::Bin;
|
|
|
|
use thumb;
|
|
|
|
|
|
|
|
print "; This file was created from a .asm file\n";
|
|
|
|
print "; using the ads2armasm_ms.pl script.\n";
|
|
|
|
|
|
|
|
while (<STDIN>)
|
|
|
|
{
|
|
|
|
undef $comment;
|
|
|
|
undef $line;
|
|
|
|
|
|
|
|
s/REQUIRE8//;
|
|
|
|
s/PRESERVE8//;
|
|
|
|
s/^\s*ARM\s*$//;
|
|
|
|
s/AREA\s+\|\|(.*)\|\|/AREA |$1|/;
|
|
|
|
s/qsubaddx/qsax/i;
|
|
|
|
s/qaddsubx/qasx/i;
|
|
|
|
|
2013-05-15 18:09:22 +04:00
|
|
|
thumb::FixThumbInstructions($_, 1);
|
2012-11-20 18:05:40 +04:00
|
|
|
|
|
|
|
s/ldrneb/ldrbne/i;
|
|
|
|
s/ldrneh/ldrhne/i;
|
2014-03-20 10:12:29 +04:00
|
|
|
s/^(\s*)ENDP.*/$&\n$1ALIGN 4/;
|
2012-11-20 18:05:40 +04:00
|
|
|
|
|
|
|
print;
|
|
|
|
}
|
|
|
|
|