[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] i386 build of gawk with tcc now broken
From: |
Ramsay Jones |
Subject: |
Re: [Tinycc-devel] i386 build of gawk with tcc now broken |
Date: |
Tue, 10 Sep 2013 00:04:43 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 |
On 09/09/13 22:59, Thomas Preud'homme wrote:
> Le dimanche 8 septembre 2013 17:13:51 Ramsay Jones a écrit :
>> On 08/09/13 08:00, address@hidden wrote:
[snip]
>> --- 8< ---
>> From: Ramsay Jones <address@hidden>
>> Date: Sat, 7 Sep 2013 22:48:02 +0100
>> Subject: [PATCH] libtcc1.c: Fix __asm__() in __tcc_fpinit and __tcc_cvt_ftol
>>
>> Signed-off-by: Ramsay Jones <address@hidden>
>> ---
>> lib/libtcc1.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/libtcc1.c b/lib/libtcc1.c
>> index a94a82d..a717701 100644
>> --- a/lib/libtcc1.c
>> +++ b/lib/libtcc1.c
>> @@ -482,7 +482,7 @@ long long __ashldi3(long long a, int b)
>> void __tcc_fpinit(void)
>> {
>> unsigned c = 0x137F;
>> - __asm__ __volatile__ ("fldcw %0" : "=m" (c));
>> + __asm__ __volatile__ ("fldcw %0" : : "m" (c));
>> }
>> #endif
>> long long __tcc_cvt_ftol(long double x)
>> @@ -491,9 +491,9 @@ long long __tcc_cvt_ftol(long double x)
>> long long ret;
>> __asm__ __volatile__ ("fnstcw %0" : "=m" (c0));
>> c1 = c0 | 0x0C00;
>> - __asm__ __volatile__ ("fldcw %0" : "=m" (c1));
>> + __asm__ __volatile__ ("fldcw %0" : : "m" (c1));
>> __asm__ __volatile__ ("fistpll %0" : "=m" (ret));
>> - __asm__ __volatile__ ("fldcw %0" : "=m" (c0));
>> + __asm__ __volatile__ ("fldcw %0" : : "m" (c0));
>> return ret;
>> }
>> #endif /* !__x86_64__ */
>
> The patch looks sound. the memory location operand is indeed an input since
> the output is in a x87 FPU control word. I thus applied the patch.
>
> Thanks Ramsay.
>
> Best regards,
>
> Thomas
Heh, I just sent an improved patch to the mailing-list about
ten minutes ago. :-D (Well an improved commit message anyway.)
Luckily, I didn't attempt to push to the mob branch, since I
wanted to make sure there were no objections!
ATB,
Ramsay Jones