Skip to content

Commit bae663b

Browse files
committed
Add support for the VSX and Altivec features on PowerPC
1 parent e185c6c commit bae663b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc_trans/llvm_util.rs

+3
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,16 @@ const X86_WHITELIST: &'static [&'static str] = &["avx\0", "avx2\0", "bmi\0", "bm
8080

8181
const HEXAGON_WHITELIST: &'static [&'static str] = &["hvx\0", "hvx-double\0"];
8282

83+
const POWERPC_WHITELIST: &'static [&'static str] = &["altivec\0", "vsx\0"];
84+
8385
pub fn target_features(sess: &Session) -> Vec<Symbol> {
8486
let target_machine = create_target_machine(sess);
8587

8688
let whitelist = match &*sess.target.target.arch {
8789
"arm" => ARM_WHITELIST,
8890
"x86" | "x86_64" => X86_WHITELIST,
8991
"hexagon" => HEXAGON_WHITELIST,
92+
"powerpc" | "powerpc64" => POWERPC_WHITELIST,
9093
_ => &[],
9194
};
9295

0 commit comments

Comments
 (0)