gcc/testsuite/ChangeLog:
* rust/execute/torture/inline_asm_mov_x_5.rs: Move to...
* rust/execute/torture/inline_asm_mov_x_5_ARM.rs: ...here.
* rust/execute/torture/inline_asm_mov_x_5_x86_64.rs: New test.
+/* { dg-do run { target arm*-*-* } } */
/* { dg-output "5\r*\n" }*/
#![feature(rustc_attrs)]
--- /dev/null
+/* { dg-do run { target x86_64*-*-* } } */
+/* { dg-output "5\r*\n" }*/
+
+#![feature(rustc_attrs)]
+#[rustc_builtin_macro]
+macro_rules! asm {
+ () => {};
+}
+
+extern "C" {
+ fn printf(s: *const i8, ...);
+}
+
+fn main() -> i32 {
+ let mut _x: i32 = 0;
+ unsafe {
+ asm!(
+ "mov $5, {}",
+ out(reg) _x
+ );
+ printf("%d\n\0" as *const str as *const i8, _x);
+ }
+ 0
+}