From 4f6c03e24394131f2cd50eab8002cf40274cbf0d Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Wed, 26 Jul 2017 09:58:17 +0000 Subject: [PATCH] Add Vector Compare Bounds Floating-Point --- src/etc/platform-intrinsics/powerpc.json | 10 +++++++++- src/librustc_platform_intrinsics/powerpc.rs | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/etc/platform-intrinsics/powerpc.json b/src/etc/platform-intrinsics/powerpc.json index 34a4dea7744..32648c96e4c 100644 --- a/src/etc/platform-intrinsics/powerpc.json +++ b/src/etc/platform-intrinsics/powerpc.json @@ -4,7 +4,8 @@ "llvm_prefix": "llvm.ppc.altivec.", "number_info": { "unsigned": {}, - "signed": {} + "signed": {}, + "float": {} }, "width_info": { "128": { "width": "" } @@ -23,6 +24,13 @@ "llvm": "vmhraddshs", "ret": "s16", "args": ["0", "0", "0"] + }, + { + "intrinsic": "cmpb", + "width": [128], + "llvm": "vcmpbfp", + "ret": "s32", + "args": ["f32", "f32"] } ] } diff --git a/src/librustc_platform_intrinsics/powerpc.rs b/src/librustc_platform_intrinsics/powerpc.rs index 90e95ec6ae1..e2c5a203495 100644 --- a/src/librustc_platform_intrinsics/powerpc.rs +++ b/src/librustc_platform_intrinsics/powerpc.rs @@ -32,6 +32,11 @@ pub fn find(name: &str) -> Option { output: &::I16x8, definition: Named("llvm.ppc.altivec.vmhraddshs") }, + "_vec_cmpb" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::F32x4, &::F32x4]; &INPUTS }, + output: &::I32x4, + definition: Named("llvm.ppc.altivec.vcmpbfp") + }, _ => return None, }) }