auto merge of #5593 : luqmana/rust/inline-asm, r=catamorphism

Clean things up a bit. Also, allow selecting intel syntax in addition to the default AT&T dialect.
This commit is contained in:
bors
2013-03-28 18:18:46 -07:00
11 changed files with 226 additions and 138 deletions

View File

@@ -593,10 +593,7 @@ pub enum expr_ {
expr_ret(Option<@expr>),
expr_log(@expr, @expr),
expr_inline_asm(@~str, // asm
~[(@~str, @expr)], // inputs
~[(@~str, @expr)], // outputs
@~str, bool, bool), // clobbers, volatile, align stack
expr_inline_asm(inline_asm),
expr_mac(mac),
@@ -930,6 +927,27 @@ impl to_bytes::IterBytes for Ty {
}
}
#[auto_encode]
#[auto_decode]
#[deriving(Eq)]
pub enum asm_dialect {
asm_att,
asm_intel
}
#[auto_encode]
#[auto_decode]
#[deriving(Eq)]
pub struct inline_asm {
asm: @~str,
clobbers: @~str,
inputs: ~[(@~str, @expr)],
outputs: ~[(@~str, @expr)],
volatile: bool,
alignstack: bool,
dialect: asm_dialect
}
#[auto_encode]
#[auto_decode]
#[deriving(Eq)]