Author: sserapion
Date: Sun Apr 11 01:07:26 2010
New Revision: 46830
URL:
http://svn.reactos.org/svn/reactos?rev=46830&view=rev
Log:
Remove redundant implementations of setjmp/longjmp now present in libcntpr.
Removed:
branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/setjmp.S
branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/longjmp.S
branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/setjmp.S
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/i386-dis.c
branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-generic.rbuild
Removed: branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/setjmp.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/setjmp.S [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/setjmp.S (removed)
@@ -1,118 +1,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS system libraries
- * PURPOSE: Implementation of _setjmp/longjmp
- * FILE: lib/sdk/crt/setjmp/amd64/setjmp.s
- * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org)
- */
-
-/* INCLUDES ******************************************************************/
-
-#include <reactos/asm.h>
-#include <ndk/amd64/asm.h>
-
-.intel_syntax noprefix
-
-#define JUMP_BUFFER_Frame 0x00
-#define JUMP_BUFFER_Rbx 0x08
-#define JUMP_BUFFER_Rsp 0x10
-#define JUMP_BUFFER_Rbp 0x18
-#define JUMP_BUFFER_Rsi 0x20
-#define JUMP_BUFFER_Rdi 0x28
-#define JUMP_BUFFER_R12 0x30
-#define JUMP_BUFFER_R13 0x38
-#define JUMP_BUFFER_R14 0x40
-#define JUMP_BUFFER_R15 0x48
-#define JUMP_BUFFER_Rip 0x50
-#define JUMP_BUFFER_Spare 0x58
-#define JUMP_BUFFER_Xmm6 0x60
-#define JUMP_BUFFER_Xmm7 0x70
-#define JUMP_BUFFER_Xmm8 0x80
-#define JUMP_BUFFER_Xmm9 0x90
-#define JUMP_BUFFER_Xmm10 0xa0
-#define JUMP_BUFFER_Xmm11 0xb0
-#define JUMP_BUFFER_Xmm12 0xc0
-#define JUMP_BUFFER_Xmm13 0xd0
-#define JUMP_BUFFER_Xmm14 0xe0
-#define JUMP_BUFFER_Xmm15 0xf0
-
-
-/* FUNCTIONS ******************************************************************/
-
-/*
- * int _setjmp(jmp_buf env);
- *
- * Parameters: <rcx> - jmp_buf env
- * Returns: 0
- * Notes: Sets up the jmp_buf
- */
-.globl _setjmp
-_setjmp:
- /* Load rsp as it was before the call into rax */
- lea rax, [rsp + 8]
- /* Load return address into r8 */
- mov r8, [rsp]
- mov qword ptr [rcx + JUMP_BUFFER_Frame], 0
- mov [rcx + JUMP_BUFFER_Rbx], rbx
- mov [rcx + JUMP_BUFFER_Rbp], rbp
- mov [rcx + JUMP_BUFFER_Rsi], rsi
- mov [rcx + JUMP_BUFFER_Rdi], rdi
- mov [rcx + JUMP_BUFFER_R12], r12
- mov [rcx + JUMP_BUFFER_R13], r13
- mov [rcx + JUMP_BUFFER_R14], r14
- mov [rcx + JUMP_BUFFER_R15], r15
- mov [rcx + JUMP_BUFFER_Rsp], rax
- mov [rcx + JUMP_BUFFER_Rip], r8
- movdqa [rcx + JUMP_BUFFER_Xmm6], xmm6
- movdqa [rcx + JUMP_BUFFER_Xmm7], xmm7
- movdqa [rcx + JUMP_BUFFER_Xmm8], xmm8
- movdqa [rcx + JUMP_BUFFER_Xmm9], xmm9
- movdqa [rcx + JUMP_BUFFER_Xmm10], xmm10
- movdqa [rcx + JUMP_BUFFER_Xmm11], xmm11
- movdqa [rcx + JUMP_BUFFER_Xmm12], xmm12
- movdqa [rcx + JUMP_BUFFER_Xmm13], xmm13
- movdqa [rcx + JUMP_BUFFER_Xmm14], xmm14
- movdqa [rcx + JUMP_BUFFER_Xmm15], xmm15
- xor rax, rax
- ret
-
-/*
- * void longjmp(jmp_buf env, int value);
- *
- * Parameters: <rcx> - jmp_buf setup by _setjmp
- * <rdx> - int value to return
- * Returns: Doesn't return
- * Notes: Non-local goto
- */
-.proc longjmp
-
- // FIXME: handle frame
-
- mov rbx, [rcx + JUMP_BUFFER_Rbx]
- mov rbp, [rcx + JUMP_BUFFER_Rbp]
- mov rsi, [rcx + JUMP_BUFFER_Rsi]
- mov rdi, [rcx + JUMP_BUFFER_Rdi]
- mov r12, [rcx + JUMP_BUFFER_R12]
- mov r13, [rcx + JUMP_BUFFER_R13]
- mov r14, [rcx + JUMP_BUFFER_R14]
- mov r15, [rcx + JUMP_BUFFER_R15]
- mov rsp, [rcx + JUMP_BUFFER_Rsp]
- mov r8, [rcx + JUMP_BUFFER_Rip]
- movdqa xmm6, [rcx + JUMP_BUFFER_Xmm6]
- movdqa xmm7, [rcx + JUMP_BUFFER_Xmm7]
- movdqa xmm8, [rcx + JUMP_BUFFER_Xmm8]
- movdqa xmm9, [rcx + JUMP_BUFFER_Xmm9]
- movdqa xmm10, [rcx + JUMP_BUFFER_Xmm10]
- movdqa xmm11, [rcx + JUMP_BUFFER_Xmm11]
- movdqa xmm12, [rcx + JUMP_BUFFER_Xmm12]
- movdqa xmm13, [rcx + JUMP_BUFFER_Xmm13]
- movdqa xmm14, [rcx + JUMP_BUFFER_Xmm14]
- movdqa xmm15, [rcx + JUMP_BUFFER_Xmm15]
-
- /* return param2 or 1 if it was 0 */
- mov rax, rdx
- test rax, rax
- jnz 2f
- inc rax
-2: jmp r8
-.endproc
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/i386-dis.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/i386-dis.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/i386-dis.c [iso-8859-1] Sun Apr
11 01:07:26 2010
@@ -37,7 +37,7 @@
#define ATTRIBUTE_UNUSED
extern int sprintf(char *str, const char *format, ...);
#define sprintf_vma(BUF, VMA) sprintf(BUF, "0x%X", VMA)
-#define _setjmp setjmp
+#include <setjmp.h>
#define _INC_SETJMPEX
struct disassemble_info;
Removed: branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/longjmp.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/longjmp.S [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/longjmp.S (removed)
@@ -1,70 +1,0 @@
- .file "longjmp.S"
-/*
- * Copyright (C) 1998, 1999, Jonathan S. Shapiro.
- *
- * This file is part of the EROS Operating System.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2,
- * or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
- /*
- * typedef struct {
- * unsigned long ebx, esi, edi;
- * unsigned long ebp;
- * unsigned long sp;
- * unsigned long pc;
- * } jmp_buf[1];
- */
-
- /*
- * On entry, the stack to longjmp looks like:
- *
- * value
- * ptr to jmp_buf
- * return PC
- */
-
-.globl _longjmp
-_longjmp:
- pushl %ebp
- movl %esp,%ebp
-
- movl 8(%ebp),%ecx /* address of jmp_buf to ecx */
- movl 12(%ebp),%eax /* return value to %eax */
- testl %eax,%eax
- jne 1f
- incl %eax /* return 1 if handed 0 */
-
-1:
- movl (%ecx),%ebx /* restore %ebx */
- movl 4(%ecx),%esi /* restore %esi */
- movl 8(%ecx),%edi /* restore %edi */
-
- /*
- * From this instant on we are not running in a valid frame
- */
-
- movl 12(%ecx),%ebp /* restore %ebp */
- movl 16(%ecx),%esp /* restore %esp */
- /* movl 20(%ecx),%eax return PC */
-
- /*
- * Since we are abandoning the stack in any case,
- * there isn't much point in doing the usual return
- * discipline.
- */
-
- jmpl *20(%ecx)
-
Removed: branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/setjmp.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/setjmp.S [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/i386/setjmp.S (removed)
@@ -1,61 +1,0 @@
- .file "setjmp.S"
-/*
- * Copyright (C) 1998, 1999, Jonathan S. Shapiro.
- *
- * This file is part of the EROS Operating System.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-/* #include <eros/i486/asm.h> */
-
-
- /*
- * typedef struct {
- * unsigned long ebx, esi, edi;
- * unsigned long ebp;
- * unsigned long sp;
- * unsigned long pc;
- * } jmp_buf[1];
- */
-
- /*
- * On entry, the stack to setjmp looks like:
- *
- * ptr to jmp_buf
- * return PC
- */
-.globl _setjmp
-.globl __setjmp
-_setjmp:
-__setjmp:
- pushl %ebp
- movl %esp,%ebp
-
- movl 0x8(%ebp),%eax /* address of jmp_buf to eax */
- movl %ebx,(%eax) /* save %ebx */
- movl %esi,4(%eax) /* save %esi */
- movl %edi,8(%eax) /* save %edi */
- leal 8(%ebp),%edx /* calling proc's esp, not ours! */
- movl %edx,16(%eax)
- movl 4(%ebp), %edx /* save return PC */
- movl %edx,20(%eax)
- movl 0(%ebp),%edx /* calling proc's ebp, not ours! */
- movl %edx,12(%eax)
-
- xorl %eax,%eax /* return 0 the first time */
- leave
- ret
-
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-generic.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] Sun
Apr 11 01:07:26 2010
@@ -319,8 +319,6 @@
<group>
<file>i386-dis.c</file>
<file>kdb_help.S</file>
- <file>longjmp.S</file>
- <file>setjmp.S</file>
</group>
</if>
</directory>
@@ -332,7 +330,6 @@
<file>i386-dis.c</file>
<file>kdb_help.S</file>
<file>kdb.c</file>
- <file>setjmp.S</file>
</group>
</if>
</directory>