have asfilter deal with tail calls to toolbox functions (preventing undefined __magic_inline errors, see issue #2)

This commit is contained in:
Wolfgang Thaller 2014-09-22 22:16:55 +02:00
parent 6a08b8ed6c
commit d78125c6b6

View File

@ -66,7 +66,7 @@ int main(int argc, char *argv[])
std::ofstream out(tempFileName);
std::string wordS = "[0-9a-f][0-9a-f][0-9a-f][0-9a-f]";
rx::regex jsr("\tjsr __magic_inline_(" + wordS + "(_" + wordS + ")*)");
rx::regex jsr("\t(jsr|jra) __magic_inline_(" + wordS + "(_" + wordS + ")*)");
rx::regex word(wordS);
rx::regex rts("\trts");
rx::regex instruction("\t[a-z]+.*");
@ -98,6 +98,11 @@ int main(int argc, char *argv[])
{
out << "\tdc.w 0x" << p->str() << std::endl;
}
if(match[1] == "jra")
{
out << "rts\n";
hadRts = true;
}
}
// ******* 2. strip unneeded extra rts from "# macsbug symbol" paragraphs