diff options
| author | Anders Carlsson <andersca@mac.com> | 2007-12-09 21:51:19 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2007-12-09 21:51:19 +0000 |
| commit | 8e1d8cf241073b81e9089ae89a53e28b101a1334 (patch) | |
| tree | 0c24634a0e87f0281ca02247665140bd1de70868 | |
| parent | a020c430342bbfd2af472da5f0e3f35ebab15fd7 (diff) | |
| download | bcm5719-llvm-8e1d8cf241073b81e9089ae89a53e28b101a1334.tar.gz bcm5719-llvm-8e1d8cf241073b81e9089ae89a53e28b101a1334.zip | |
Implement __builtin_ia32_mulps.
llvm-svn: 44745
| -rw-r--r-- | clang/CodeGen/CGBuiltin.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/CodeGen/CGBuiltin.cpp b/clang/CodeGen/CGBuiltin.cpp index 14e13e6ffce..7f3bd0ad319 100644 --- a/clang/CodeGen/CGBuiltin.cpp +++ b/clang/CodeGen/CGBuiltin.cpp @@ -80,6 +80,15 @@ RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) { return RValue::get(V); } + if (strcmp(TargetPrefix, "x86") == 0) { + if (strcmp(BuiltinName, "__builtin_ia32_mulps") == 0) { + llvm::Value *V = Builder.CreateMul(EmitScalarExpr(E->getArg(0)), + EmitScalarExpr(E->getArg(1)), + "result"); + return RValue::get(V); + } + } + WarnUnsupported(E, "builtin function"); // Unknown builtin, for now just dump it out and return undef. @@ -179,6 +188,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) { llvm::Value *V = llvm::ConstantFP::get(llvm::Type::DoubleTy, f); return RValue::get(V); } + } return RValue::get(0); |

