From 7bdf013a0ef9c6fa96bc39c54c03baf815093692 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 Negative Multiply Subtract 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 7f33eeb2b22..acb6813887c 100644 --- a/src/etc/platform-intrinsics/powerpc.json +++ b/src/etc/platform-intrinsics/powerpc.json @@ -227,6 +227,13 @@ "ret": "f32", "args": ["0", "0", "0"] }, + { + "intrinsic": "nmsub", + "width": [128], + "llvm": "vnmsubfp", + "ret": "f32", + "args": ["0", "0", "0"] + }, { "intrinsic": "expte", "width": [128], diff --git a/src/librustc_platform_intrinsics/powerpc.rs b/src/librustc_platform_intrinsics/powerpc.rs index 30d76507b0c..93ee9fe06da 100644 --- a/src/librustc_platform_intrinsics/powerpc.rs +++ b/src/librustc_platform_intrinsics/powerpc.rs @@ -402,6 +402,11 @@ pub fn find(name: &str) -> Option { output: &::F32x4, definition: Named("llvm.ppc.altivec.vmaddfp") }, + "_vec_nmsub" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 3] = [&::F32x4, &::F32x4, &::F32x4]; &INPUTS }, + output: &::F32x4, + definition: Named("llvm.ppc.altivec.vnmsubfp") + }, "_vec_expte" => Intrinsic { inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS }, output: &::F32x4,