Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=INSTR
      2 ; RUN: llc < %s -mtriple=arm-apple-darwin -trap-func=_trap | FileCheck %s -check-prefix=FUNC
      3 ; RUN: llc -mtriple=armv7-unknown-nacl -filetype=obj %s -o - \
      4 ; RUN:  | llvm-objdump -disassemble -triple armv7-unknown-nacl - \
      5 ; RUN:  | FileCheck %s -check-prefix=ENCODING-NACL
      6 ; RUN: llc -mtriple=armv7-unknown-nacl -filetype=obj %s -o - \
      7 ; RUN:  | llvm-objdump -disassemble -triple armv7 -mattr=+nacl-trap - \
      8 ; RUN:  | FileCheck %s -check-prefix=ENCODING-NACL
      9 ; RUN: llc -mtriple=armv7 -mattr=+nacl-trap -filetype=obj %s -o - \
     10 ; RUN:  | llvm-objdump -disassemble -triple armv7 -mattr=+nacl-trap - \
     11 ; RUN:  | FileCheck %s -check-prefix=ENCODING-NACL
     12 ; RUN: llc -fast-isel -mtriple=armv7-unknown-nacl -filetype=obj %s -o - \
     13 ; RUN:  | llvm-objdump -disassemble -triple armv7-unknown-nacl - \
     14 ; 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-ALL
     18 ; RUN: llc -fast-isel -mtriple=armv7 -filetype=obj %s -o - \
     19 ; RUN:  | llvm-objdump -disassemble -triple armv7 - \
     20 ; RUN:  | FileCheck %s -check-prefix=ENCODING-ALL
     21 ; rdar://7961298
     22 ; rdar://9249183
     23 
     24 define void @t() nounwind {
     25 entry:
     26 ; INSTR-LABEL: t:
     27 ; INSTR: trap
     28 
     29 ; FUNC-LABEL: t:
     30 ; FUNC: bl __trap
     31 
     32 ; ENCODING-NACL: f0 de fe e7
     33 
     34 ; ENCODING-ALL: fe de ff e7
     35 
     36   call void @llvm.trap()
     37   unreachable
     38 }
     39 
     40 define void @t2() nounwind {
     41 entry:
     42 ; INSTR-LABEL: t2:
     43 ; INSTR: trap
     44 
     45 ; FUNC-LABEL: t2:
     46 ; FUNC: bl __trap
     47 
     48 ; ENCODING-NACL: f0 de fe e7
     49 
     50 ; ENCODING-ALL: fe de ff e7
     51 
     52   call void @llvm.debugtrap()
     53   unreachable
     54 }
     55 
     56 declare void @llvm.trap() nounwind
     57 declare void @llvm.debugtrap() nounwind
     58