1/* 2 * COPYRIGHT: BSD - See COPYING.ARM in the top level directory 3 * PROJECT: ReactOS CRT library 4 * PURPOSE: Implementation of _setjmp / longjmp 5 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org) 6 */ 7 8/* INCLUDES ******************************************************************/ 9 10#include <kxarm.h> 11 12/* CODE **********************************************************************/ 13 TEXTAREA 14 15 LEAF_ENTRY _setjmpex 16 17 /* Store r1 (->Frame) and r4 - r11 */ 18 stmia r0!, {r1,r4-r11} 19 20 /* Store sp (->Sp), lr (->Pc), fp (->Fpscr) */ 21 mov r1, sp 22 stmia r0!, {r1,lr,fp} 23 24 /* Store NEON registers */ 25 vst1.64 {d0}, [r0]! 26 vst1.64 {d1}, [r0]! 27 vst1.64 {d2}, [r0]! 28 vst1.64 {d3}, [r0]! 29 vst1.64 {d4}, [r0]! 30 vst1.64 {d5}, [r0]! 31 vst1.64 {d6}, [r0]! 32 vst1.64 {d7}, [r0]! 33 34 /* Return 0 */ 35 mov r0, #0 36 bx lr 37 LEAF_END _setjmpex 38 39 IMPORT _setjmp, WEAK _setjmpex 40 IMPORT setjmp, WEAK _setjmpex 41 42 LEAF_ENTRY longjmp 43 44 ldmia r0!, {r1,r4-r11} 45 ldmia r0!, {r1,lr,fp} 46 mov sp, r1 47 48 /* Load NEON registers */ 49 vld1.64 {d0}, [r0]! 50 vld1.64 {d1}, [r0]! 51 vld1.64 {d2}, [r0]! 52 vld1.64 {d3}, [r0]! 53 vld1.64 {d4}, [r0]! 54 vld1.64 {d5}, [r0]! 55 vld1.64 {d6}, [r0]! 56 vld1.64 {d7}, [r0]! 57 58 /* Return 1 */ 59 mov r0, #1 60 bx lr 61 LEAF_END longjmp 62 63 END 64/* EOF */ 65