reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
// RUN: %clang_cc1 -triple i386-unknown-unknown -fasm-blocks -O0 -emit-llvm -S %s -o - | FileCheck %s
// REQUIRES: x86-registered-target

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

  __asm mov eax, ebx
  __asm const ("movl %ecx, %edx"); // expected-warning {{ignored const qualifier on asm}} 
  // CHECK: movl    %ebx, %eax
  // CHECK: movl    %ecx, %edx

  __asm volatile goto ("movl %ecx, %edx");
  // CHECK: movl    %ecx, %edx

  __asm mov eax, ebx
  __asm goto ("movl %ecx, %edx");
  // CHECK: movl    %ebx, %eax
  // CHECK: movl    %ecx, %edx
}