X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tools%2Fasmproc.c;h=6e6b62bc9eef560fe26eb971c18ddddab0734fc2;hb=bfacdc83cf1cd04fdc3b92c4640733791363decb;hp=c016fd50579cf0bbca44bab0c66d4423cb7a2a2f;hpb=7aca46984dd3591e860f0afec44607f173ad87b4;p=ia32rtools.git diff --git a/tools/asmproc.c b/tools/asmproc.c index c016fd5..6e6b62b 100644 --- a/tools/asmproc.c +++ b/tools/asmproc.c @@ -1,3 +1,11 @@ +/* + * ia32rtools + * (C) notaz, 2013,2014 + * + * This work is licensed under the terms of 3-clause BSD license. + * See COPYING file in the top-level directory. + */ + #include #include #include @@ -227,9 +235,7 @@ int main(int argc, char *argv[]) p = next_word(word3, sizeof(word3), p); // push offset - // jcc short - if ( (IS(word, "push") && IS(word2, "offset")) - || (word[0] == 'j' && IS(word2, "short") && !IS(word3, "exit")) ) { + if (IS(word, "push") && IS(word2, "offset")) { ssym.name = word3; sym = bsearch(&ssym, symlist, symlist_cnt, sizeof(symlist[0]), cmp_sym); @@ -240,6 +246,22 @@ int main(int argc, char *argv[]) } } + // jcc short + if (word[0] == 'j' && IS(word2, "short") && !IS(word3, "exit")) { + ssym.name = word3; + sym = bsearch(&ssym, symlist, symlist_cnt, + sizeof(symlist[0]), cmp_sym); + if (sym != NULL) { + fprintf(fout, "\t\t%s ", word); + // for conditional "call", don't print 'short' + if (IS(word3, func)) + fprintf(fout, "short "); + fprintf(fout, "%s%s", + sym_use(sym, sym->callsites || IS(word3, func)), p); + continue; + } + } + // dd offset if (IS(word, "dd") && (IS(word2, "offset") || strstr(p, "offset")))