llvm-6502/test/CodeGen/ARM/undefined.ll
Saleem Abdulrasool 71ce2118bb ARM: introduce llvm.arm.undefined intrinsic
This intrinsic permits the emission of platform specific undefined sequences.
ARM has reserved the 0xde opcode which takes a single integer parameter (ignored
by the CPU).  This permits the operating system to implement custom behaviour on
this trap.  The llvm.arm.undefined intrinsic is meant to provide a means for
generating the target specific behaviour from the frontend.  This is
particularly useful for Windows on ARM which has made use of a series of these
special opcodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209390 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-22 04:46:46 +00:00

15 lines
363 B
LLVM

; RUN: llc -mtriple armv7-eabi -o - %s | FileCheck %s
; RUN: llc -mtriple thumbv6m-eabi -o - %s | FileCheck %s
; RUN: llc -mtriple thumbv7-eabi -o - %s | FileCheck %s
declare void @llvm.arm.undefined(i32) nounwind
define void @undefined_trap() {
entry:
tail call void @llvm.arm.undefined(i32 254)
ret void
}
; CHECK-LABEL: undefined_trap
; CHECK: udf #254