From 9abc80f6b3e91dfeac63027919b9eb75b9ddb00d Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sat, 25 Mar 2006 01:35:17 +0000 Subject: [PATCH] X86 SSE1 conversion operations intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27097 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Intrinsics.td | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td index 7b239685014..0aeb10817ea 100644 --- a/include/llvm/Intrinsics.td +++ b/include/llvm/Intrinsics.td @@ -79,6 +79,7 @@ def llvm_ptr_ty : LLVMType; // sbyte* def llvm_ptrptr_ty : LLVMType; // sbyte** def llvm_descriptor_ty : LLVMType; // global* +def llvm_v2i32_ty : LLVMPackedType; // 2 x int def llvm_v4i32_ty : LLVMPackedType; // 4 x int def llvm_v4f32_ty : LLVMPackedType; // 4 x float def llvm_v2f64_ty : LLVMPackedType; // 2 x double @@ -375,7 +376,7 @@ let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". llvm_v4f32_ty], [InstrNoMem]>; } -// Comparisons +// Comparison let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_sse_cmpeqss : GCCBuiltin<"__builtin_ia32_cmpeqss">, Intrinsic<[llvm_float_ty, llvm_float_ty, @@ -592,6 +593,38 @@ let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". llvm_float_ty], [InstrNoMem]>; } + +// Conversion +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_sse_cvtss2si : GCCBuiltin<"__builtin_ia32_cvtss2si">, + Intrinsic<[llvm_int_ty, llvm_float_ty], [InstrNoMem]>; +} + +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_sse_cvtps2pi : GCCBuiltin<"__builtin_ia32_cvtps2pi">, + Intrinsic<[llvm_v2i32_ty, llvm_v4i32_ty], [InstrNoMem]>; +} + +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_sse_cvttss2si : GCCBuiltin<"__builtin_ia32_cvttss2si">, + Intrinsic<[llvm_int_ty, llvm_float_ty], [InstrNoMem]>; +} + +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_sse_cvttps2pi : GCCBuiltin<"__builtin_ia32_cvttps2pi">, + Intrinsic<[llvm_v2i32_ty, llvm_v4i32_ty], [InstrNoMem]>; +} + +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_sse_cvtsi2ss : GCCBuiltin<"__builtin_ia32_cvtsi2ss">, + Intrinsic<[llvm_float_ty, llvm_int_ty], [InstrNoMem]>; +} + +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_sse_cvtpi2ps : GCCBuiltin<"__builtin_ia32_cvtpi2ps">, + Intrinsic<[llvm_v4f32_ty, llvm_v2i32_ty], [InstrNoMem]>; +} + let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_sse_movmskps : GCCBuiltin<"__builtin_ia32_movmskps">, Intrinsic<[llvm_int_ty, llvm_v4f32_ty], [InstrNoMem]>; -- 2.34.1