Fix some prototypes, and implement some builtins until we have our header files completed.

llvm-svn: 51199
This commit is contained in:
Nate Begeman 2008-05-16 18:59:42 +00:00
parent c812b23ce8
commit 9800faa578
2 changed files with 7 additions and 4 deletions

View File

@ -406,11 +406,11 @@ BUILTIN(__builtin_ia32_vec_ext_v2df, "dV2di", "")
BUILTIN(__builtin_ia32_vec_ext_v2di, "LLiV2LLii", "")
BUILTIN(__builtin_ia32_vec_ext_v4sf, "fV4fi", "")
BUILTIN(__builtin_ia32_vec_ext_v4si, "iV4ii", "")
BUILTIN(__builtin_ia32_vec_ext_v8hi, "v", "")
BUILTIN(__builtin_ia32_vec_ext_v4hi, "v", "")
BUILTIN(__builtin_ia32_vec_ext_v8hi, "UsV8si", "")
BUILTIN(__builtin_ia32_vec_ext_v4hi, "sV4si", "")
BUILTIN(__builtin_ia32_vec_ext_v2si, "iV2ii", "")
BUILTIN(__builtin_ia32_vec_set_v8hi, "v", "")
BUILTIN(__builtin_ia32_vec_set_v4hi, "v", "")
BUILTIN(__builtin_ia32_vec_set_v8hi, "V8sV8ssi", "")
BUILTIN(__builtin_ia32_vec_set_v4hi, "V4sv4ssi", "")
// Apple local SSE builtins? These are probably not needed eventually, but are
// in the apple-gcc xmmintrin.h file (rdar://4099020).

View File

@ -792,6 +792,9 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,
return Builder.CreateBitCast(Ops[0],
llvm::VectorType::get(llvm::Type::Int32Ty, 4));
}
case X86::BI__builtin_ia32_vec_set_v4hi:
case X86::BI__builtin_ia32_vec_set_v8hi:
return Builder.CreateInsertElement(Ops[0], Ops[1], Ops[2], "pinsrw");
case X86::BI__builtin_ia32_andps:
case X86::BI__builtin_ia32_andpd:
case X86::BI__builtin_ia32_andnps: