mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-23 10:31:22 +00:00
hack 68000-compatible replacement for RTD instruction into asfilter
This commit is contained in:
parent
3f1eec11f9
commit
dc386a4845
@ -71,6 +71,7 @@ int main(int argc, char *argv[])
|
||||
rx::regex rts("\trts");
|
||||
rx::regex instruction("\t[a-z]+.*");
|
||||
rx::regex macsbug("# macsbug symbol");
|
||||
rx::regex rtd("\trtd #([0-9]+)");
|
||||
|
||||
bool hadRts = false;
|
||||
bool macsbugSymbol = false, macsbugSymbol1;
|
||||
@ -105,6 +106,14 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
else if(rx::regex_match(line, match, rtd))
|
||||
{
|
||||
out << "\tmove.l (%a7)+, %a0\n";
|
||||
out << "\tlea " + match[1] + "(%a7), %a7\n";
|
||||
out << "\tjmp (%a0)\n";
|
||||
hadRts = true;
|
||||
}
|
||||
|
||||
// ******* 2. strip unneeded extra rts from "# macsbug symbol" paragraphs
|
||||
//
|
||||
// GCC is patche to add something like this to the end of every function:
|
||||
|
Loading…
Reference in New Issue
Block a user