207
|
1 // RUN: %clang_cc1 -xc -O2 -triple thumbv7a-unknown-windows-eabi -fms-extensions -emit-llvm < %s | FileCheck %s
|
|
2 // RUN: %clang_cc1 -xc++ -O2 -triple thumbv7a-unknown-windows-eabi -fms-extensions -emit-llvm < %s | FileCheck %s
|
|
3 // RUN: %clang_cc1 -xc -O2 -triple x86_64-unknown-linux-gnu -fms-extensions -emit-llvm < %s | FileCheck %s
|
|
4 // RUN: %clang_cc1 -xc++ -O2 -triple x86_64-unknown-linux-gnu -fms-extensions -emit-llvm < %s | FileCheck %s
|
|
5
|
|
6 struct S1 {
|
|
7 unsigned long x;
|
|
8 };
|
|
9
|
|
10 // CHECK: define
|
|
11 // CHECK-SAME: void
|
|
12 // CHECK-SAME: test1
|
|
13
|
|
14 void test1(__unaligned struct S1 *out) {
|
|
15 // CHECK: store
|
|
16 // CHECK-SAME: align 1
|
|
17 out->x = 5;
|
|
18 // CHECK: ret void
|
|
19 }
|
|
20
|
|
21 // CHECK: define
|
|
22 // CHECK-SAME: void
|
|
23 // CHECK-SAME: test2
|
|
24
|
|
25 void test2(__unaligned struct S1 *out, __unaligned struct S1 *in) {
|
|
26 // CHECK: load
|
|
27 // CHECK-SAME: align 1
|
|
28 // CHECK: store
|
|
29 // CHECK-SAME: align 1
|
|
30 *out = *in;
|
|
31 // CHECK: ret void
|
|
32 }
|