Modified *jmp stubs for arch mipsel. Removed PowerPC asm.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32623 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
19bce7226a
commit
9fbc65a94d
@ -1,5 +1,7 @@
|
||||
SubDir HAIKU_TOP src system libroot posix arch mipsel ;
|
||||
|
||||
UsePrivateSystemHeaders ;
|
||||
|
||||
local genericSources =
|
||||
setjmp_save_sigs.c
|
||||
longjmp_return.c
|
||||
|
@ -1,48 +1,19 @@
|
||||
/*
|
||||
* Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>. All rights
|
||||
* reserved. Distributed under the terms of the Haiku License.
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2005 Ingo Weinhold, bonefish@cs.tu-berlin.de
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef SETJMP_INTERNAL_H
|
||||
#define SETJMP_INTERNAL_H
|
||||
|
||||
#error MIPSEL: fixme
|
||||
|
||||
/* PPC function call ABI register use:
|
||||
r0 - volatile
|
||||
r1 - stack frame
|
||||
r2 - reserved
|
||||
r3-r4 - param passing, return values
|
||||
r5-r10 - param passing
|
||||
r11-r12 - volatile
|
||||
r13 - small data pointer
|
||||
r14-r30 - local vars
|
||||
r31 - local vars/environment
|
||||
*/
|
||||
|
||||
/* These are the fields of the __jmp_regs structure */
|
||||
#define JMP_REGS_R1 0
|
||||
#define JMP_REGS_R2 4
|
||||
#define JMP_REGS_R13 8
|
||||
#define JMP_REGS_R14 12
|
||||
#define JMP_REGS_R15 16
|
||||
#define JMP_REGS_R16 20
|
||||
#define JMP_REGS_R17 24
|
||||
#define JMP_REGS_R18 28
|
||||
#define JMP_REGS_R19 32
|
||||
#define JMP_REGS_R20 36
|
||||
#define JMP_REGS_R21 40
|
||||
#define JMP_REGS_R22 44
|
||||
#define JMP_REGS_R23 48
|
||||
#define JMP_REGS_R24 52
|
||||
#define JMP_REGS_R25 56
|
||||
#define JMP_REGS_R26 60
|
||||
#define JMP_REGS_R27 64
|
||||
#define JMP_REGS_R28 68
|
||||
#define JMP_REGS_R29 72
|
||||
#define JMP_REGS_R30 76
|
||||
#define JMP_REGS_R31 80
|
||||
#define JMP_REGS_LR 84
|
||||
#define JMP_REGS_CR 88
|
||||
#define JMP_REGS_R3 8
|
||||
|
||||
|
||||
#warning DEFINE JMP_REGS
|
||||
|
||||
|
||||
#define FUNCTION(x) .global x; .type x,@function; x
|
||||
|
||||
|
@ -1,48 +1,20 @@
|
||||
#error XXX
|
||||
/*
|
||||
* Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>. All rights
|
||||
* reserved. Distributed under the terms of the Haiku License.
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2005 Ingo Weinhold, bonefish@cs.tu-berlin.de
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include "setjmp_internal.h"
|
||||
|
||||
#error MIPSEL: fixme
|
||||
|
||||
/* int __siglongjmp(jmp_buf buffer, int value) */
|
||||
FUNCTION(siglongjmp):
|
||||
FUNCTION(longjmp):
|
||||
FUNCTION(_longjmp):
|
||||
// r3: buffer, r4: saveMask
|
||||
|
||||
// restore non-volatile general purpose registers
|
||||
lwz %r1, JMP_REGS_R1(3)
|
||||
lwz %r2, JMP_REGS_R2(3)
|
||||
lwz %r13, JMP_REGS_R13(3)
|
||||
lwz %r14, JMP_REGS_R14(3)
|
||||
lwz %r15, JMP_REGS_R15(3)
|
||||
lwz %r16, JMP_REGS_R16(3)
|
||||
lwz %r17, JMP_REGS_R17(3)
|
||||
lwz %r18, JMP_REGS_R18(3)
|
||||
lwz %r19, JMP_REGS_R19(3)
|
||||
lwz %r20, JMP_REGS_R20(3)
|
||||
lwz %r21, JMP_REGS_R21(3)
|
||||
lwz %r22, JMP_REGS_R22(3)
|
||||
lwz %r23, JMP_REGS_R23(3)
|
||||
lwz %r24, JMP_REGS_R24(3)
|
||||
lwz %r25, JMP_REGS_R25(3)
|
||||
lwz %r26, JMP_REGS_R26(3)
|
||||
lwz %r27, JMP_REGS_R27(3)
|
||||
lwz %r28, JMP_REGS_R28(3)
|
||||
lwz %r29, JMP_REGS_R29(3)
|
||||
lwz %r30, JMP_REGS_R30(3)
|
||||
lwz %r31, JMP_REGS_R31(3)
|
||||
nop
|
||||
|
||||
// restore special registers (link, condition)
|
||||
lwz %r0, JMP_REGS_LR(3)
|
||||
mtlr %r0
|
||||
lwz %r0, JMP_REGS_CR(3)
|
||||
mtcr %r0
|
||||
|
||||
b __longjmp_return
|
||||
nop
|
||||
|
||||
#pragma weak longjmp=siglongjmp
|
||||
|
||||
|
@ -1,54 +1,24 @@
|
||||
#error XXX
|
||||
/*
|
||||
* Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>. All rights
|
||||
* reserved. Distributed under the terms of the Haiku License.
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2005 Ingo Weinhold, bonefish@cs.tu-berlin.de
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include "setjmp_internal.h"
|
||||
#include <asm_defs.h>
|
||||
|
||||
#error MIPSEL: fixme
|
||||
#include "setjmp_internal.h"
|
||||
|
||||
/* int sigsetjmp(jmp_buf buffer, int saveMask) */
|
||||
FUNCTION(__sigsetjmp):
|
||||
FUNCTION(sigsetjmp):
|
||||
// r3: buffer, r4: saveMask
|
||||
|
||||
// store non-volatile general purpose registers
|
||||
stw %r1, JMP_REGS_R1(3)
|
||||
stw %r2, JMP_REGS_R2(3)
|
||||
stw %r13, JMP_REGS_R13(3)
|
||||
stw %r14, JMP_REGS_R14(3)
|
||||
stw %r15, JMP_REGS_R15(3)
|
||||
stw %r16, JMP_REGS_R16(3)
|
||||
stw %r17, JMP_REGS_R17(3)
|
||||
stw %r18, JMP_REGS_R18(3)
|
||||
stw %r19, JMP_REGS_R19(3)
|
||||
stw %r20, JMP_REGS_R20(3)
|
||||
stw %r21, JMP_REGS_R21(3)
|
||||
stw %r22, JMP_REGS_R22(3)
|
||||
stw %r23, JMP_REGS_R23(3)
|
||||
stw %r24, JMP_REGS_R24(3)
|
||||
stw %r25, JMP_REGS_R25(3)
|
||||
stw %r26, JMP_REGS_R26(3)
|
||||
stw %r27, JMP_REGS_R27(3)
|
||||
stw %r28, JMP_REGS_R28(3)
|
||||
stw %r29, JMP_REGS_R29(3)
|
||||
stw %r30, JMP_REGS_R30(3)
|
||||
stw %r31, JMP_REGS_R31(3)
|
||||
|
||||
// store special registers (link, condition)
|
||||
mflr %r0
|
||||
stw %r0, JMP_REGS_LR(3)
|
||||
mfcr %r0
|
||||
stw %r0, JMP_REGS_CR(3)
|
||||
|
||||
b __setjmp_save_sigs
|
||||
nop
|
||||
FUNCTION_END(__sigsetjmp)
|
||||
FUNCTION_END(sigsetjmp)
|
||||
|
||||
|
||||
/* int setjmp(jmp_buf buffer) */
|
||||
FUNCTION(setjmp):
|
||||
// call __sigsetjmp with saveMask = 0
|
||||
addi %r4, 0, 0
|
||||
b __sigsetjmp
|
||||
nop
|
||||
FUNCTION_END(setjmp)
|
||||
|
||||
#pragma weak _setjmp=setjmp
|
||||
|
Loading…
Reference in New Issue
Block a user