auto merge of #5317 : luqmana/rust/inline-asm, r=graydon
```Rust #[cfg(target_os = "macos")] fn helloworld() { unsafe { asm!(".pushsection __RODATA, __rodata msg: .asciz \"Hello World!\" .popsection movq msg@GOTPCREL(%rip), %rdi call _puts"); } } #[cfg(target_os = "linux")] fn helloworld() { unsafe { asm!(".pushsection .rodata msg: .asciz \"Hello World!\" .popsection movq msg@GOTPCREL(%rip), %rdi call puts"); } } fn main() { helloworld(); } ``` ``` % rustc foo.rs % ./foo Hello World! ```
Showing
src/libsyntax/ext/asm.rs
0 → 100644
想要评论请 注册 或 登录