Parse operands properly and add a way to indicate volatile asm.

This commit is contained in:
Luqman Aden 2013-03-12 00:01:09 -07:00
parent 885d0d3d33
commit 5aa734d6a1
5 changed files with 145 additions and 18 deletions

View file

@ -1398,8 +1398,12 @@ pub fn print_expr(s: @ps, &&expr: @ast::expr) {
}
}
}
ast::expr_inline_asm(a, c) => {
word(s.s, ~"__asm__");
ast::expr_inline_asm(a, c, v) => {
if v {
word(s.s, ~"__volatile__ asm!");
} else {
word(s.s, ~"asm!");
}
popen(s);
print_string(s, *a);
word_space(s, ~",");