Created
November 28, 2015 10:19
-
-
Save hyunsik/7fa689200ee5ee6ecf3d to your computer and use it in GitHub Desktop.
LLVM Intrinsics using Rust feature gate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(link_llvm_intrinsics)] | |
extern { | |
#[link_name = “llvm.sqrt.f32”] | |
fn sqrt(x: f32) -> f32; | |
} | |
fn main(){ | |
unsafe { sqrt(32.0f32); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment