Home | History | Annotate | Download | only in ARM
      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
      7 
      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
     14 
     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
     21 
     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
     28 
     29 ; rdar://7961298
     30 ; rdar://9249183
     31 
     32 define void @t() nounwind {
     33 entry:
     34 ; DARWIN-LABEL: t:
     35 ; DARWIN: trap
     36 
     37 ; FUNC-LABEL: t:
     38 ; FUNC: bl __trap
     39 
     40 ; NACL-LABEL: t:
     41 ; NACL: .inst 0xe7fedef0
     42 
     43 ; ARM-LABEL: t:
     44 ; ARM: .inst 0xe7ffdefe
     45 
     46 ; THUMB-LABEL: t:
     47 ; THUMB: .inst.n 0xdefe
     48 
     49 ; ENCODING-NACL: f0 de fe e7 trap
     50 
     51 ; ENCODING-ARM: fe de ff e7 trap
     52 
     53 ; ENCODING-THUMB: fe de trap
     54 
     55   call void @llvm.trap()
     56   unreachable
     57 }
     58 
     59 define void @t2() nounwind {
     60 entry:
     61 ; DARWIN-LABEL: t2:
     62 ; DARWIN: trap
     63 
     64 ; FUNC-LABEL: t2:
     65 ; FUNC: bl __trap
     66 
     67 ; NACL-LABEL: t2:
     68 ; NACL: .inst 0xe7fedef0
     69 
     70 ; ARM-LABEL: t2:
     71 ; ARM: .inst 0xe7ffdefe
     72 
     73 ; THUMB-LABEL: t2:
     74 ; THUMB: .inst.n 0xdefe
     75 
     76 ; ENCODING-NACL: f0 de fe e7 trap
     77 
     78 ; ENCODING-ARM: fe de ff e7 trap
     79 
     80 ; ENCODING-THUMB: fe de trap
     81 
     82   call void @llvm.debugtrap()
     83   unreachable
     84 }
     85 
     86 declare void @llvm.trap() nounwind
     87 declare void @llvm.debugtrap() nounwind
     88