2006-04-22 00:54:32 +02:00
|
|
|
/// @file
|
2006-06-10 09:16:11 +02:00
|
|
|
/// Contains an implementation of longjmp for the Itanium-based architecture.
|
2006-04-22 00:54:32 +02:00
|
|
|
///
|
2006-06-10 09:16:11 +02:00
|
|
|
/// Copyright (c) 2006, Intel Corporation
|
|
|
|
/// All rights reserved. This program and the accompanying materials
|
|
|
|
/// are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
/// which accompanies this distribution. The full text of the license may be found at
|
|
|
|
/// http://opensource.org/licenses/bsd-license.php
|
|
|
|
///
|
|
|
|
/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
///
|
|
|
|
/// Module Name: longjmp.s
|
2006-04-22 00:54:32 +02:00
|
|
|
///
|
|
|
|
///
|
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
.auto
|
|
|
|
.text
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-09-25 12:05:26 +02:00
|
|
|
.globl InternalAssertJumpBuffer
|
2006-06-10 09:16:11 +02:00
|
|
|
.type InternalAssertJumpBuffer, @function
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
.proc SetJump
|
|
|
|
.type SetJump, @function
|
|
|
|
SetJump::
|
|
|
|
alloc loc0 = ar.pfs, 1, 2, 1, 0
|
|
|
|
mov loc1 = b0
|
|
|
|
mov out0 = in0
|
|
|
|
|
|
|
|
brl.call.sptk.many b0 = InternalAssertJumpBuffer
|
|
|
|
|
|
|
|
mov r14 = ar.unat
|
|
|
|
mov r15 = ar.bsp
|
|
|
|
add r10 = 0x10*20, in0
|
|
|
|
|
|
|
|
stf.spill.nta [in0] = f2, 0x10
|
|
|
|
st8.spill.nta [r10] = r4, 8
|
|
|
|
mov r21 = b1
|
|
|
|
|
|
|
|
stf.spill.nta [in0] = f3, 0x10
|
|
|
|
st8.spill.nta [r10] = r5, 8
|
|
|
|
mov r22 = b2
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f4, 0x10
|
|
|
|
st8.spill.nta [r10] = r6, 8
|
|
|
|
mov r23 = b3
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f5, 0x10
|
|
|
|
st8.spill.nta [r10] = r7, 8
|
|
|
|
mov r24 = b4
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f16, 0x10
|
|
|
|
st8.spill.nta [r10] = sp, 8
|
|
|
|
mov r25 = b5
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f17, 0x10
|
|
|
|
st8.nta [r10] = loc1, 8
|
|
|
|
mov r16 = pr
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f18, 0x10
|
|
|
|
st8.nta [r10] = r21, 8
|
|
|
|
mov r17 = ar.lc
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f19, 0x10
|
|
|
|
st8.nta [r10] = r22, 8
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f20, 0x10
|
|
|
|
st8.nta [r10] = r23, 8
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f21, 0x10
|
|
|
|
st8.nta [r10] = r24, 8
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f22, 0x10
|
|
|
|
st8.nta [r10] = r25, 8
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f23, 0x10
|
|
|
|
mov r18 = ar.unat
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f24, 0x10
|
|
|
|
st8.nta [r10] = r14, 8 // UNAT
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f25, 0x10
|
|
|
|
st8.nta [r10] = r18, 8 // UNAT after spill
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f26, 0x10
|
|
|
|
st8.nta [r10] = loc0, 8 // PFS
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f27, 0x10
|
|
|
|
st8.nta [r10] = r15, 8 // BSP
|
|
|
|
mov r8 = 0
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f28, 0x10
|
|
|
|
mov r19 = ar.fpsr
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f29, 0x10
|
|
|
|
st8.nta [r10] = r16, 8 // PR
|
|
|
|
mov ar.pfs = loc0
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f30, 0x10
|
|
|
|
st8.nta [r10] = r17, 8 // LC
|
|
|
|
mov b0 = loc1
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
stf.spill.nta [in0] = f31, 0x10
|
|
|
|
st8.nta [r10] = r19 // FPSR
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-06-10 09:16:11 +02:00
|
|
|
mov ar.unat = r14
|
|
|
|
br.ret.sptk b0
|
|
|
|
.endp SetJump
|