[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r13156 - in /libdfp/trunk: ./ include/ sysdeps/powerpc/ sysdeps/powerpc/powerpc32/ sysdeps/powerpc/powerpc32/power6/fpu/
- To: commits@xxxxxxxxxx
- Subject: [commits] r13156 - in /libdfp/trunk: ./ include/ sysdeps/powerpc/ sysdeps/powerpc/powerpc32/ sysdeps/powerpc/powerpc32/power6/fpu/
- From: ryanarn@xxxxxxxxxx
- Date: Tue, 15 Mar 2011 23:02:27 -0000
Author: ryanarn
Date: Tue Mar 15 16:02:26 2011
New Revision: 13156
Log:
2011-03-15 Ryan S. Arnold <rsa@xxxxxxxxxx>
* README.maintainer: Updated.
* sysdeps/powerpc/powerpc32/power6/fpu/fixunstdsi.S (END): Fix
erroneous __dpd_fixunstssi to __dpd_fixunstdsi.
* sysdeps/powerpc/powerpc32/sysdep.h (PROF): Removed PROF macros.
(CALL_MCOUNT): Removed CALL_MCOUNT.
(ENTRY): Removed CALL_MCOUNT and C_SYMBOL_NAME from macro body.
Replaced C_LABEL with LABEL.
(C_TEXT): Removed macro as unnecessary.
* sysdeps/powerpc/sysdep.h (C_LABEL): Removed macro.
* include/libdfp-symbols.h (LABEL): New macro which replaces C_LABEL
by removing preceding underscore.
* printf_dfp.c
Modified:
libdfp/trunk/README.maintainer
libdfp/trunk/include/libdfp-symbols.h
libdfp/trunk/printf_dfp.c
libdfp/trunk/sysdeps/powerpc/powerpc32/power6/fpu/fixunstdsi.S
libdfp/trunk/sysdeps/powerpc/powerpc32/sysdep.h
libdfp/trunk/sysdeps/powerpc/sysdep.h
Modified: libdfp/trunk/README.maintainer
==============================================================================
--- libdfp/trunk/README.maintainer (original)
+++ libdfp/trunk/README.maintainer Tue Mar 15 16:02:26 2011
@@ -29,3 +29,9 @@
9. Contributions
10. Commit Access
+
+---------------------------------------------------------------------------
+10. Commit Access
+
+commit-access@xxxxxxxxxx
+
Modified: libdfp/trunk/include/libdfp-symbols.h
==============================================================================
--- libdfp/trunk/include/libdfp-symbols.h (original)
+++ libdfp/trunk/include/libdfp-symbols.h Tue Mar 15 16:02:26 2011
@@ -1,6 +1,6 @@
/* Support macros for making weak and strong aliases for symbols.
- Copyright (C) 1995-1998, 2000-2006, 2008, 2009
+ Copyright (C) 1995-1998, 2000-2006, 2008, 2009, 2011
Free Software Foundation, Inc.
This file is part of the Decimal Floating Point C Library.
@@ -26,31 +26,10 @@
#ifndef _LIBDFP_SYMBOLS_H
#define _LIBDFP_SYMBOLS_H 1
-/* Adapted for libdfp from glibc's include/libc-symbols.h in 2009. */
-
-#ifndef __SYMBOL_PREFIX
-# ifdef NO_UNDERSCORES
-# define __SYMBOL_PREFIX
-# else
-# define __SYMBOL_PREFIX "_"
-# endif
-#endif
-
-
-
-#ifndef C_SYMBOL_NAME
-# ifdef NO_UNDERSCORES
-# define C_SYMBOL_NAME(name) name
-# else
-# define C_SYMBOL_NAME(name) _##name
-# endif
-#endif
-
-#ifndef ASM_LINE_SEP
-# define ASM_LINE_SEP ;
-#endif
-
-
+/* Define a macro we can use to construct the asm name for a C symbol. */
+#ifndef LABEL
+# define LABEL(name) name##:
+#endif /* LABEL */
#define MIN(a,b) (((a)<(b))?(a):(b))
Modified: libdfp/trunk/printf_dfp.c
==============================================================================
--- libdfp/trunk/printf_dfp.c (original)
+++ libdfp/trunk/printf_dfp.c Tue Mar 15 16:02:26 2011
@@ -319,7 +319,7 @@
return 1;
}
- return 0;
+ return -1;
}
strong_alias(__dfp_ais, dfp_ais)
hidden_def(__dfp_ais)
@@ -383,8 +383,8 @@
assert (decimalwc.wc != L'\0');
#else
/* Hard-code values from 'C' locale. */
- decimald = ".";
- decimal = &decimald;
+// decimald = ".";
+ decimal = ".";
decimalwc.wc = L'.';
#endif
@@ -476,7 +476,7 @@
__get_digits_d128 (d128, digits+1, &exp, &is_neg, &is_nan, &is_inf);
mw = __DEC128_MANT_DIG__ + 1;
}
- else
+ else if (info->user & mod_H)
{
_Decimal32 d32 = **(_Decimal32**)args[0];
if (d32 == 0) is_zero = 1;
@@ -484,6 +484,8 @@
__get_digits_d32 (d32, digits+1, &exp, &is_neg, &is_nan, &is_inf);
mw = __DEC32_MANT_DIG__ + 1;
}
+ else /* We shouldn't get here, but it is possible. */
+ return -2;
/* The first digit is always a zero to allow rounding. */
n = 0;
Modified: libdfp/trunk/sysdeps/powerpc/powerpc32/power6/fpu/fixunstdsi.S
==============================================================================
--- libdfp/trunk/sysdeps/powerpc/powerpc32/power6/fpu/fixunstdsi.S (original)
+++ libdfp/trunk/sysdeps/powerpc/powerpc32/power6/fpu/fixunstdsi.S Tue Mar 15 16:02:26 2011
@@ -1,6 +1,6 @@
/* Decimal Floating Point convert 128-bit to unsigned int.
- Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of the Decimal Floating Point C Library.
@@ -24,7 +24,6 @@
Please see libdfp/COPYING.txt for more information. */
#include <sysdep.h>
-
.machine "power6"
/* unsigned int __dpd_fixunstdsi (_Decimal128 x) */
@@ -54,5 +53,4 @@
L(done):
addi r1,r1,16
blr
- END (__dpd_fixunsddsi)
-
+ END (__dpd_fixunstdsi)
Modified: libdfp/trunk/sysdeps/powerpc/powerpc32/sysdep.h
==============================================================================
--- libdfp/trunk/sysdeps/powerpc/powerpc32/sysdep.h (original)
+++ libdfp/trunk/sysdeps/powerpc/powerpc32/sysdep.h Tue Mar 15 16:02:26 2011
@@ -1,6 +1,6 @@
/* Assembly macros for 32-bit PowerPC.
- Copyright (C) 1999, 2001, 2002, 2003, 2006, 2009
+ Copyright (C) 1999, 2001, 2002, 2003, 2006, 2009, 2011
Free Software Foundation, Inc.
This file is part of the Decimal Floating Point C Library.
@@ -23,34 +23,18 @@
#include <sysdeps/powerpc/sysdep.h>
-/* Taken from GLIBC in 2009. */
-
+/* Derived from GLIBC */
#ifdef __ASSEMBLER__
#ifdef __ELF__
-/* If compiled for profiling, call `_mcount' at the start of each
- function. */
-#ifdef PROF
-/* The mcount code relies on a the return address being on the stack
- to locate our caller and so it can restore it; so store one just
- for its benefit. */
-# define CALL_MCOUNT \
- mflr r0; \
- stw r0,4(r1); \
- cfi_offset (lr, 4); \
- bl JUMPTARGET(_mcount);
-#else /* PROF */
-# define CALL_MCOUNT /* Do nothing. */
-#endif /* PROF */
-
+#undef ENTRY
#define ENTRY(name) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ ASM_GLOBAL_DIRECTIVE name; \
+ ASM_TYPE_DIRECTIVE (name,@function) \
.align ALIGNARG(2); \
- C_LABEL(name) \
- cfi_startproc; \
- CALL_MCOUNT
+ LABEL(name) \
+ cfi_startproc;
#define EALIGN_W_0 /* No words to insert. */
#define EALIGN_W_1 nop
@@ -61,37 +45,24 @@
#define EALIGN_W_6 EALIGN_W_5;nop
#define EALIGN_W_7 EALIGN_W_6;nop
+#undef EALIGN
/* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes
past a 2^align boundary. */
-#ifdef PROF
-# define EALIGN(name, alignt, words) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
- .align ALIGNARG(2); \
- C_LABEL(name) \
- cfi_startproc; \
- CALL_MCOUNT \
- b 0f; \
- .align ALIGNARG(alignt); \
- EALIGN_W_##words; \
- 0:
-#else /* PROF */
-# define EALIGN(name, alignt, words) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
- .align ALIGNARG(alignt); \
- EALIGN_W_##words; \
- C_LABEL(name) \
- cfi_startproc;
-#endif
+#define EALIGN(name, alignt, words) \
+ ASM_GLOBAL_DIRECTIVE name; \
+ ASM_TYPE_DIRECTIVE (name,@function) \
+ .align ALIGNARG(alignt); \
+ EALIGN_W_##words; \
+ LABEL(name) \
+ cfi_startproc;
#undef END
#define END(name) \
cfi_endproc; \
ASM_SIZE_DIRECTIVE(name)
-#define DO_CALL(syscall) \
- li 0,syscall; \
+#define DO_CALL(syscall) \
+ li 0,syscall; \
sc
#undef JUMPTARGET
@@ -151,9 +122,6 @@
#undef L
#define L(x) .L##x
-/* Label in text section. */
-#define C_TEXT(name) name
-
#endif /* __ELF__ */
#endif /* __ASSEMBLER__ */
Modified: libdfp/trunk/sysdeps/powerpc/sysdep.h
==============================================================================
--- libdfp/trunk/sysdeps/powerpc/sysdep.h (original)
+++ libdfp/trunk/sysdeps/powerpc/sysdep.h Tue Mar 15 16:02:26 2011
@@ -21,20 +21,6 @@
Suite 330, Boston, MA 02111-1307 USA.
Please see libdfp/COPYING.txt for more information. */
-
-/* Adapted from GLIBC's powerpc/sysdep.h in 2009. */
-
-#ifndef C_LABEL
-/* Define a macro we can use to construct the asm name for a C symbol. */
-
-#ifdef __STDC__
-#define C_LABEL(name) _##name##:
-#else
-#define C_LABEL(name) _/**/name/**/:
-#endif
-
-#endif /* C_LABEL */
-
/*
* Powerpc Feature masks for the Aux Vector Hardware Capabilities (AT_HWCAP).