[llvm-commits] [llvm-gcc-4.2] r127187 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h

Bill Wendling isanbard at gmail.com
Mon Mar 7 15:06:24 PST 2011


On Mar 7, 2011, at 3:04 PM, Frits van Bommel wrote:

> On Mon, Mar 7, 2011 at 11:49 PM, Bill Wendling <isanbard at gmail.com> wrote:
>>  /* For parameters to an asm, check the constraint and use X86_mmx if an MMX
>>    register is called for.  "y" means an MMX register. */
>> -#define LLVM_ADJUST_MMX_INLINE_PARAMETER_TYPE(Constraint, LLVMTy) \
>> -  ((TARGET_MMX &&                                                 \
>> -    StringRef(Constraint).equals(StringRef(std::string("y")))) ?  \
>> -    Type::getX86_MMXTy(Context) : LLVMTy)
>> +#define LLVM_ADJUST_MMX_INLINE_PARAMETER_TYPE(Constraint, LLVMTy)       \
>> +  ((TARGET_MMX &&                                                       \
>> +    (StringRef(Constraint).equals(StringRef(std::string("y"))) ||       \
>> +     StringRef(Constraint).equals(StringRef(std::string("&y"))))) ?     \
>> +   Type::getX86_MMXTy(Context) : LLVMTy)
> 
> What's the point of using horrible expressions like
> '(StringRef(Constraint).equals(StringRef(std::string("y")))' instead
> of, say, '(StringRef(Constraint) == "y")'?

Obfuscation? :-)

I'll change it.

-bw





More information about the llvm-commits mailing list