Commit Graph

27 Commits

Author SHA1 Message Date
Tulio Magno Quites Machado Filho 42bf1c8971 powerpc: Enforce compiler barriers on hardware transactions
Work around a GCC behavior with hardware transactional memory built-ins.
GCC doesn't treat the PowerPC transactional built-ins as compiler
barriers, moving instructions past the transaction boundaries and
altering their atomicity.
2016-01-08 17:47:33 -02:00
Joseph Myers f7a9f785e5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Adhemerval Zanella 56cf276381 powerpc: abort transaction in syscalls
Linux kernel powerpc documentation states issuing a syscall inside a
transaction is not recommended and may lead to undefined behavior. It
also states syscalls does not abort transactoin neither they run in
transactional state.

To avoid side-effects being visible outside transactions, GLIBC with
lock elision enabled will issue a transaction abort instruction just
before all syscalls if hardware supports hardware transactions.
2015-01-12 06:32:08 -05:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Adam Conrad 105fa38156 Allow sys/auxv.h to be used from the testsuite on powerpc and sparc.
elf/tst-auxv.c includes misc/sys/auxv.h, which ends up not actually
being included due to the guard overlap, and getauxval becomes an
implicit declaration and implicit pointer conversion which means, at
best, the test isn't actually testing what it thinks it is and, at
worst, it'll crash and burn on platforms where implict pointer
conversion is a Very Bad Thing.

	* sysdeps/powerpc/bits/hwcap.h: Allow _SYSDEPS_SYSDEP_H guard as a
	synonym for _SYS_AUXV_H to allow direct inclusion.
	* sysdeps/sparc/bits/hwcap.h: Likewise.
	* sysdeps/powerpc/sysdep.h: Define _SYSDEPS_SYSDEP_H instead of
	_SYS_AUXV_H so we can include sysdep.h and sys/auxv.h together.
	* sysdeps/sparc/sysdep.h: Likewise.
2014-02-21 00:24:03 -07:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Alan Modra 7b88401f3b PowerPC floating point little-endian [12 of 15]
http://sourceware.org/ml/libc-alpha/2013-08/msg00087.html

Fixes for little-endian in 32-bit assembly.

	* sysdeps/powerpc/sysdep.h (LOWORD, HIWORD, HISHORT): Define.
	* sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Load little-endian
	words of double from correct stack offsets.
	* sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: Likewise.
	* sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Likewise.
	* sysdeps/powerpc/powerpc32/fpu/s_lround.S: Likewise.
	* sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S: Likewise.
	* sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S: Likewise.
	* sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S: Likewise.
	* sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S: Likewise.
	* sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S: Likewise.
	* sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S: Likewise.
	* sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S: Likewise.
	* sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S: Likewise.
	* sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S: Likewise.
	* sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S: Likewise.
	* sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S: Likewise.
	* sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S: Likewise.
	* sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S: Use HISHORT.
	* sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: Likewise.
