Files
archived-llvm/test/CodeGen/ARM/Windows/builtin_longjmp.ll
Saleem Abdulrasool 179856d60c 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274815 91177308-0d34-0410-b5e6-96231b3b80d8
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]