1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/test/FrontendC/2010-05-18-asmsched.c
Duncan Sands e89d619d23 On i386, llvm-gcc cannot be assumed to support -m64. Since these
tests pass here (i686-linux and x86-64-linux) without -m64, simply
remove the -m64.

llvm-svn: 113483
2010-09-09 12:43:44 +00:00

18 lines
520 B
C

// RUN: %llvmgcc %s -c -O3 -emit-llvm -o - | llc -march=x86-64 -mtriple=x86_64-apple-darwin | FileCheck %s
// r9 used to be clobbered before its value was moved to r10. 7993104.
void foo(int x, int y) {
// CHECK: bar
// CHECK: movq %r9, %r10
// CHECK: movq %rdi, %r9
// CHECK: bar
register int lr9 asm("r9") = x;
register int lr10 asm("r10") = y;
int foo;
asm volatile("bar" : "=r"(lr9) : "r"(lr9), "r"(lr10));
foo = lr9;
lr9 = x;
lr10 = foo;
asm volatile("bar" : "=r"(lr9) : "r"(lr9), "r"(lr10));
}