tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] [workaround] unknown constraint 't'


From: Roy Tam
Subject: [Tinycc-devel] [workaround] unknown constraint 't'
Date: Tue, 6 Nov 2012 23:06:41 +0800

Hello all,

I'm hitting this old "bug" about "unknown constraint 't'" with the
inline assembly in math.h:
http://lists.gnu.org/archive/html/tinycc-devel/2007-07/msg00013.html

and I workaround it with this patch:

diff --git a/i386-asm.c b/i386-asm.c
index 664aade..1a24e30 100644
--- a/i386-asm.c
+++ b/i386-asm.c
@@ -1029,6 +1029,9 @@ static inline int constraint_priority(const char *str)
         case 'i':
         case 'm':
         case 'g':
+        case 'f':
+        case 't':
+        case 'u':
             pr = 4;
             break;
         default:
@@ -1211,6 +1214,11 @@ ST_FUNC void asm_compute_constraints(ASMOperand
*operands,
             if (!((op->vt->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST))
                 goto try_next;
             break;
+        case 'f':
+        case 't':
+        case 'u':
+            /* float */
+            break;
         case 'm':
         case 'g':
             /* nothing special to do because the operand is already in

HTH,
Roy



reply via email to

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