commit 10b994fa3f4f836d8a82d8f6c4727778ed3aee1d
parent c402b04ca2ce6ded7f507ea14f59926a83212152
Author: Alexander Burger <abu@software-lab.de>
Date: Tue, 23 Oct 2012 20:27:22 +0200
emu64 continued
Diffstat:
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/src64/arch/emu.l b/src64/arch/emu.l
@@ -1280,6 +1280,7 @@
(mapc prinl
(quote
"void (*LoadedLibs)(void);"
+ "static void (*NextLib)(void);"
NIL
"static void run(int i) {"
" op tmp;"
@@ -1304,17 +1305,24 @@
(prinl
(unless *FPic " ")
" break;" ) )
- (mapc prinl
+ (for S
(quote
- " default:"
+ " default:"
+ " if (NextLib)"
+ " (*NextLib)();"
+ " else {"
" fprintf(stderr, \"Illegal instruction\\n\");"
" exit(112);"
" }"
+ " }"
~(as *Dbg
- " fprintf(stderr, \" %llX %llX %llX %llX %llX %llX %d%d%d %llX %llX\\n\","
- " A.n, C.n, E.n, X.n, Y.n, Z.n,"
- " !Result, (int64_t)Result<0, Carry,"
- " L.n, S.n );" ) ) )
+ " fprintf(stderr, \" %llX %llX %llX %llX %llX %llX %d%d%d %llX %llX\\n\","
+ " A.n, C.n, E.n, X.n, Y.n, Z.n,"
+ " !Result, (int64_t)Result<0, Carry,"
+ " L.n, S.n );" ) )
+ (prinl
+ (unless *FPic " ")
+ S ) )
(unless *FPic (prinl " }"))
(prinl "}")
(when *FPic