From 8fb0bcb56f4d176b859025431578410d5b2af677 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Fri, 4 Aug 2017 00:19:58 +0000 Subject: [PATCH] Add support for Vector Reciprocal Estimate Float on PowerPC --- src/etc/platform-intrinsics/powerpc.json | 7 +++++++ src/librustc_platform_intrinsics/powerpc.rs | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/src/etc/platform-intrinsics/powerpc.json b/src/etc/platform-intrinsics/powerpc.json index 49c9c3714fc..e8b1e5bda69 100644 --- a/src/etc/platform-intrinsics/powerpc.json +++ b/src/etc/platform-intrinsics/powerpc.json @@ -247,6 +247,13 @@ "llvm": "vlogefp", "ret": "f32", "args": ["0"] + }, + { + "intrinsic": "re", + "width": [128], + "llvm": "vrefp", + "ret": "f32", + "args": ["0"] } ] } diff --git a/src/librustc_platform_intrinsics/powerpc.rs b/src/librustc_platform_intrinsics/powerpc.rs index e336b45da80..7e0ceb8acc8 100644 --- a/src/librustc_platform_intrinsics/powerpc.rs +++ b/src/librustc_platform_intrinsics/powerpc.rs @@ -417,6 +417,11 @@ pub fn find(name: &str) -> Option { output: &::F32x4, definition: Named("llvm.ppc.altivec.vlogefp") }, + "_vec_re" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS }, + output: &::F32x4, + definition: Named("llvm.ppc.altivec.vrefp") + }, _ => return None, }) }