From 2056d62065d702633f7542558c328f85ee989b5f Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 28 Feb 2019 20:40:16 +0100 Subject: [PATCH] mescc: Mes C Library: Bugfix for tcc-compiled exit assembly. * lib/linux/x86-mes-gcc/mini.c (_exit): Add clobbered registers %eax, %ebx. Fixes always exit 1. --- lib/linux/x86-mes-gcc/mini.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linux/x86-mes-gcc/mini.c b/lib/linux/x86-mes-gcc/mini.c index c2bfb77b..5e7cfc8a 100644 --- a/lib/linux/x86-mes-gcc/mini.c +++ b/lib/linux/x86-mes-gcc/mini.c @@ -30,6 +30,7 @@ _exit (int code) "int $0x80\n\t" : // no outputs "=" (r) : "rm" (code) + : "eax", "ebx" ); // not reached _exit (0);