2013-10-04 10:35:43 +09:30
Joseph Myers 9c84384cc1 Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers 9003570a49 Define _SYS_AUXV_H to 1 not empty in sysdeps/powerpc/sysdep.h. 2012-12-04 21:45:01 +00:00
Marek Polacek b67e9372b2 Get rid of ASM_TYPE_DIRECTIVE{,_PREFIX}. 2012-08-02 21:04:29 +02:00
Richard Henderson c7683a6d02 Add <sys/auxv.h> and getauxval. 2012-05-20 10:40:35 -07:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Marek Polacek 622c86f480 Remove __ELF__ conditionals 2012-02-07 00:41:11 +01:00
Andreas Schwab 2123d5815e Fix wrong PPC_FEATURE_* values.
Nothing uses these wrong values yet, but it fixes a warning due to
conflicting definitions in <asm/cputable.h>.
2009-07-05 23:46:03 -07:00
Ulrich Drepper 1642331d30 [BZ #6817]
2008-08-01  Steven Munroe  <sjmunroe@us.ibm.com>
	    Carlos Eduardo Seo  <cseo@linux.vnet.ibm.com>

	[BZ #6817]
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags):
	Added the members 'vsx' and 'arch_2_06'.
	(_dl_powerpc_platforms): Add the member 'power7'.
	* sysdeps/powerpc/dl-procinfo.h: Modify _DL_HWCAP_FIRST
	to reflect the changes required by VSX and ISA 2.06.
	Modify _DL_PLATFORMS_COUNT to reflect the addition of
	'power7'.
	Defined PPC_PLATFORM_POWER7.
	(_dl_string_platform): Add support for POWER7.
	* sysdeps/powerpc/sysdep.h: Define bit masks for VSX
	capability and ISA 2.06.
2008-08-08 04:51:57 +00:00
Ulrich Drepper 594d423aa3 * elf/dl-support.c: Include dl-procinfo.h.
* sysdeps/powerpc/dl-procinfo.h (PPC_PLATFORM_POWER4,
	PPC_PLATFORM_PPC970, PPC_PLATFORM_POWER5, PPC_PLATFORM_POWER5_PLUS,
	PPC_PLATFORM_POWER6, PPC_PLATFORM_CELL_BE, PPC_PLATFORM_POWER6X):
	Define.
	(_dl_string_platform): Use PPC_PLATFORM_* macros instead of
	hardcoded constants.
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platform): Use
	PPC_PLATFORM_* macros for array designators.

2006-11-11  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 3 new cap
	names to the beginning.
	(_dl_powerpc_platforms): Add "power6x".
	* sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease.
	(HWCAP_IMPORTANT): Add PPC_FEATURE_HAS_DFP.
	(_DL_PLATFORMS_COUNT): Increase.
	(_dl_string_platform): Handle power6x case.
	* sysdeps/powerpc/sysdep.h (PPC_FEATURE_PA6T, PPC_FEATURE_HAS_DFP,
	PPC_FEATURE_POWER6_EXT): Define.
	(PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS): Correct Comment.
2006-12-19 15:30:39 +00:00
Ulrich Drepper 4cd3633d1a 2006-09-14 Jakub Jelinek <jakub@redhat.com>
Steven Munroe  <sjmunroe@us.ibm.com>
	    
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 4 new cap
	names to the beginning.  Rename "cell" to "cellbe".
	(_dl_powerpc_platforms): New.
	* sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease.
	(HWCAP_IMPORTANT): Remove power{4,5,5+} and cell.
	(_DL_PLATFORMS_COUNT, _DL_FIRST_PLATFORM): Define.
	(_DL_HWCAP_PLATFORM): Define to new mask.
	(_dl_platform_string, _dl_string_platform): New functions.
	* sysdeps/powerpc/sysdep.h (PPC_FEATURE_BOOKE, PPC_FEATURE_SMT,
	PPC_FEATURE_ICACHE_SNOOP, PPC_FEATURE_ARCH_2_05): Define.
