Benign repos download unavailable

bad-reg.rs

Rust asm! inline assembly macro
SHA-2560c78f8299b5f2e17d7b1176c6dabf837557edfa4140cebfc907bd63d82a72187
MaleculeH(Mg)

Evidence

Rust asm! inline assembly macro lines 5–23
⋯5 lines
10
11extern crate minicore;
12use minicore::*;
13
14fn main() {
15 let mut foo = 0;
16 let mut bar = 0;
17 unsafe {
18 // Bad register/register class
19
20 asm!("{}", in(foo) foo);
21 //~^ ERROR invalid register class `foo`: unknown register class
22 asm!("", in("foo") foo);
23 …
English function-word token "for" lines 25–27
25:2… //~^ ERROR invalid asm template modifier for this register class
26 asm!("{:r}", in(xmm_reg) foo);
27 //~^ ERROR invalid asm template m …
English function-word token "the" lines 32–35
32:29… oo);
33 //~^ ERROR invalid register `ebp`: the frame pointer cannot be used as an operand
34 asm!("", in("rsp") foo);
35 //~^ ERROR …
English function-word token "and" lines 39–41
39:29… e register `bl`: rbx is used internally by LLVM and cannot be used as an operand for inline asm
40 asm!("", in("bh") foo);
41 //~^ ERROR …
English function-word token "with" lines 44–47
44:94… output
45 //~| ERROR `i32` cannot be used with this register class
46 asm!("", in("mm0") foo);
47 //~^ ERROR register class `mmx_reg …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.