rollup merge of #17592 : kmcallister/inline-asm-loc

This commit is contained in:
Alex Crichton 2014-09-29 08:14:23 -07:00
commit 7784a8d397
14 changed files with 148 additions and 14 deletions

View file

@ -0,0 +1,20 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//
// compile-flags: -C codegen-units=2
// error-pattern: build without -C codegen-units for more exact errors
#![feature(asm)]
fn main() {
unsafe {
asm!("nowayisthisavalidinstruction");
}
}

View file

@ -0,0 +1,17 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(asm)]
fn main() {
unsafe {
asm!("nowayisthisavalidinstruction"); //~ ERROR invalid instruction mnemonic
}
}