diff options
| author | bors <bors@rust-lang.org> | 2013-03-12 07:51:54 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-03-12 07:51:54 -0700 |
| commit | 34aaf350c2c38435a3b20d454b17f8fbbd2a1d8a (patch) | |
| tree | 080d38a2c80450e956bffb75267deb1a114fed2e /src/rt/rust_env.cpp | |
| parent | 014620af902c4798ede78462b2d0e3b749fb2fff (diff) | |
| parent | 18b71a78314505b4dd3816f9662709860aafaf4c (diff) | |
| download | rust-34aaf350c2c38435a3b20d454b17f8fbbd2a1d8a.tar.gz rust-34aaf350c2c38435a3b20d454b17f8fbbd2a1d8a.zip | |
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!
```
Diffstat (limited to 'src/rt/rust_env.cpp')
0 files changed, 0 insertions, 0 deletions
