2011-04-07 20:31:12 +00:00
|
|
|
; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=INSTR
|
2011-04-08 21:37:21 +00:00
|
|
|
; RUN: llc < %s -mtriple=arm-apple-darwin -trap-func=_trap | FileCheck %s -check-prefix=FUNC
|
2014-04-15 21:30:06 +00:00
|
|
|
; RUN: llc < %s -mtriple=arm-apple-darwin -trap-func=_trap -O0 | FileCheck %s -check-prefix=FUNC
|
2013-01-30 16:30:19 +00:00
|
|
|
; RUN: llc -mtriple=armv7-unknown-nacl -filetype=obj %s -o - \
|
|
|
|
; RUN: | llvm-objdump -disassemble -triple armv7-unknown-nacl - \
|
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-NACL
|
|
|
|
; RUN: llc -mtriple=armv7-unknown-nacl -filetype=obj %s -o - \
|
|
|
|
; RUN: | llvm-objdump -disassemble -triple armv7 -mattr=+nacl-trap - \
|
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-NACL
|
|
|
|
; RUN: llc -mtriple=armv7 -mattr=+nacl-trap -filetype=obj %s -o - \
|
|
|
|
; RUN: | llvm-objdump -disassemble -triple armv7 -mattr=+nacl-trap - \
|
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-NACL
|
2013-08-26 20:22:08 +00:00
|
|
|
; RUN: llc -verify-machineinstrs -fast-isel -mtriple=armv7-unknown-nacl -filetype=obj %s -o - \
|
2013-01-30 16:30:19 +00:00
|
|
|
; RUN: | llvm-objdump -disassemble -triple armv7-unknown-nacl - \
|
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-NACL
|
|
|
|
; RUN: llc -mtriple=armv7 -filetype=obj %s -o - \
|
|
|
|
; RUN: | llvm-objdump -disassemble -triple armv7 - \
|
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-ALL
|
2013-08-26 20:22:08 +00:00
|
|
|
; RUN: llc -verify-machineinstrs -fast-isel -mtriple=armv7 -filetype=obj %s -o - \
|
2013-01-30 16:30:19 +00:00
|
|
|
; RUN: | llvm-objdump -disassemble -triple armv7 - \
|
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-ALL
|
2010-05-11 07:26:32 +00:00
|
|
|
; rdar://7961298
|
2011-04-07 20:31:12 +00:00
|
|
|
; rdar://9249183
|
2010-05-11 07:26:32 +00:00
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
define void @t() nounwind {
|
2010-05-11 07:26:32 +00:00
|
|
|
entry:
|
2013-07-14 06:24:09 +00:00
|
|
|
; INSTR-LABEL: t:
|
2011-04-07 20:31:12 +00:00
|
|
|
; INSTR: trap
|
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; FUNC-LABEL: t:
|
2011-04-07 20:31:12 +00:00
|
|
|
; FUNC: bl __trap
|
2013-01-30 16:30:19 +00:00
|
|
|
|
|
|
|
; ENCODING-NACL: f0 de fe e7
|
|
|
|
|
|
|
|
; ENCODING-ALL: fe de ff e7
|
|
|
|
|
2010-05-11 07:26:32 +00:00
|
|
|
call void @llvm.trap()
|
|
|
|
unreachable
|
|
|
|
}
|
|
|
|
|
2012-10-19 20:11:16 +00:00
|
|
|
define void @t2() nounwind {
|
|
|
|
entry:
|
2013-07-14 06:24:09 +00:00
|
|
|
; INSTR-LABEL: t2:
|
2012-10-19 20:11:16 +00:00
|
|
|
; INSTR: trap
|
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; FUNC-LABEL: t2:
|
2012-10-19 20:11:16 +00:00
|
|
|
; FUNC: bl __trap
|
2013-01-30 16:30:19 +00:00
|
|
|
|
|
|
|
; ENCODING-NACL: f0 de fe e7
|
|
|
|
|
|
|
|
; ENCODING-ALL: fe de ff e7
|
|
|
|
|
2012-10-19 20:11:16 +00:00
|
|
|
call void @llvm.debugtrap()
|
|
|
|
unreachable
|
|
|
|
}
|
|
|
|
|
2010-05-11 07:26:32 +00:00
|
|
|
declare void @llvm.trap() nounwind
|
2012-10-19 20:11:16 +00:00
|
|
|
declare void @llvm.debugtrap() nounwind
|