- 19 3月, 2013 2 次提交
-
-
由 Niko Matsakis 提交于
(this will be needed for snapshotting at some point).
-
由 bors 提交于
Came back to look at rust and found out that this had been broken by some refactoring work. Fixed and now has tests.
-
- 18 3月, 2013 1 次提交
-
-
由 Stefan Plantikow 提交于
-
- 17 3月, 2013 6 次提交
-
-
由 bors 提交于
-
由 Zack Corr 提交于
-
由 bors 提交于
r? @thestinger
-
由 Brian Anderson 提交于
-
由 bors 提交于
Fixes #5341
-
由 Brian Anderson 提交于
-
- 16 3月, 2013 28 次提交
-
-
由 Zack Corr 提交于
-
由 bors 提交于
The chunk fix is cherry picked from @graydon's `gc` branch.
-
由 bors 提交于
Continuation of #5317. Actually use operands properly now, including any number of output operands. Which means you can do things like call printf: ```Rust fn main() { unsafe { do str::as_c_str(~"The answer is %d.\n") |c| { let a = 42; asm!("mov $0, %rdi\n\t\ mov $1, %rsi\n\t\ xorl %eax, %eax\n\t\ call _printf" : : "r"(c), "r"(a) : "rdi", "rsi", "eax" : "volatile","alignstack" ); } } } ``` ``` % rustc foo.rs % ./foo The answer is 42. ``` Or just add 2 numbers: ```Rust fn add(a: int, b: int) -> int { let mut c = 0; unsafe { asm!("add $2, $0" : "=r"(c) : "0"(a), "r"(b) ); } c } fn main() { io::println(fmt!("%d", add(1, 2))); } ``` ``` % rustc foo.rs % ./foo 3 ``` Multiple outputs! ```Rust fn addsub(a: int, b: int) -> (int, int) { let mut c = 0; let mut d = 0; unsafe { asm!("add $4, $0\n\t\ sub $4, $1" : "=r"(c), "=r"(d) : "0"(a), "1"(a), "r"(b) ); } (c, d) } fn main() { io::println(fmt!("%?", addsub(5, 1))); } ``` ``` % rustc foo.rs % ./foo (6, 4) ``` This also classifies inline asm as RvalueStmtExpr instead of the somewhat arbitrary kind I made it initially. There are a few XXX's regarding what to do in the liveness and move passes.
-
由 bors 提交于
Also turn `copy` into `.clone()` in much of run-pass.
-
由 Luqman Aden 提交于
-
由 Luqman Aden 提交于
-
由 Luqman Aden 提交于
-
由 Luqman Aden 提交于
-
由 Luqman Aden 提交于
-
由 Luqman Aden 提交于
-
由 Luqman Aden 提交于
-
由 Luqman Aden 提交于
-
由 Luqman Aden 提交于
-
由 Daniel Micay 提交于
-
由 bors 提交于
-
由 Graydon Hoare 提交于
-
由 Daniel Micay 提交于
-
由 bors 提交于
Add a conditional compile option for android
-
由 bors 提交于
r? I want to use this function as a method. There's probably a better way to design this but the existing `ToBytes` trait is not what I am looking for (it has a parameter to indicate the byte order).
-
由 Ben Striegel 提交于
-
由 Ben Striegel 提交于
-
由 bors 提交于
r? @nikomatsakis r? @erickt Before this change, encoding an object containing a codemap::span using the JSON encodeng produced invalid JSON, for instance: [{"span":,"global":false,"idents":["abc"]}] Since the decoder for codemap::span's ignores its argument, I conjecture that this will not damage decoding, and should improve it for many decoders.
-
由 bors 提交于
LLVM could not recognize target-os when target-triple was given as like 'arm-linux-androideabi'. Normalizing target-triple fill the missing elements. In the case of 'arm-linux-androideabi', nomalized target-triple will be "arm-unknown-linux-androideabi" and this let llvm recognize the triple correctly. (arch: arm, vendor: unknown, os: linux, environment: android)
-
由 Daniel Micay 提交于
-
由 Daniel Micay 提交于
-
由 Daniel Micay 提交于
-
由 bors 提交于
-
由 John Clements 提交于
-
- 15 3月, 2013 3 次提交
-
-
由 John Clements 提交于
-
由 John Clements 提交于
Before this change, encoding an object containing a codemap::span using the JSON encodeng produced invalid JSON, for instance: [{"span":,"global":false,"idents":["abc"]}] Since the decoder for codemap::span's ignores its argument, I conjecture that this will not damage decoding, and should improve it for many decoders.
-
由 ILyoan 提交于
-