tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] self-compilation of tinycc0.9.18 (bug for libtcc1.c)


From: Basile STARYNKEVITCH
Subject: [Tinycc-devel] self-compilation of tinycc0.9.18 (bug for libtcc1.c)
Date: Fri, 18 Apr 2003 10:48:50 +0200

Dear All

Self compilation of tinycc 0.9.18 fails for libtcc1.c

  ./tcc_g -c libtcc1.c
gives
  libtcc1.c:334: unknown constraint '%'

Apparently the % sign (commutativity flag) in __asm__ for umul_ppmm is
not handled. Removing the % chararacter in line 123 of libtcc1.c
(inside macro umul_ppmm) seems to cure the problem.

Here is the trivial diff:
################################################################
Index: libtcc1.c
===================================================================
RCS file: /cvsroot/tinycc/tinycc/libtcc1.c,v
retrieving revision 1.3
diff -c -r1.3 libtcc1.c
*** libtcc1.c   13 Apr 2003 14:35:27 -0000      1.3
--- libtcc1.c   18 Apr 2003 08:47:52 -0000
***************
*** 120,126 ****
    __asm__ ("mull %3"                                                  \
           : "=a" ((USItype) (w0)),                                     \
             "=d" ((USItype) (w1))                                      \
!          : "%0" ((USItype) (u)),                                      \
             "rm" ((USItype) (v)))
  #define udiv_qrnnd(q, r, n1, n0, dv) \
    __asm__ ("divl %4"                                                  \
--- 120,126 ----
    __asm__ ("mull %3"                                                  \
           : "=a" ((USItype) (w0)),                                     \
             "=d" ((USItype) (w1))                                      \
!          : "0" ((USItype) (u)),                                       \
             "rm" ((USItype) (v)))
  #define udiv_qrnnd(q, r, n1, n0, dv) \
    __asm__ ("divl %4"                                                  \

################################################################


-- 

Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile<at>starynkevitch<dot>net 
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Faïencerie, 92340 Bourg La Reine, France




reply via email to

[Prev in Thread] Current Thread [Next in Thread]