2016-04-21 18:59:18 +08:00
|
|
|
// RUN: %clang_cc1 -triple i386-unknown-unknown -fasm-blocks -O0 -emit-llvm -S %s -o - | FileCheck %s
|
2016-04-21 22:40:06 +08:00
|
|
|
// REQUIRES: x86-registered-target
|
2016-04-21 18:59:18 +08:00
|
|
|
|
|
|
|
void f() {
|
|
|
|
__asm mov eax, ebx
|
|
|
|
__asm mov ebx, ecx
|
|
|
|
__asm__("movl %ecx, %edx");
|
|
|
|
// CHECK: movl %ebx, %eax
|
|
|
|
// CHECK: movl %ecx, %ebx
|
|
|
|
// CHECK: movl %ecx, %edx
|
|
|
|
|
|
|
|
__asm mov eax, ebx
|
|
|
|
__asm volatile ("movl %ecx, %edx");
|
|
|
|
// CHECK: movl %ebx, %eax
|
|
|
|
// CHECK: movl %ecx, %edx
|
|
|
|
|
2019-06-03 23:57:25 +08:00
|
|
|
__asm volatile goto ("movl %ecx, %edx");
|
|
|
|
// CHECK: movl %ecx, %edx
|
2016-04-21 18:59:18 +08:00
|
|
|
|
|
|
|
__asm mov eax, ebx
|
2019-06-03 23:57:25 +08:00
|
|
|
__asm goto ("movl %ecx, %edx");
|
|
|
|
// CHECK: movl %ebx, %eax
|
|
|
|
// CHECK: movl %ecx, %edx
|
2016-04-21 18:59:18 +08:00
|
|
|
}
|