Hello list, jiang,

I tried to "fix" the issue that I mentioned in previous mail, which consists of:

diff --git a/i386-gen.c b/i386-gen.c
index b9811f5..7a9bde1 100644
--- a/i386-gen.c
+++ b/i386-gen.c
@@ -36,6 +36,7 @@
 #define RC_IRET    RC_EAX /* function return: integer register */
 #define RC_LRET    RC_EDX /* function return: second integer register */
 #define RC_FRET    RC_ST0 /* function return: float register */
+#define RC_MASK                (RC_INT|RC_FLOAT)

 /* pretty names for the registers */
 enum {
diff --git a/tccgen.c b/tccgen.c
index b8721b1..f173040 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -959,7 +959,6 @@ static int rc_fret(int t)
         return RC_ST0;
     }
 #endif
-       ex_rc = RC_QRET;
     return RC_FRET;
 }

tcc compiles but for sanity check I recompile tcc by itself, which
generates illegel instructions in libcrt:
(gdb) r
Starting program: D:\tinycc\tcc.exe -B../win32 -I../include -c
libcrt.c -o i386-win32/libcrt.o -g -I.. -O2 -DTCC_TARGET_I386
-DTCC_TARGET_PE
[New Thread 5452.0x108c]

Program received signal SIGILL, Illegal instruction.
0x0042e54d in __ashldi3 () at libcrt.c:477
477         return u.ll;
(gdb)


Advise needed for further actions. Thanks.


Regards,
Roy

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to