2016-01-29 18:23:32 +08:00
|
|
|
; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=DARWIN
|
2011-04-09 05:37:21 +08:00
|
|
|
; RUN: llc < %s -mtriple=arm-apple-darwin -trap-func=_trap | FileCheck %s -check-prefix=FUNC
|
2014-04-16 05:30:06 +08:00
|
|
|
; RUN: llc < %s -mtriple=arm-apple-darwin -trap-func=_trap -O0 | FileCheck %s -check-prefix=FUNC
|
2016-01-29 18:23:32 +08:00
|
|
|
; RUN: llc < %s -mtriple=armv7 -mattr=+nacl-trap | FileCheck %s -check-prefix=NACL
|
|
|
|
; RUN: llc < %s -mtriple=armv7 | FileCheck %s -check-prefix=ARM
|
|
|
|
; RUN: llc < %s -mtriple=thumbv7 | FileCheck %s -check-prefix=THUMB
|
|
|
|
|
2013-01-31 00:30:19 +08:00
|
|
|
; RUN: llc -mtriple=armv7 -mattr=+nacl-trap -filetype=obj %s -o - \
|
2020-03-16 07:17:52 +08:00
|
|
|
; RUN: | llvm-objdump -d --triple=armv7 --mattr=+nacl-trap - \
|
2013-01-31 00:30:19 +08:00
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-NACL
|
2016-01-29 18:23:32 +08:00
|
|
|
; RUN: llc -verify-machineinstrs -fast-isel -mtriple=armv7 -mattr=+nacl-trap -filetype=obj %s -o - \
|
2020-03-16 07:17:52 +08:00
|
|
|
; RUN: | llvm-objdump -d --triple=armv7 --mattr=+nacl-trap - \
|
2013-01-31 00:30:19 +08:00
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-NACL
|
2016-01-29 18:23:32 +08:00
|
|
|
|
2013-01-31 00:30:19 +08:00
|
|
|
; RUN: llc -mtriple=armv7 -filetype=obj %s -o - \
|
2020-03-16 07:17:52 +08:00
|
|
|
; RUN: | llvm-objdump -d --triple=armv7 - \
|
2016-01-29 18:23:32 +08:00
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-ARM
|
2013-08-27 04:22:08 +08:00
|
|
|
; RUN: llc -verify-machineinstrs -fast-isel -mtriple=armv7 -filetype=obj %s -o - \
|
2020-03-16 07:17:52 +08:00
|
|
|
; RUN: | llvm-objdump -d --triple=armv7 - \
|
2016-01-29 18:23:32 +08:00
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-ARM
|
|
|
|
|
|
|
|
; RUN: llc -mtriple=thumbv7 -filetype=obj %s -o - \
|
2020-03-16 07:17:52 +08:00
|
|
|
; RUN: | llvm-objdump -d --triple=thumbv7 - \
|
2016-01-29 18:23:32 +08:00
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-THUMB
|
|
|
|
; RUN: llc -verify-machineinstrs -fast-isel -mtriple=thumbv7 -filetype=obj %s -o - \
|
2020-03-16 07:17:52 +08:00
|
|
|
; RUN: | llvm-objdump -d --triple=thumbv7 - \
|
2016-01-29 18:23:32 +08:00
|
|
|
; RUN: | FileCheck %s -check-prefix=ENCODING-THUMB
|
|
|
|
|
2010-05-11 15:26:32 +08:00
|
|
|
; rdar://7961298
|
2011-04-08 04:31:12 +08:00
|
|
|
; rdar://9249183
|
2010-05-11 15:26:32 +08:00
|
|
|
|
2010-06-17 23:18:27 +08:00
|
|
|
define void @t() nounwind {
|
2010-05-11 15:26:32 +08:00
|
|
|
entry:
|
2016-01-29 18:23:32 +08:00
|
|
|
; DARWIN-LABEL: t:
|
|
|
|
; DARWIN: trap
|
2011-04-08 04:31:12 +08:00
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; FUNC-LABEL: t:
|
2011-04-08 04:31:12 +08:00
|
|
|
; FUNC: bl __trap
|
2013-01-31 00:30:19 +08:00
|
|
|
|
2016-01-29 18:23:32 +08:00
|
|
|
; NACL-LABEL: t:
|
|
|
|
; NACL: .inst 0xe7fedef0
|
2013-01-31 00:30:19 +08:00
|
|
|
|
2016-01-29 18:23:32 +08:00
|
|
|
; ARM-LABEL: t:
|
|
|
|
; ARM: .inst 0xe7ffdefe
|
|
|
|
|
|
|
|
; THUMB-LABEL: t:
|
|
|
|
; THUMB: .inst.n 0xdefe
|
|
|
|
|
|
|
|
; ENCODING-NACL: f0 de fe e7 trap
|
|
|
|
|
|
|
|
; ENCODING-ARM: fe de ff e7 trap
|
|
|
|
|
|
|
|
; ENCODING-THUMB: fe de trap
|
2013-01-31 00:30:19 +08:00
|
|
|
|
2010-05-11 15:26:32 +08:00
|
|
|
call void @llvm.trap()
|
|
|
|
unreachable
|
|
|
|
}
|
|
|
|
|
2012-10-20 04:11:16 +08:00
|
|
|
define void @t2() nounwind {
|
|
|
|
entry:
|
2016-01-29 18:23:32 +08:00
|
|
|
; DARWIN-LABEL: t2:
|
2018-10-25 02:10:38 +08:00
|
|
|
; DARWIN: udf #254
|
2012-10-20 04:11:16 +08:00
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; FUNC-LABEL: t2:
|
2012-10-20 04:11:16 +08:00
|
|
|
; FUNC: bl __trap
|
2013-01-31 00:30:19 +08:00
|
|
|
|
2016-01-29 18:23:32 +08:00
|
|
|
; NACL-LABEL: t2:
|
2018-10-25 02:10:38 +08:00
|
|
|
; NACL: bkpt #0
|
2016-01-29 18:23:32 +08:00
|
|
|
|
|
|
|
; ARM-LABEL: t2:
|
2018-10-25 02:10:38 +08:00
|
|
|
; ARM: bkpt #0
|
2016-01-29 18:23:32 +08:00
|
|
|
|
|
|
|
; THUMB-LABEL: t2:
|
2018-10-25 02:10:38 +08:00
|
|
|
; THUMB: bkpt #0
|
2016-01-29 18:23:32 +08:00
|
|
|
|
2018-10-25 02:10:38 +08:00
|
|
|
; ENCODING-NACL: 70 00 20 e1 bkpt #0
|
2016-01-29 18:23:32 +08:00
|
|
|
|
2018-10-25 02:10:38 +08:00
|
|
|
; ENCODING-ARM: 70 00 20 e1 bkpt #0
|
2013-01-31 00:30:19 +08:00
|
|
|
|
2018-10-25 02:10:38 +08:00
|
|
|
; ENCODING-THUMB: 00 be bkpt #0
|
2013-01-31 00:30:19 +08:00
|
|
|
|
2012-10-20 04:11:16 +08:00
|
|
|
call void @llvm.debugtrap()
|
|
|
|
unreachable
|
|
|
|
}
|
|
|
|
|
2010-05-11 15:26:32 +08:00
|
|
|
declare void @llvm.trap() nounwind
|
2012-10-20 04:11:16 +08:00
|
|
|
declare void @llvm.debugtrap() nounwind
|