Add support for the VSX and Altivec features on PowerPC

This commit is contained in:
Luca Barbato 2017-07-23 00:16:43 +00:00
parent e185c6c3d3
commit bae663b236

View File

@ -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<Symbol> {
let target_machine = create_target_machine(sess);
@ -87,6 +89,7 @@ pub fn target_features(sess: &Session) -> Vec<Symbol> {
"arm" => ARM_WHITELIST,
"x86" | "x86_64" => X86_WHITELIST,
"hexagon" => HEXAGON_WHITELIST,
"powerpc" | "powerpc64" => POWERPC_WHITELIST,
_ => &[],
};