diff options
| author | bors <bors@rust-lang.org> | 2014-03-13 18:41:35 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-13 18:41:35 -0700 |
| commit | 98fa0f89b1cd406594bedc5803a1b6db53990a15 (patch) | |
| tree | b36eb4e868e24d2b8880e88870cef74df9d2f3a9 /src/rustllvm/ExecutionEngineWrapper.cpp | |
| parent | b4d324334cb48198c27d782002d75eba14a6abde (diff) | |
| parent | 2a1bd2ff9f9039df4b3c0158eac3589a222a2833 (diff) | |
| download | rust-98fa0f89b1cd406594bedc5803a1b6db53990a15.tar.gz rust-98fa0f89b1cd406594bedc5803a1b6db53990a15.zip | |
auto merge of #12798 : pczarn/rust/inline-asm, r=alexcrichton
## read+write modifier '+'
This small sugar was left out in the original implementation (#5359).
When an output operand with the '+' modifier is encountered, we store the index of that operand alongside the expression to create and append an input operand later. The following lines are equivalent:
```
asm!("" : "+m"(expr));
asm!("" : "=m"(expr) : "0"(expr));
```
## misplaced options and clobbers give a warning
It's really annoying when a small typo might change behavior without any warning.
```
asm!("mov $1, $0" : "=r"(x) : "r"(8u) : "cc" , "volatile");
//~^ WARNING expected a clobber, but found an option
```
## liveness
Fixed incorrect order of propagation.
Sometimes it caused spurious warnings in code: `warning: value assigned to `i` is never read, #[warn(dead_assignment)] on by default`
~~Note: Rebased on top of another PR. (uses other changes)~~
* [x] Implement read+write
* [x] Warn about misplaced options
* [x] Fix liveness (`dead_assignment` lint)
* [x] Add all tests
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
