1 ; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=DARWIN
2 ; RUN: llc < %s -mtriple=arm-apple-darwin -trap-func=_trap | FileCheck %s -check-prefix=FUNC
3 ; RUN: llc < %s -mtriple=arm-apple-darwin -trap-func=_trap -O0 | FileCheck %s -check-prefix=FUNC
4 ; RUN: llc < %s -mtriple=armv7 -mattr=+nacl-trap | FileCheck %s -check-prefix=NACL
5 ; RUN: llc < %s -mtriple=armv7 | FileCheck %s -check-prefix=ARM
6 ; RUN: llc < %s -mtriple=thumbv7 | FileCheck %s -check-prefix=THUMB
8 ; RUN: llc -mtriple=armv7 -mattr=+nacl-trap -filetype=obj %s -o - \
9 ; RUN: | llvm-objdump -disassemble -triple armv7 -mattr=+nacl-trap - \
10 ; RUN: | FileCheck %s -check-prefix=ENCODING-NACL
11 ; RUN: llc -verify-machineinstrs -fast-isel -mtriple=armv7 -mattr=+nacl-trap -filetype=obj %s -o - \
12 ; RUN: | llvm-objdump -disassemble -triple armv7 -mattr=+nacl-trap - \
13 ; RUN: | FileCheck %s -check-prefix=ENCODING-NACL
15 ; RUN: llc -mtriple=armv7 -filetype=obj %s -o - \
16 ; RUN: | llvm-objdump -disassemble -triple armv7 - \
17 ; RUN: | FileCheck %s -check-prefix=ENCODING-ARM
18 ; RUN: llc -verify-machineinstrs -fast-isel -mtriple=armv7 -filetype=obj %s -o - \
19 ; RUN: | llvm-objdump -disassemble -triple armv7 - \
20 ; RUN: | FileCheck %s -check-prefix=ENCODING-ARM
22 ; RUN: llc -mtriple=thumbv7 -filetype=obj %s -o - \
23 ; RUN: | llvm-objdump -disassemble -triple thumbv7 - \
24 ; RUN: | FileCheck %s -check-prefix=ENCODING-THUMB
25 ; RUN: llc -verify-machineinstrs -fast-isel -mtriple=thumbv7 -filetype=obj %s -o - \
26 ; RUN: | llvm-objdump -disassemble -triple thumbv7 - \
27 ; RUN: | FileCheck %s -check-prefix=ENCODING-THUMB
32 define void @t() nounwind {
41 ; NACL: .inst 0xe7fedef0
44 ; ARM: .inst 0xe7ffdefe
47 ; THUMB: .inst.n 0xdefe
49 ; ENCODING-NACL: f0 de fe e7 trap
51 ; ENCODING-ARM: fe de ff e7 trap
53 ; ENCODING-THUMB: fe de trap
55 call void @llvm.trap()
59 define void @t2() nounwind {
76 ; ENCODING-NACL: 70 00 20 e1 bkpt #0
78 ; ENCODING-ARM: 70 00 20 e1 bkpt #0
80 ; ENCODING-THUMB: 00 be bkpt #0
82 call void @llvm.debugtrap()
86 declare void @llvm.trap() nounwind
87 declare void @llvm.debugtrap() nounwind