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

Frits van Bommel fvbommel at gmail.com
Mon Mar 7 15:04:12 PST 2011


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")'?




More information about the llvm-commits mailing list