diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-19 23:03:58 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-19 23:03:58 +0000 |
commit | 8f5cf74c77e65847201cb7d0c894d2f7b78366be (patch) | |
tree | ceaf5459645a5b921ba48f56c0fa7c23c245b3be /clang/lib/CodeGen/TargetInfo.cpp | |
parent | 29eb47bd685d65d824e1c8fa303b8a1e8c6af39b (diff) | |
download | bcm5719-llvm-8f5cf74c77e65847201cb7d0c894d2f7b78366be.tar.gz bcm5719-llvm-8f5cf74c77e65847201cb7d0c894d2f7b78366be.zip |
Re-instate r125819 and r125820 with no functionality change
llvm-svn: 126060
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 881a7ee4d04..d74b3f32d95 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -355,6 +355,14 @@ bool UseX86_MMXType(const llvm::Type *IRType) { IRType->getScalarSizeInBits() != 64; } +static const llvm::Type* X86AdjustInlineAsmType(CodeGen::CodeGenFunction &CGF, + llvm::StringRef Constraint, + const llvm::Type* Ty) { + if (Constraint=="y" && Ty->isVectorTy()) + return llvm::Type::getX86_MMXTy(CGF.getLLVMContext()); + return Ty; +} + //===----------------------------------------------------------------------===// // X86-32 ABI Implementation //===----------------------------------------------------------------------===// @@ -415,6 +423,13 @@ public: bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const; + + const llvm::Type* adjustInlineAsmType(CodeGen::CodeGenFunction &CGF, + llvm::StringRef Constraint, + const llvm::Type* Ty) const { + return X86AdjustInlineAsmType(CGF, Constraint, Ty); + } + }; } @@ -895,6 +910,13 @@ public: return false; } + + const llvm::Type* adjustInlineAsmType(CodeGen::CodeGenFunction &CGF, + llvm::StringRef Constraint, + const llvm::Type* Ty) const { + return X86AdjustInlineAsmType(CGF, Constraint, Ty); + } + }; class WinX86_64TargetCodeGenInfo : public TargetCodeGenInfo { |