[cfe-dev] Inline assembly Z constraint and more

John Thompson john.thompson.jtsoftware at gmail.com
Fri Apr 16 19:20:38 PDT 2010


Oh, sorry, I forgot to hit the save button in the editor.  It's just one
file:

Index: lib/Basic/TargetInfo.cpp
===================================================================
--- lib/Basic/TargetInfo.cpp (revision 101528)
+++ lib/Basic/TargetInfo.cpp (working copy)
@@ -280,6 +280,8 @@
       Info.setAllowsRegister();
       Info.setAllowsMemory();
       break;
+    case 'Z': // wish I knew what Z was for...
+      break;
     }

     Name++;
@@ -359,6 +361,14 @@
     case 'N':
     case 'O':
     case 'P':
+    case 'Q':
+    case 'R':
+    case 'S':
+    case 'T':
+    case 'U':
+    case 'W':
+    case 'Y':
+    case 'Z':
       break;
     case 'r': // general register.
       Info.setAllowsRegister();
I don't know if it's target-specific or not.  The gcc comment makes it seem
generic (register indexed memory), but I couldn't find any docs that
mentioned it.

-John

On Fri, Apr 16, 2010 at 4:38 PM, Chris Lattner <clattner at apple.com> wrote:

>
> On Apr 16, 2010, at 3:53 PM, John Thompson wrote:
>
> > Using Clang to compile some PS3 headers, I ran into a problem with some
> inline assembly for some instrinsics macros with an unrecognized "Z"
> constraint.  Looking at the gcc sources, I see there are several other
> constraints not currently supported.  The enclosed macro lets them get
> through the parser, but at present I have no idea how to actually implement
> them, so before I look into it more, I thought I'd ask.  Can someone help me
> out?
> >
> > This from the gcc sources:
> >
> > (define_memory_constraint "Z"
> >   "Memory operand that is an indexed or indirect from a register (it is
> > usually better to use @samp{m} or @samp{es} in @code{asm} statements)"
> >   (match_operand 0 "indexed_or_indirect_operand"))
> > Is it okay to check in the patch as an intermediate step?
> >
>
> it Z a target independent or target-specific constraint?  You have some
> unrelated changes in your diff.
>
> -Chris
>
>


-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100416/e7f499ce/attachment.html>


More information about the cfe-dev mailing list