diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-01-30 09:30:09 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-01-30 09:30:09 +0000 |
commit | 3e543bc56346540cbf73fd48d0172fc6a588efd5 (patch) | |
tree | b2c3502b6596d238ac861cc82cafdc6f8b84e143 /sysdeps/x86_64 | |
parent | 06f313e361a523605ba6d4c9cdc67a7353cd367c (diff) | |
download | glibc-3e543bc56346540cbf73fd48d0172fc6a588efd5.tar.gz glibc-3e543bc56346540cbf73fd48d0172fc6a588efd5.tar.xz glibc-3e543bc56346540cbf73fd48d0172fc6a588efd5.zip |
Updated to fedora-glibc-20060130T0922
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r-- | sysdeps/x86_64/__longjmp.S | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/bits/setjmp.h | 41 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/libm-test-ulps | 4 | ||||
-rw-r--r-- | sysdeps/x86_64/jmpbuf-offsets.h | 30 | ||||
-rw-r--r-- | sysdeps/x86_64/jmpbuf-unwind.h | 48 | ||||
-rw-r--r-- | sysdeps/x86_64/setjmp.S | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/strtok.S | 4 |
7 files changed, 88 insertions, 51 deletions
diff --git a/sysdeps/x86_64/__longjmp.S b/sysdeps/x86_64/__longjmp.S index 6e21092451..a68e7a8a4f 100644 --- a/sysdeps/x86_64/__longjmp.S +++ b/sysdeps/x86_64/__longjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2001,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,9 +17,7 @@ 02111-1307 USA. */ #include <sysdep.h> -#define _ASM -#define _SETJMP_H -#include <bits/setjmp.h> +#include <jmpbuf-offsets.h> #include <asm-syntax.h> /* Jump to the position specified by ENV, causing the diff --git a/sysdeps/x86_64/bits/setjmp.h b/sysdeps/x86_64/bits/setjmp.h index 1031d5027b..c9b98b2e3b 100644 --- a/sysdeps/x86_64/bits/setjmp.h +++ b/sysdeps/x86_64/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2001,2002,2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -26,36 +26,6 @@ #include <bits/wordsize.h> -#if __WORDSIZE == 64 - -/* We only need to save callee-saved registers plus stackpointer and - program counter. */ -# if defined __USE_MISC || defined _ASM -# define JB_RBX 0 -# define JB_RBP 1 -# define JB_R12 2 -# define JB_R13 3 -# define JB_R14 4 -# define JB_R15 5 -# define JB_RSP 6 -# define JB_PC 7 -# define JB_SIZE (8*8) -# endif - -#else - -# if defined __USE_MISC || defined _ASM -# define JB_BX 0 -# define JB_SI 1 -# define JB_DI 2 -# define JB_BP 3 -# define JB_SP 4 -# define JB_PC 5 -# define JB_SIZE 24 -# endif - -#endif - #ifndef _ASM # if __WORDSIZE == 64 @@ -64,15 +34,6 @@ typedef long int __jmp_buf[8]; typedef int __jmp_buf[6]; # endif -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -# if __WORDSIZE == 64 -# define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ - ((void *) (address) < (void *) demangle ((jmpbuf)[JB_RSP])) -# else -# define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ - ((void *) (address) < (void *) demangle ((jmpbuf)[JB_SP])) -# endif #endif #endif /* bits/setjmp.h */ diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index 425549dd0e..0ced4be7b8 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -48,14 +48,14 @@ ildouble: 2 ldouble: 2 # cacosh -Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 7 idouble: 1 ifloat: 7 ildouble: 6 ldouble: 6 -Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 3 idouble: 1 diff --git a/sysdeps/x86_64/jmpbuf-offsets.h b/sysdeps/x86_64/jmpbuf-offsets.h new file mode 100644 index 0000000000..46c7768013 --- /dev/null +++ b/sysdeps/x86_64/jmpbuf-offsets.h @@ -0,0 +1,30 @@ +/* Private macros for accessing __jmp_buf contents. x86-64 version. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + 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. + + 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 + Lesser General Public License for more details. + + 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. */ + +/* We only need to save callee-saved registers plus stackpointer and + program counter. */ +#define JB_RBX 0 +#define JB_RBP 1 +#define JB_R12 2 +#define JB_R13 3 +#define JB_R14 4 +#define JB_R15 5 +#define JB_RSP 6 +#define JB_PC 7 +#define JB_SIZE (8*8) diff --git a/sysdeps/x86_64/jmpbuf-unwind.h b/sysdeps/x86_64/jmpbuf-unwind.h new file mode 100644 index 0000000000..299a4a8d14 --- /dev/null +++ b/sysdeps/x86_64/jmpbuf-unwind.h @@ -0,0 +1,48 @@ +/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. + + The GNU C Library is free software; you can redistribute it and/or + 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. + + 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 + Lesser General Public License for more details. + + 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. */ + +#include <setjmp.h> +#include <jmpbuf-offsets.h> +#include <stdint.h> +#include <unwind.h> +#include <sysdep.h> + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle ((jmpbuf)[JB_RSP])) + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +static inline uintptr_t __attribute__ ((unused)) +_jmpbuf_sp (__jmp_buf regs) +{ + uintptr_t sp = regs[JB_RSP]; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (sp); +#endif + return sp; +} + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj)) + +/* We use the normal longjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) diff --git a/sysdeps/x86_64/setjmp.S b/sysdeps/x86_64/setjmp.S index 39c78c9981..a66b0e61e5 100644 --- a/sysdeps/x86_64/setjmp.S +++ b/sysdeps/x86_64/setjmp.S @@ -1,5 +1,5 @@ /* setjmp for x86-64. - Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,9 +18,7 @@ 02111-1307 USA. */ #include <sysdep.h> -#define _ASM -#define _SETJMP_H -#include <bits/setjmp.h> +#include <jmpbuf-offsets.h> #include <asm-syntax.h> ENTRY (__sigsetjmp) diff --git a/sysdeps/x86_64/strtok.S b/sysdeps/x86_64/strtok.S index de427dc6f3..4037f0b850 100644 --- a/sysdeps/x86_64/strtok.S +++ b/sysdeps/x86_64/strtok.S @@ -1,6 +1,6 @@ /* strtok (str, delim) -- Return next DELIM separated token from STR. For AMD x86-64. - Copyright (C) 1998,2000,2001,2002,2003,2005 Free Software Foundation, Inc. + Copyright (C) 1998,2000-2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Based on i686 version contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -205,6 +205,8 @@ L(epilogue): L(returnNULL): xorl %eax, %eax + /* Store the pointer to the next character. */ + movq %rdx, SAVE_PTR jmp L(epilogue) END (BP_SYM (FUNCTION)) |