[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] 回复:tcc generating illege l instructions after jiang's
From: |
Roy Tam |
Subject: |
Re: [Tinycc-devel] 回复:tcc generating illege l instructions after jiang's commits |
Date: |
Sat, 3 May 2014 12:47:26 +0800 |
Hello jiang,
2014-05-03 0:33 GMT+08:00 大熊猫 <address@hidden>:
> Hello Roy Tam, I've seen you bug, my machine is ubuntu x86_64. When the 32's
> I can not test, as well as arm, but I try to fix.
It is still broken:
/d/tinycc/win32/tcc -o i386-gen.o -c i386-gen.c -DTCC_TARGET_I386
-DTCC_TARGET_PE -I. -O2
i386-gen.c:105: error: index too large
> Thank you for reporting
> Regards
> jiang
>
>
> ------------------ 原始邮件 ------------------
> 发件人: "Roy Tam";<address@hidden>;
> 发送时间: 2014年5月2日(星期五) 上午10:41
> 收件人: "tinycc-devel"<address@hidden>; "大熊猫"<address@hidden>;
> 主题: tcc generating illegel instructions after jiang's commits
>
> 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