2006-09-15 07:48:10 +00:00
Ulrich Drepper 8f84d93108 [BZ #1877]
2005-11-17  Steven Munroe  <sjmunroe@us.ibm.com>
	[BZ #1877]
	* string/test-strncmp.c (do_test_limit): Handle zero length and
	non-zero align values.
	(test_main): Correct do_test_limit tests for 64-bit.

2005-11-15  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/sysdep.h (PPC_FEATURE_HAS_SPE,
	PPC_FEATURE_HAS_EFP_SINGLE, PPC_FEATURE_HAS_EFP_DOUBLE,
	PPC_FEATURE_NO_TB, PPC_FEATURE_POWER4, PPC_FEATURE_POWER5,
	PPC_FEATURE_POWER5_PLUS, PPC_FEATURE_CELL, PPC_FEATURE_970):
	Define to match 2.6.15 kernel.

	* sysdeps/powerpc/fpu/e_sqrt.c: Remove dl-procinfo.h include.
	* sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
	* sysdeps/powerpc/fpu/w_sqrtf.c: Likewise.
2005-11-18 00:12:44 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00
Ulrich Drepper ffdd5e50e1 Update.
2004-05-25  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/fpu/Makefile: Make ld.so a dependency of libm.so.
	* sysdeps/powerpc/fpu/bits/mathinline.h [__LIBC_INERNAL_MATH_INLINES]
	(__ieee754_sqrt): Define as __MATH_INLINE using fsqrt instruction.
	(__ieee754_sqrtf): Define as __MATH_INLINE using fsqrts instruction.
	* sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Moved
	implementation from w_sqrt.c.
	* sysdeps/powerpc/fpu/e_sqrtf.c (__slow_ieee754_sqrtf): Moved
	implementation from w_sqrtf.c.
	* sysdeps/powerpc/fpu/w_sqrt.c (__sqrt): Wrapper implementation
	using inline __ieee754_sqrt().
	* sysdeps/powerpc/fpu/w_sqrtf.c (__sqrtf): Wrapper implementation
	using inline __ieee754_sqrtf().
	* sysdeps/powerpc/powerpc32/sysdep.h [__ASSEMBLER__]: Include
	<sysdeps/powerpc/sysdep.h> independent of __ASSEMBLER__.
	* sysdeps/powerpc/sysdep.h [__ASSEMBLER__] (PPC_FEATURE_*): Define
	PPC_FEATURE_*  independent of __ASSEMBLER__.

2004-05-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/pthread/aio_notify.c: Use <> instead of "" for aio_misc.h
	include.
	(aio_start_notify_thread): Define if not defined.
	(notify_func_wrapper): Use it.
	* sysdeps/pthread/aio_misc.c: Use <> instead of "" for aio_misc.h
	include.
	(aio_create_helper_thread): Define if not defined.
	(__aio_create_helper_thread): New function.
	(__aio_enqueue_request): Use aio_create_helper_thread.

	* nis/ypclnt.c (ypall_data, ypall_foreach): Remove.
	(struct ypresp_all_data): New type.
	(__xdr_ypresp_all): Change second argument to
	struct ypresp_all_data *.  Replace ypall_foreach and
	ypall_data with objp->foreach and objp->data.
	(yp_all): Remove status variable, add data.  Replace
	all uses of status with data.status.  Initialize data.foreach
	and data.data instead of ypall_foreach and ypall_data.

2004-05-24  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-lookup.c (add_dependency): Set DF_1_NODELETE bit
	in l_flags_1, not in l_flags.
2004-05-26 04:47:00 +00:00
Ulrich Drepper 5ef6ae4bdb Update.
2004-01-14  Steven Munroe  <sjmunroe@us.ibm.com>

	* include/libc-symbols.h [HAVE_ASM_GLOBAL_DOT_NAME]
	(_symbol_version): Use C_SYMBOL_DOT_NAME to create '.'ed symbols.
	(_default_symbol_version): Use C_SYMBOL_DOT_NAME to create '.'ed
	symbols.
	* sysdeps/powerpc/Makefile: Add rtld-global-offsets.sym to
	gen-as-const-headers.
	* sysdeps/powerpc/elf/rtld-global-offsets.sym: New file.
	* sysdeps/powerpc/sysdep.h: Define v# symbols for vector registers.
	Define PPC_FEATURE_* masks for Aux Vector AT_HWCAP.
	* sysdeps/unix/sysv/linux/kernel-features.h
	(__ASSUME_SWAPCONTEXT_SYSCALL): Define for PPC and 2.6.0 kernels.
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h [!__WORDSIZE == 32]:
	Declare mcontext_t inline and include altivec state for 64-bit.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: Add GLIBC_2.3.4
	versions for setcontext, getcontext, and swapcontext.

	* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: Add GLIBC_2.3.4
	versions for setcontext, getcontext, swapcontext, and makecontext.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
	(__getcontext):  Upgrade to save Altivec regs and version GLIBC_2_3_4.
	[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_getcontext):
	Compatible with GLIBC_2.3.3 release.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
	(__makecontext): Use parm save area instead of compiler_dw to hold
	context pointer.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
	(__setcontext):  Upgrade to restore Altivec regs and version
	GLIBC_2_3_4.
	[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_setcontext):
	Compatible with GLIBC_2.3.3 release.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
	(__swapcontext): Upgrade to swap Altivec regs and version GLIBC_2_3_4.
	[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_swapcontext):
	Compatible with GLIBC_2.3.3 release.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h
	(SIGCONTEXT_V_REGS_PTR, SIGCONTEXT_V_RESERVE): Defined.


2004-01-12  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions: Add GLIBC_2.3.4
	versions for setcontext, getcontext, swapcontext, and makecontext.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
	(__getcontext):  Upgrade to save Altivec regs and version GLIBC_2_3_4.
	[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_getcontext):
	Compatible with GLIBC_2.3.3 release.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
	(__makecontext): Upgrade to align for Altivec regs and version
	GLIBC_2_3_4.
	[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_makecontext):
	Compatible with GLIBC_2.3.3 release.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
	(__setcontext):  Upgrade to restore Altivec regs and version
	GLIBC_2_3_4.
	[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_setcontext):
	Compatible with GLIBC_2.3.3 release.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
	(__swapcontext): Upgrade to swap Altivec regs and version GLIBC_2_3_4.
	[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)]
	(__novec_swapcontext): Compatible with GLIBC_2.3.3 release.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h:
	(_UC_VSCR, _UC_VRSAVE): Define.
	(_FRAME_BACKCHAIN, _FRAME_LR_SAVE,_FRAME_PARM_SAVE1,_FRAME_PARM_SAVE2,
	_FRAME_PARM_SAVE3, _FRAME_PARM_SAVE4): Defined.
2004-01-16 04:50:59 +00:00
Roland McGrath b80a3db02e * sysdeps/powerpc/sysdep.h: Remove powerpc32 specific macros.
* sysdeps/powerpc/powerpc32/sysdep.h: New file.  Define powerpc32
	specific macros copied from sysdeps/powerpc/sysdep.h.
	* sysdeps/powerpc/powerpc64/sysdep.h: New file.  Define powerpc64
	specific macros.
	* sysdeps/unix/powerpc/sysdep.h: Include <bits/wordsize.h>.
	[__WORDSIZE==64]: Include sysdeps/powerpc/powerpc64/sysdep.h.
	[!__WORDSIZE==64]: Include sysdeps/powerpc/powerpc32/sysdep.h.
2002-09-20 23:46:03 +00:00
Roland McGrath 7ac887d438 2001-11-05 Roland McGrath <roland@frob.com>
* sysdeps/powerpc/elf/sysdep.h: Remove this file, because it overrides
	the more-specific unix/sysv/linux/powerpc file and breaks everything.
	* sysdeps/powerpc/sysdep.h (ALIGNARG, ASM_TYPE_DIRECTIVE,
	ASM_SIZE_DIRECTIVE, CALL_MCOUNT, ENTRY, EALIGN, DO_CALL, JUMPTARGET,
	PSEUDO, PSEUDO_RET, PSEUDO_END, L, C_TEXT): These macros moved here
	here, put under [__ELF__].
2001-11-05 09:30:21 +00:00
Andreas Jaeger 41bdb6e20c Update to LGPL v2.1.
2001-07-06  Paul Eggert  <eggert@twinsun.com>

	* manual/argp.texi: Remove ignored LGPL copyright notice; it's
	not appropriate for documentation anyway.
	* manual/libc-texinfo.sh: "Library General Public License" ->
	"Lesser General Public License".

2001-07-06  Andreas Jaeger  <aj@suse.de>

	* All files under GPL/LGPL version 2: Place under LGPL version
	2.1.
2001-07-06 04:58:11 +00:00
Ulrich Drepper be9cd93a78 Update.
1999-10-10  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/powerpc/sysdep.h: New file.
	* sysdeps/unix/powerpc/sysdep.h: New file.
	* sysdeps/unix/sysv/linux/powerpc/sysdep.h: Include
	sysdeps/unix/powerpc/sysdep.h, not sysdeps/unix/sysdep.h.
	* sysdeps/powerpc/fpu/s_copysign.S: Use symbolic names for registers
	instead of bare numbers.
	* sysdeps/powerpc/fpu/s_fabs.S: Likewise.
	* sysdeps/powerpc/fpu/s_fmax.S: Likewise.
	* sysdeps/powerpc/fpu/s_fmin.S: Likewise.

	* sysdeps/hppa/sysdep.h: New file.
1999-10-10 20:36:40 +00:00