[cfe-commits] r114349 - /cfe/trunk/include/clang/Basic/BuiltinsX86.def

Dale Johannesen dalej at apple.com
Tue Sep 21 10:23:10 PDT 2010


On Sep 20, 2010, at 6:07 PMPDT, Chris Lattner wrote:
> On Sep 20, 2010, at 6:02 PM, Eric Christopher wrote:
> 
>>> @@ -37,6 +38,7 @@
>>> BUILTIN(__builtin_ia32_psubb, "V8cV8cV8c", "")
>>> BUILTIN(__builtin_ia32_psubw, "V4sV4sV4s", "")
>>> BUILTIN(__builtin_ia32_psubd, "V2iV2iV2i", "")
>>> +BUILTIN(__builtin_ia32_psubq, "V1LLiV1LLiV1LLi", "")
>>> BUILTIN(__builtin_ia32_psubsb, "V8cV8cV8c", "")
>>> BUILTIN(__builtin_ia32_psubsw, "V4sV4sV4s", "")
>>> BUILTIN(__builtin_ia32_psubusb, "V8cV8cV8c", "")
>> 
>> These were missing largely because the functionality works with '-' or '+' on the
>> representative types and we'd not been adding them in cases where they were
>> missing since the intel intrinsics are the ones that we want people using.
>> 
>> That said it looks like we've got a lot of them already.
> 
> We're intentionally violating that model with MMX: we don't want generic vectors mapping onto mmx anymore.

I don't think that's what we should be trying to do.   Representing all MMX operations as intrinsics internally in the IR is one thing, a good idea.  We shouldn't be changing the user interface though, this feature has worked for around 10 years in gcc and is documented.  Better is to have the FEs emit intrinsic calls for infix operations on MMX types, where such intrinsics exist.  The operators documented to work are + - * / & | ^ ~  unary-
There are no instructions corresponding to / or some *s, but the rest should be easy enough.

We can probably postpone this until basic functionality is in, though, and see how loud the screams are.  Things should functionally work without doing this.





More information about the cfe-commits mailing list