From bae663b23600105b578812614483460ef2912a90 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Sun, 23 Jul 2017 00:16:43 +0000 Subject: [PATCH] Add support for the VSX and Altivec features on PowerPC --- src/librustc_trans/llvm_util.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/librustc_trans/llvm_util.rs b/src/librustc_trans/llvm_util.rs index 15f56036b0c..99ab1c47bed 100644 --- a/src/librustc_trans/llvm_util.rs +++ b/src/librustc_trans/llvm_util.rs @@ -80,6 +80,8 @@ const X86_WHITELIST: &'static [&'static str] = &["avx\0", "avx2\0", "bmi\0", "bm const HEXAGON_WHITELIST: &'static [&'static str] = &["hvx\0", "hvx-double\0"]; +const POWERPC_WHITELIST: &'static [&'static str] = &["altivec\0", "vsx\0"]; + pub fn target_features(sess: &Session) -> Vec { let target_machine = create_target_machine(sess); @@ -87,6 +89,7 @@ pub fn target_features(sess: &Session) -> Vec { "arm" => ARM_WHITELIST, "x86" | "x86_64" => X86_WHITELIST, "hexagon" => HEXAGON_WHITELIST, + "powerpc" | "powerpc64" => POWERPC_WHITELIST, _ => &[], };