commit 971c825d05531e609d340225327527040a658f0f
parent f1cee29eb08319cf970b8777a8fcd57b111bfad5
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 9 Aug 2014 11:43:22 +0200
Fix emition of end of preambule
The saved value of IX was not restored from the stack.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/cc2/cgen.c b/cc2/cgen.c
@@ -34,8 +34,9 @@ emit(char what, void *data)
"\tLD\tSP,HL\n", sym->u.f.name, -sym->u.f.stack);
return;
case EFUN:
- printf("\tLD\tSP,IX\n"
- "\tRET\n");
+ puts("\tLD\tSP,IX\n"
+ "\tPOP\tIX\n"
+ "\tRET");
return;
default:
fputs("internal error: incorrect emit\n", stderr);