150
|
1 // REQUIRES: x86-registered-target
|
|
2 // RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s --check-prefix=DARWIN
|
|
3 // RUN: %clang_cc1 %s -triple i686-pc-win32 -fasm-blocks -emit-llvm -o - | FileCheck %s --check-prefix=WINDOWS
|
|
4
|
|
5 // On Windows, .align is in bytes, and on Darwin, .align is in log2 form. The
|
|
6 // Intel inline assembly parser should rewrite to the appropriate form depending
|
|
7 // on the platform.
|
|
8
|
|
9 void align_test() {
|
|
10 __asm align 8
|
|
11 __asm align 16;
|
|
12 __asm align 128;
|
|
13 __asm ALIGN 256;
|
|
14 }
|
|
15
|
207
|
16 // DARWIN-LABEL: define{{.*}} void @align_test()
|
150
|
17 // DARWIN: call void asm sideeffect inteldialect
|
|
18 // DARWIN-SAME: .align 3
|
|
19 // DARWIN-SAME: .align 4
|
|
20 // DARWIN-SAME: .align 7
|
|
21 // DARWIN-SAME: .align 8
|
|
22 // DARWIN-SAME: "~{dirflag},~{fpsr},~{flags}"()
|
|
23
|
|
24 // WINDOWS-LABEL: define dso_local void @align_test()
|
|
25 // WINDOWS: call void asm sideeffect inteldialect
|
|
26 // WINDOWS-SAME: .align 8
|
|
27 // WINDOWS-SAME: .align 16
|
|
28 // WINDOWS-SAME: .align 128
|
|
29 // WINDOWS-SAME: .align 256
|
|
30 // WINDOWS-SAME: "~{dirflag},~{fpsr},~{flags}"()
|