+/*
+ * 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
p = next_word(word3, sizeof(word3), p);
// push offset <sym>
- // jcc short <sym>
- 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);
}
}
+ // jcc short <sym>
+ 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 <sym>
if (IS(word, "dd")
&& (IS(word2, "offset") || strstr(p, "offset")))