2002-05-30 23:35:59 +00:00
|
|
|
/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
|
1998-04-02 17:42:53 +00:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
Contributed by Ulrich Drepper, <drepper@cygnus.com>, 1998.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
1998-04-02 17:42:53 +00:00
|
|
|
|
|
|
|
The GNU C Library 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
|
2001-07-06 04:58:11 +00:00
|
|
|
Lesser General Public License for more details.
|
1998-04-02 17:42:53 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with the GNU C Library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
|
|
02111-1307 USA. */
|
1998-04-02 17:42:53 +00:00
|
|
|
|
|
|
|
#ifndef _LINUX_I386_I686_SYSDEP_H
|
|
|
|
#define _LINUX_I386_I686_SYSDEP_H 1
|
|
|
|
|
|
|
|
/* There is some commonality. */
|
|
|
|
#include <sysdeps/unix/sysv/linux/i386/sysdep.h>
|
2000-06-27 01:52:26 +00:00
|
|
|
#include <bp-sym.h>
|
|
|
|
#include <bp-asm.h>
|
1998-04-02 17:42:53 +00:00
|
|
|
|
|
|
|
/* We define special versions of the error handler code to match the i686's
|
|
|
|
deep branch prediction mechanism. */
|
|
|
|
#ifdef PIC
|
|
|
|
# undef SYSCALL_ERROR_HANDLER
|
|
|
|
|
2002-07-20 01:14:41 +00:00
|
|
|
# undef SETUP_PIC_REG
|
|
|
|
# ifndef HAVE_HIDDEN
|
|
|
|
# define SETUP_PIC_REG(reg) \
|
2002-05-30 23:35:59 +00:00
|
|
|
call 1f; \
|
|
|
|
.subsection 1; \
|
2002-07-20 01:14:41 +00:00
|
|
|
1:movl (%esp), %e##reg; \
|
2002-05-30 23:35:59 +00:00
|
|
|
ret; \
|
|
|
|
.previous
|
2002-07-20 01:14:41 +00:00
|
|
|
# else
|
|
|
|
# define SETUP_PIC_REG(reg) \
|
|
|
|
.section .gnu.linkonce.t.__i686.get_pc_thunk.reg,"ax",@progbits; \
|
|
|
|
.globl __i686.get_pc_thunk.reg; \
|
|
|
|
.hidden __i686.get_pc_thunk.reg; \
|
|
|
|
.type __i686.get_pc_thunk.reg,@function; \
|
|
|
|
__i686.get_pc_thunk.reg: \
|
|
|
|
movl (%esp), %e##reg; \
|
1998-04-02 17:42:53 +00:00
|
|
|
ret; \
|
2002-05-30 23:35:59 +00:00
|
|
|
.previous; \
|
2002-07-20 01:14:41 +00:00
|
|
|
call __i686.get_pc_thunk.reg
|
|
|
|
# endif
|
2002-05-30 23:35:59 +00:00
|
|
|
|
2002-07-20 01:14:41 +00:00
|
|
|
/* Store (- %eax) into errno through the GOT. */
|
|
|
|
# ifdef _LIBC_REENTRANT
|
|
|
|
# if USE_TLS && HAVE___THREAD
|
|
|
|
# define SYSCALL_ERROR_HANDLER \
|
|
|
|
0:SETUP_PIC_REG (cx); \
|
|
|
|
addl $_GLOBAL_OFFSET_TABLE_, %ecx; \
|
|
|
|
xorl %edx, %edx; \
|
|
|
|
subl %eax, %edx; \
|
|
|
|
movl %gs:0, %eax; \
|
|
|
|
subl errno@gottpoff(%ecx), %eax; \
|
|
|
|
movl %edx, (%eax); \
|
|
|
|
orl $-1, %eax; \
|
|
|
|
jmp L(pseudo_end);
|
|
|
|
# else
|
|
|
|
# define SYSCALL_ERROR_HANDLER \
|
1998-06-07 14:06:56 +00:00
|
|
|
0:pushl %ebx; \
|
2002-07-20 01:14:41 +00:00
|
|
|
SETUP_PIC_REG(bx); \
|
1998-04-02 17:42:53 +00:00
|
|
|
addl $_GLOBAL_OFFSET_TABLE_, %ebx; \
|
|
|
|
xorl %edx, %edx; \
|
|
|
|
subl %eax, %edx; \
|
|
|
|
pushl %edx; \
|
2000-06-27 01:52:26 +00:00
|
|
|
PUSH_ERRNO_LOCATION_RETURN; \
|
|
|
|
call BP_SYM (__errno_location)@PLT; \
|
|
|
|
POP_ERRNO_LOCATION_RETURN; \
|
1998-04-02 17:42:53 +00:00
|
|
|
popl %ecx; \
|
|
|
|
popl %ebx; \
|
|
|
|
movl %ecx, (%eax); \
|
Update.
1998-08-23 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/Versions [GLIBC_2.1]: Add
__modify_ldt and modify_ldt.
* sysdeps/unix/sysv/linux/i386/syscalls.list: Add modify_ldt.
* sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
Use orl $-1 instead of movl $-1 to save two bytes.
* sysdeps/unix/sysv/linux/i386/i686/sysdep.h (SYSCALL_ERROR_HANDLER):
Likewise.
1998-08-17 H.J. Lu <hjl@gnu.org>
* libio/Versions (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Added to GLIBC_2.1.
* libio/fileops.c (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Change the prefix to
"_IO_new_". Added to GLIBC_2.1.
* libio/libioP.h (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Add prototypes for the prefix
"_IO_new_".
* libio/oldfileops.c (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Added to GLIBC_2.0.
1998-08-23 Richard Henderson <rth@cygnus.com>
* Makeconfig (LDFLAGS): Remove.
* csu/initfini.c: Return to .text before __gmon_start__.
* elf/elf.h (EM_FAKE_ALPHA): Rename from EM_OLD_ALPHA.
(STO_MIPS_*): Rename from STO_*.
(STB_MIPS_SPLIT_COMMON): Rename from STB_SPLIT_COMMON.
(STO_ALPHA_NOPV, STO_ALPHA_STD_GPLOAD): New.
* math/atest-exp.c (mpn_bitsize): Fix bit location calculation.
(main): e3s is negative on zero.
* math/atest-exp2.c: Likewise.
* math/atest-sincos.c: Likewise.
1998-08-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* Makerules (install): Add comment about absolute paths.
1998-08-23 Ulrich Drepper <drepper@cygnus.com>
* libio/vsnprintf.c (_IO_vsnprintf): Set first byte of destination
array to NUL to handle maxlen==1 case correctly.
Patch by HJ Lu.
1998-08-23 Richard Henderson <rth@cygnus.com>
1998-08-23 18:23:26 +00:00
|
|
|
orl $-1, %eax; \
|
1998-06-07 14:06:56 +00:00
|
|
|
jmp L(pseudo_end);
|
1998-04-02 17:42:53 +00:00
|
|
|
/* A quick note: it is assumed that the call to `__errno_location' does
|
|
|
|
not modify the stack! */
|
2002-05-30 23:35:59 +00:00
|
|
|
# endif
|
2002-07-20 01:14:41 +00:00
|
|
|
# else
|
2002-05-30 23:35:59 +00:00
|
|
|
# define SYSCALL_ERROR_HANDLER \
|
2002-07-20 01:14:41 +00:00
|
|
|
0:SETUP_PIC_REG(cx); \
|
1998-04-02 17:42:53 +00:00
|
|
|
addl $_GLOBAL_OFFSET_TABLE_, %ecx; \
|
|
|
|
xorl %edx, %edx; \
|
|
|
|
subl %eax, %edx; \
|
|
|
|
movl errno@GOT(%ecx), %ecx; \
|
|
|
|
movl %edx, (%ecx); \
|
Update.
1998-08-23 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/Versions [GLIBC_2.1]: Add
__modify_ldt and modify_ldt.
* sysdeps/unix/sysv/linux/i386/syscalls.list: Add modify_ldt.
* sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
Use orl $-1 instead of movl $-1 to save two bytes.
* sysdeps/unix/sysv/linux/i386/i686/sysdep.h (SYSCALL_ERROR_HANDLER):
Likewise.
1998-08-17 H.J. Lu <hjl@gnu.org>
* libio/Versions (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Added to GLIBC_2.1.
* libio/fileops.c (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Change the prefix to
"_IO_new_". Added to GLIBC_2.1.
* libio/libioP.h (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Add prototypes for the prefix
"_IO_new_".
* libio/oldfileops.c (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Added to GLIBC_2.0.
1998-08-23 Richard Henderson <rth@cygnus.com>
* Makeconfig (LDFLAGS): Remove.
* csu/initfini.c: Return to .text before __gmon_start__.
* elf/elf.h (EM_FAKE_ALPHA): Rename from EM_OLD_ALPHA.
(STO_MIPS_*): Rename from STO_*.
(STB_MIPS_SPLIT_COMMON): Rename from STB_SPLIT_COMMON.
(STO_ALPHA_NOPV, STO_ALPHA_STD_GPLOAD): New.
* math/atest-exp.c (mpn_bitsize): Fix bit location calculation.
(main): e3s is negative on zero.
* math/atest-exp2.c: Likewise.
* math/atest-sincos.c: Likewise.
1998-08-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* Makerules (install): Add comment about absolute paths.
1998-08-23 Ulrich Drepper <drepper@cygnus.com>
* libio/vsnprintf.c (_IO_vsnprintf): Set first byte of destination
array to NUL to handle maxlen==1 case correctly.
Patch by HJ Lu.
1998-08-23 Richard Henderson <rth@cygnus.com>
1998-08-23 18:23:26 +00:00
|
|
|
orl $-1, %eax; \
|
1998-06-07 14:06:56 +00:00
|
|
|
jmp L(pseudo_end);
|
1998-04-02 17:42:53 +00:00
|
|
|
# endif /* _LIBC_REENTRANT */
|
|
|
|
#endif /* PIC */
|
|
|
|
|
|
|
|
#endif /* linux/i386/i686/sysdep.h */
|