annotate clang/test/CodeGen/arm-interrupt-attr.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 // RUN: %clang_cc1 -triple thumb-apple-darwin -target-abi aapcs -target-cpu cortex-m3 -emit-llvm -o - %s | FileCheck %s
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -triple arm-apple-darwin -target-abi apcs-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-APCS
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 __attribute__((interrupt)) void test_generic_interrupt() {
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
5 // CHECK: define{{.*}} arm_aapcscc void @test_generic_interrupt() [[GENERIC_ATTR:#[0-9]+]]
150
anatofuz
parents:
diff changeset
6
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
7 // CHECK-APCS: define{{.*}} void @test_generic_interrupt() [[GENERIC_ATTR:#[0-9]+]]
150
anatofuz
parents:
diff changeset
8 }
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 __attribute__((interrupt("IRQ"))) void test_irq_interrupt() {
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
11 // CHECK: define{{.*}} arm_aapcscc void @test_irq_interrupt() [[IRQ_ATTR:#[0-9]+]]
150
anatofuz
parents:
diff changeset
12 }
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 __attribute__((interrupt("FIQ"))) void test_fiq_interrupt() {
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
15 // CHECK: define{{.*}} arm_aapcscc void @test_fiq_interrupt() [[FIQ_ATTR:#[0-9]+]]
150
anatofuz
parents:
diff changeset
16 }
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 __attribute__((interrupt("SWI"))) void test_swi_interrupt() {
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
19 // CHECK: define{{.*}} arm_aapcscc void @test_swi_interrupt() [[SWI_ATTR:#[0-9]+]]
150
anatofuz
parents:
diff changeset
20 }
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 __attribute__((interrupt("ABORT"))) void test_abort_interrupt() {
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
23 // CHECK: define{{.*}} arm_aapcscc void @test_abort_interrupt() [[ABORT_ATTR:#[0-9]+]]
150
anatofuz
parents:
diff changeset
24 }
anatofuz
parents:
diff changeset
25
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 __attribute__((interrupt("UNDEF"))) void test_undef_interrupt() {
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
28 // CHECK: define{{.*}} arm_aapcscc void @test_undef_interrupt() [[UNDEF_ATTR:#[0-9]+]]
150
anatofuz
parents:
diff changeset
29 }
anatofuz
parents:
diff changeset
30
anatofuz
parents:
diff changeset
31 // CHECK: attributes [[GENERIC_ATTR]] = { {{.*}} {{"interrupt"[^=]}}
anatofuz
parents:
diff changeset
32 // CHECK: attributes [[IRQ_ATTR]] = { {{.*}} "interrupt"="IRQ"
anatofuz
parents:
diff changeset
33 // CHECK: attributes [[FIQ_ATTR]] = { {{.*}} "interrupt"="FIQ"
anatofuz
parents:
diff changeset
34 // CHECK: attributes [[SWI_ATTR]] = { {{.*}} "interrupt"="SWI"
anatofuz
parents:
diff changeset
35 // CHECK: attributes [[ABORT_ATTR]] = { {{.*}} "interrupt"="ABORT"
anatofuz
parents:
diff changeset
36 // CHECK: attributes [[UNDEF_ATTR]] = { {{.*}} "interrupt"="UNDEF"
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 // CHECK-APCS: attributes [[GENERIC_ATTR]] = { {{.*}} "interrupt"