tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] __asm__ "unknown constraint 't'" issue


From: Roy Tam
Subject: Re: [Tinycc-devel] __asm__ "unknown constraint 't'" issue
Date: Wed, 6 Aug 2014 18:40:19 +0800

Hello,

2014-08-06 18:27 GMT+08:00 YX Hao <address@hidden>:
> Hi there,
>
> Here is what I found:
>
> ----------------------------------------
> math.h:341: error: unknown constraint 't'
> ----------------------------------------
>
> And more around this line.
>
> I know little about asm. Can somebody take a look at it?
>

I have a little patch for that, someone please review it.
Thank you.

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



reply via email to

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