Files
clang-p2996/llvm/test/CodeGen/ARM/Windows/builtin_longjmp.ll
Saleem Abdulrasool eb059b0e0a ARM: support high registers in __builtin_longjmp on WoA
Windows on ARM uses a pure thumb-2 environment.  This means that it can select a
high register when doing a __builtin_longjmp.  We would use a tLDRi which would
truncate the register to a low register.  Use a t2LDRi12 to get the full
register file access.  Tweak the code to just load into PC, as that is an
interworking branch on all supported cores anyways.

llvm-svn: 274815
2016-07-08 00:48:22 +00:00

16 lines
373 B
LLVM

; RUN: llc -mtriple thumbv7--windows-itanium -filetype asm -o - %s | FileCheck %s
declare void @llvm.eh.sjlj.longjmp(i8*)
define arm_aapcs_vfpcc void @test___builtin_longjump(i8* %b) {
entry:
tail call void @llvm.eh.sjlj.longjmp(i8* %b)
unreachable
}
; CHECK: push.w {r11, lr}
; CHECK: ldr.w r11, [r0]
; CHECK: ldr.w sp, [r0, #8]
; CHECK: ldr.w pc, [r0, #4]