[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] bug repport, div function on windows
From: |
Thomas Preud'homme |
Subject: |
Re: [Tinycc-devel] bug repport, div function on windows |
Date: |
Wed, 11 Dec 2013 11:28:45 +0800 |
User-agent: |
KMail/4.11.3 (Linux/2.6.38-ac2-ac100; KDE/4.11.3; armv7l; ; ) |
Le lundi 9 décembre 2013, 17:24:31 Pierre a écrit :
> Hello,
> Just post for a bug report, or I have done something wrong.
> the div function return bad result
>
> #include <stdio.h>
> #include <stdlib.h>
>
> div_t Te;
>
> void main(void)
> {
> Te = div(1000, 33);
> printf("Res0 = %d %d\n", Te.quot, Te.rem);
> }
>
> return 0 4077744
> (should return 30 10)
I don't think you did anything wrong as this work on arm / Linux. I tried
testing on x86 but got an assert failing at line 419 of x86_64-gen.c.
>
> Tested with tcc 0.9.26 win32 version on XP
>
> I have used last tcc archive tcc-0.9.26-win32-bin.zip
Might be x86 specific or windows specific. Unfortunetely, I don't have access
to
a and the only x86 machines I have access to are quite remote from me which
leads to terrible latency over ssh.
Could you first try with the current development code? Just clone the git
repository with:
git clone git://repo.or.cz/tinycc.git
and then uses win32/build-tcc.bat to build tcc (as far as I know, I never
compiled tcc for windows myself).
>
> I'm not able to fix the tcc code because too complicated for me,
> I somebody could help me.
> Thanks.
> Pierre.
Best regards,
Thomas