annotate clang/test/CodeGen/ms-inline-asm-align.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // REQUIRES: x86-registered-target
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s --check-prefix=DARWIN
anatofuz
parents:
diff changeset
3 // RUN: %clang_cc1 %s -triple i686-pc-win32 -fasm-blocks -emit-llvm -o - | FileCheck %s --check-prefix=WINDOWS
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 // On Windows, .align is in bytes, and on Darwin, .align is in log2 form. The
anatofuz
parents:
diff changeset
6 // Intel inline assembly parser should rewrite to the appropriate form depending
anatofuz
parents:
diff changeset
7 // on the platform.
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 void align_test() {
anatofuz
parents:
diff changeset
10 __asm align 8
anatofuz
parents:
diff changeset
11 __asm align 16;
anatofuz
parents:
diff changeset
12 __asm align 128;
anatofuz
parents:
diff changeset
13 __asm ALIGN 256;
anatofuz
parents:
diff changeset
14 }
anatofuz
parents:
diff changeset
15
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
16 // DARWIN-LABEL: define{{.*}} void @align_test()
150
anatofuz
parents:
diff changeset
17 // DARWIN: call void asm sideeffect inteldialect
anatofuz
parents:
diff changeset
18 // DARWIN-SAME: .align 3
anatofuz
parents:
diff changeset
19 // DARWIN-SAME: .align 4
anatofuz
parents:
diff changeset
20 // DARWIN-SAME: .align 7
anatofuz
parents:
diff changeset
21 // DARWIN-SAME: .align 8
anatofuz
parents:
diff changeset
22 // DARWIN-SAME: "~{dirflag},~{fpsr},~{flags}"()
anatofuz
parents:
diff changeset
23
anatofuz
parents:
diff changeset
24 // WINDOWS-LABEL: define dso_local void @align_test()
anatofuz
parents:
diff changeset
25 // WINDOWS: call void asm sideeffect inteldialect
anatofuz
parents:
diff changeset
26 // WINDOWS-SAME: .align 8
anatofuz
parents:
diff changeset
27 // WINDOWS-SAME: .align 16
anatofuz
parents:
diff changeset
28 // WINDOWS-SAME: .align 128
anatofuz
parents:
diff changeset
29 // WINDOWS-SAME: .align 256
anatofuz
parents:
diff changeset
30 // WINDOWS-SAME: "~{dirflag},~{fpsr},~{flags}"()