mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-12 15:05:06 +00:00
71ce2118bb
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
15 lines
363 B
LLVM
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
|