notaz.gp2x.de
/
ia32rtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix edx arg-reg corruption in fromasm
[ia32rtools.git]
/
tools
/
mkbridge.c
diff --git
a/tools/mkbridge.c
b/tools/mkbridge.c
index
ac25d38
..
f0727d4
100644
(file)
--- a/
tools/mkbridge.c
+++ b/
tools/mkbridge.c
@@
-124,6
+124,11
@@
static void out_fromasm_x86(FILE *f, char *sym, struct parsed_proto *pp)
stack_args--;
}
else {
+ if (IS(pp->arg[i].reg, "edx"))
+ // must reload original edx
+ fprintf(f, "\tmovl %d(%%esp), %%edx\n",
+ (sarg_ofs - 2) * 4);
+
fprintf(f, "\tpushl %%%s\n", pp->arg[i].reg);
}
sarg_ofs++;