2010-11-25 21:24:35 +00:00
|
|
|
// RUN: %llvmgcc %s -S -O3 -o - | llc -march=x86-64 -mtriple=x86_64-apple-darwin | FileCheck %s
|
2010-05-18 19:03:51 +00:00
|
|
|
// r9 used to be clobbered before its value was moved to r10. 7993104.
|
|
|
|
|
|
|
|
void foo(int x, int y) {
|
|
|
|
// CHECK: bar
|
2011-05-05 16:48:00 +00:00
|
|
|
// CHECK-NOT: {{, %r9$}}
|
|
|
|
// CHECK: movq %r9,
|
|
|
|
// CHECK: movq {{.*}}, %r9
|
2010-05-18 19:03:51 +00:00
|
|
|
// 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));
|
2010-09-09 12:43:44 +00:00
|
|
|
}
|