rust/src
bors dc5ad5070d auto merge of #5359 : luqmana/rust/inline-asm, r=pcwalton
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.
2013-03-15 21:15:46 -07:00
..
compiletest auto merge of #5319 : brson/rust/debuginfo, r=brson 2013-03-13 11:34:00 -07:00
driver Added rust convenience tool similar to go's go tool 2013-02-18 23:11:08 +01:00
etc Increase tidy column limit to 100 2013-03-12 10:55:39 -07:00
libcore auto merge of #5404 : bstrie/rust/decopy, r=pcwalton 2013-03-15 20:15:44 -07:00
libfuzzer librustc: Don't accept as Trait anymore; fix all occurrences of it. 2013-03-13 20:07:09 -07:00
librust rustc: One Less Bad Copy 2013-03-12 10:04:35 -07:00
librustc Fix type_use for inline asm. 2013-03-15 18:57:19 -07:00
librustdoc rustdoc: Filter out private definitions. Closes #3538 2013-03-14 17:21:48 +10:00
librusti librustc: Don't accept as Trait anymore; fix all occurrences of it. 2013-03-13 20:07:09 -07:00
librustpkg librustc: Don't accept as Trait anymore; fix all occurrences of it. 2013-03-13 20:07:09 -07:00
libstd auto merge of #5404 : bstrie/rust/decopy, r=pcwalton 2013-03-15 20:15:44 -07:00
libsyntax auto merge of #5359 : luqmana/rust/inline-asm, r=pcwalton 2013-03-15 21:15:46 -07:00
libuv@218ab86721 Work around linkage bug cross-compiling from x86_64-apple-darwin to i686-apple-darwin 2013-03-12 21:01:40 -07:00
llvm@accc36b3e3 llvm: fork to disable LiveIRVariabes in GCStrategy. 2012-11-14 18:21:09 -08:00
rt auto merge of #5364 : xenocons/rust/patch-1, r=z0w0 2013-03-14 14:07:01 -07:00
rustllvm Normalize target triple so that llvm can recognize target os correctly 2013-03-15 15:39:58 +09:00
test Clonify some of run-pass 2013-03-15 18:27:15 -04:00
README.txt Rename cargo to rustpkg and start over fresh 2013-02-15 18:04:10 -08:00
snapshots.txt Register FreeBSD snapshot 2013-03-01 17:23:25 -08:00

This is a preliminary version of the Rust compiler, libraries and tools

Source layout:

librustc/          The self-hosted compiler

libcore/           The core library (imported and linked by default)
libstd/            The standard library (slightly more peripheral code)
libsyntax/         The Rust parser and pretty-printer

rt/                The runtime system
rt/rust_*.cpp      - The majority of the runtime services
rt/isaac           - The PRNG used for pseudo-random choices in the runtime
rt/bigint          - The bigint library used for the 'big' type
rt/uthash          - Small hashtable-and-list library for C, used in runtime
rt/sync            - Concurrency utils
rt/util            - Small utility classes for the runtime.
rt/vg              - Valgrind headers
rt/msvc            - MSVC support
rt/linenoise       - a readline-like line editing library

test/              Testsuite
test/compile-fail  - Tests that should fail to compile
test/run-fail      - Tests that should compile, run and fail
test/run-pass      - Tests that should compile, run and succeed
test/bench         - Benchmarks and miscellanea
test/pretty        - Pretty-printer tests
test/auxiliary     - Dependencies of tests

compiletest/       The test runner

librustpkg/        The package manager and build system

librusti/          The JIT REPL

librustdoc/        The Rust API documentation tool

llvm/              The LLVM submodule

libuv/             The libuv submodule

rustllvm/          LLVM support code

libfuzzer/         A collection of fuzz testers

etc/               Scripts, editor support, misc