1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
1998-11-17  Ulrich Drepper  <drepper@cygnus.com>

	* stdio-common/printf_fphex.c (__printf_fphex): Correct printing
	of denormalized numbers.

1998-10-06  Geoff Keating  <geoffk@ozemail.com.au>

	* sysdeps/powerpc/dl-machine.h (elf_machine_load_address): Suppress
	another parentheses warning, make nano-optimisation.

	* sysdeps/powerpc/dl-machine.h (_dl_runtime_resolve): Preserve
	saved LR on stack so _mcount works.
	(_dl_prof_resolve): Likewise.
	* sysdeps/powerpc/register-dump.h: Print FPRs.  Adjust for correct
	signal handler calling convention.
	* sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h: Adjust for
	correct signal handler calling convention---more like x86 linux and
	mklinux, less like linux-ppc versions between 2.1 and 2.1.126.

1998-11-17  Ulrich Drepper  <drepper@cygnus.com>

	* configure.in: Correct allowed makeinfo version.

1998-11-17  Philip Blundell  <pb@nexus.co.uk>

	* sysdeps/generic/bits/mathdef.h: Fix typo.

	* intl/locale.alias: Change `japanese' alias to match X11R6's.
This commit is contained in:
Ulrich Drepper
1998-11-17 18:36:05 +00:00
parent cae8899646
commit d8cceb4fcf
9 changed files with 115 additions and 58 deletions

View File

@ -1,3 +1,30 @@
1998-11-17 Ulrich Drepper <drepper@cygnus.com>
* stdio-common/printf_fphex.c (__printf_fphex): Correct printing
of denormalized numbers.
1998-10-06 Geoff Keating <geoffk@ozemail.com.au>
* sysdeps/powerpc/dl-machine.h (elf_machine_load_address): Suppress
another parentheses warning, make nano-optimisation.
* sysdeps/powerpc/dl-machine.h (_dl_runtime_resolve): Preserve
saved LR on stack so _mcount works.
(_dl_prof_resolve): Likewise.
* sysdeps/powerpc/register-dump.h: Print FPRs. Adjust for correct
signal handler calling convention.
* sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h: Adjust for
correct signal handler calling convention---more like x86 linux and
mklinux, less like linux-ppc versions between 2.1 and 2.1.126.
1998-11-17 Ulrich Drepper <drepper@cygnus.com>
* configure.in: Correct allowed makeinfo version.
1998-11-17 Philip Blundell <pb@nexus.co.uk>
* sysdeps/generic/bits/mathdef.h: Fix typo.
1998-11-17 Geoff Keating <geoffk@ozemail.com.au> 1998-11-17 Geoff Keating <geoffk@ozemail.com.au>
* sysdeps/unix/sysv/linux/powerpc/pwrite.c: Prototype the syscall * sysdeps/unix/sysv/linux/powerpc/pwrite.c: Prototype the syscall
@ -11,7 +38,7 @@
1998-11-16 Ulrich Drepper <drepper@cygnus.com> 1998-11-16 Ulrich Drepper <drepper@cygnus.com>
* intl/locale.alias: Change `japanese' alais to match X11R6's. * intl/locale.alias: Change `japanese' alias to match X11R6's.
Add `japanese.euc' alias. Add `japanese.euc' alias.
* manual/Makefile (%.info): Set LANGUAGE and LC_ALL explicitly to C * manual/Makefile (%.info): Set LANGUAGE and LC_ALL explicitly to C

View File

@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
if !defined _MATH_H && !defined _COMPLEX_H #if !defined _MATH_H && !defined _COMPLEX_H
# error "Never use <bits/mathdef.h> directly; include <math.h> instead" # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif #endif

2
configure vendored
View File

@ -1432,7 +1432,7 @@ echo "configure:1432: checking version of $MAKEINFO" >&5
ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
case $ac_prog_version in case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
3.1[1-9] | 3.[2-9][0-9]) 1.6[89] | 1.7[0-9])
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;

View File

@ -451,7 +451,7 @@ AC_CHECK_PROG_VER(MSGFMT, msgfmt gmsgfmt, --version,
[0.[1-9][0-9].* | [1-9].*], MSGFMT=: aux_missing=t) [0.[1-9][0-9].* | [1-9].*], MSGFMT=: aux_missing=t)
AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
[GNU texinfo.* \([0-9][0-9.]*\)], [GNU texinfo.* \([0-9][0-9.]*\)],
[3.1[1-9] | 3.[2-9][0-9]], MAKEINFO=: aux_missing=t) [1.6[89] | 1.7[0-9]], MAKEINFO=: aux_missing=t)
if test -n "$critic_missing"; then if test -n "$critic_missing"; then
AC_MSG_ERROR([ AC_MSG_ERROR([

View File

@ -1,6 +1,6 @@
/* Print floating point number in hexadecimal notation according to /* Print floating point number in hexadecimal notation according to
ISO C 9X. ISO C 9X.
Copyright (C) 1997 Free Software Foundation, Inc. Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -244,16 +244,26 @@ __printf_fphex (FILE *fp,
exponent = fpnum.dbl.ieee.exponent; exponent = fpnum.dbl.ieee.exponent;
if (exponent == 0 ? !zero_mantissa : exponent < IEEE754_DOUBLE_BIAS) if (exponent == 0)
{ {
expnegative = 1; if (zero_mantissa)
exponent = -(exponent - IEEE754_DOUBLE_BIAS); expnegative = 0;
else
{
/* This is a denormalized number. */
expnegative = 1;
exponent = -(1 - IEEE754_DOUBLE_BIAS);
}
}
else if (exponent >= IEEE754_DOUBLE_BIAS)
{
expnegative = 0;
exponent -= IEEE754_DOUBLE_BIAS;
} }
else else
{ {
expnegative = 0; expnegative = 1;
if (exponent != 0) exponent = -(exponent - IEEE754_DOUBLE_BIAS);
exponent -= IEEE754_DOUBLE_BIAS;
} }
} }
else else
@ -282,20 +292,30 @@ __printf_fphex (FILE *fp,
/* We use a full nibble for the leading digit. */ /* We use a full nibble for the leading digit. */
leading = *numstr++; leading = *numstr++;
/* We have 3 bits from the mantissa in the leading nibble. */ /* We have 3 bits from the mantissa in the leading nibble.
Therefore we are here using `IEEE854_LONG_DOUBLE_BIAS + 3'. */
exponent = fpnum.ldbl.ieee.exponent; exponent = fpnum.ldbl.ieee.exponent;
if (exponent == 0 ? !zero_mantissa if (exponent == 0)
: exponent < IEEE854_LONG_DOUBLE_BIAS + 3)
{ {
expnegative = 1; if (zero_mantissa)
exponent = -(exponent - (IEEE854_LONG_DOUBLE_BIAS + 3)); expnegative = 0;
else
{
/* This is a denormalized number. */
expnegative = 1;
exponent = -(1 - (IEEE854_LONG_DOUBLE_BIAS + 3));
}
}
else if (exponent >= IEEE854_LONG_DOUBLE_BIAS + 3)
{
expnegative = 0;
exponent -= IEEE854_LONG_DOUBLE_BIAS + 2;
} }
else else
{ {
expnegative = 0; expnegative = 1;
if (exponent != 0) exponent = -(exponent - (IEEE854_LONG_DOUBLE_BIAS + 3));
exponent -= IEEE854_LONG_DOUBLE_BIAS + 3;
} }
} }

View File

@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
if !defined _MATH_H && !defined _COMPLEX_H #if !defined _MATH_H && !defined _COMPLEX_H
# error "Never use <bits/mathdef.h> directly; include <math.h> instead" # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif #endif

View File

@ -91,8 +91,7 @@ elf_machine_load_address (void)
/* So now work out the difference between where the branch actually points, /* So now work out the difference between where the branch actually points,
and the offset of that location in memory from the start of the file. */ and the offset of that location in memory from the start of the file. */
return ((Elf32_Addr)branchaddr - *got return ((Elf32_Addr)branchaddr - *got
+ (*branchaddr & 0x3fffffc + ((int)(*branchaddr << 6 & 0xffffff00) >> 6));
| (int)(*branchaddr << 6 & 0x80000000) >> 6));
} }
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) /* nothing */ #define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) /* nothing */
@ -111,7 +110,7 @@ elf_machine_load_address (void)
_dl_runtime_resolve: _dl_runtime_resolve:
# We need to save the registers used to pass parameters, and register 0, # We need to save the registers used to pass parameters, and register 0,
# which is used by _mcount; the registers are saved in a stack frame. # which is used by _mcount; the registers are saved in a stack frame.
stwu 1,-48(1) stwu 1,-64(1)
stw 0,12(1) stw 0,12(1)
stw 3,16(1) stw 3,16(1)
stw 4,20(1) stw 4,20(1)
@ -123,7 +122,7 @@ _dl_runtime_resolve:
mflr 0 mflr 0
# We also need to save some of the condition register fields. # We also need to save some of the condition register fields.
stw 7,32(1) stw 7,32(1)
stw 0,52(1) stw 0,48(1)
stw 8,36(1) stw 8,36(1)
mfcr 0 mfcr 0
stw 9,40(1) stw 9,40(1)
@ -133,7 +132,7 @@ _dl_runtime_resolve:
# 'fixup' returns the address we want to branch to. # 'fixup' returns the address we want to branch to.
mtctr 3 mtctr 3
# Put the registers back... # Put the registers back...
lwz 0,52(1) lwz 0,48(1)
lwz 10,44(1) lwz 10,44(1)
lwz 9,40(1) lwz 9,40(1)
mtlr 0 mtlr 0
@ -147,7 +146,7 @@ _dl_runtime_resolve:
lwz 3,16(1) lwz 3,16(1)
lwz 0,12(1) lwz 0,12(1)
# ...unwind the stack frame, and jump to the PLT entry we updated. # ...unwind the stack frame, and jump to the PLT entry we updated.
addi 1,1,48 addi 1,1,64
bctr bctr
.size _dl_runtime_resolve,.-_dl_runtime_resolve .size _dl_runtime_resolve,.-_dl_runtime_resolve
@ -157,7 +156,7 @@ _dl_runtime_resolve:
_dl_prof_resolve: _dl_prof_resolve:
# We need to save the registers used to pass parameters, and register 0, # We need to save the registers used to pass parameters, and register 0,
# which is used by _mcount; the registers are saved in a stack frame. # which is used by _mcount; the registers are saved in a stack frame.
stwu 1,-48(1) stwu 1,-64(1)
stw 0,12(1) stw 0,12(1)
stw 3,16(1) stw 3,16(1)
stw 4,20(1) stw 4,20(1)
@ -169,7 +168,7 @@ _dl_prof_resolve:
mflr 5 mflr 5
# We also need to save some of the condition register fields. # We also need to save some of the condition register fields.
stw 7,32(1) stw 7,32(1)
stw 5,52(1) stw 5,48(1)
stw 8,36(1) stw 8,36(1)
mfcr 0 mfcr 0
stw 9,40(1) stw 9,40(1)
@ -179,7 +178,7 @@ _dl_prof_resolve:
# 'fixup' returns the address we want to branch to. # 'fixup' returns the address we want to branch to.
mtctr 3 mtctr 3
# Put the registers back... # Put the registers back...
lwz 0,52(1) lwz 0,48(1)
lwz 10,44(1) lwz 10,44(1)
lwz 9,40(1) lwz 9,40(1)
mtlr 0 mtlr 0
@ -193,7 +192,7 @@ _dl_prof_resolve:
lwz 3,16(1) lwz 3,16(1)
lwz 0,12(1) lwz 0,12(1)
# ...unwind the stack frame, and jump to the PLT entry we updated. # ...unwind the stack frame, and jump to the PLT entry we updated.
addi 1,1,48 addi 1,1,64
bctr bctr
.size _dl_prof_resolve,.-_dl_prof_resolve .size _dl_prof_resolve,.-_dl_prof_resolve
# Undo '.section text'. # Undo '.section text'.

View File

@ -21,16 +21,26 @@
#include <stdio-common/_itoa.h> #include <stdio-common/_itoa.h>
/* This prints out the information in the following form: */ /* This prints out the information in the following form: */
static const char dumpform[] = static const char dumpform[] = "\
"Register dump:\n\ Register dump:
r0 =0000000% sp =0000000% r2 =0000000% r3 =0000000% r4 =0000000% r5 =0000000% fp0-3: 0000030%0000031% 0000032%0000033% 0000034%0000035% 0000036%0000037%
r6 =0000000% r7 =0000000% r8 =0000000% r9 =0000000% r10=0000000% r11=0000000% fp4-7: 0000038%0000039% 000003a%000003b% 000003c%000003d% 000003e%000003f%
r12=0000000% r13=0000000% r14=0000000% r15=0000000% r16=0000000% r17=0000000% fp8-11: 0000040%0000041% 0000042%0000043% 0000044%0000045% 0000046%0000047%
r18=0000000% r19=0000000% r20=0000000% r21=0000000% r22=0000000% r23=0000000% fp12-15: 0000048%0000049% 000004a%000004b% 000004c%000004d% 000004e%000004f%
r24=0000000% r25=0000000% r26=0000000% r27=0000000% r28=0000000% r29=0000000% fp16-19: 0000050%0000051% 0000052%0000053% 0000054%0000055% 0000056%0000057%
r30=0000000% r31=0000000% sr0=0000000% msr=0000000% r3*=0000000% ctr=0000000% fp20-23: 0000058%0000059% 000005a%000005b% 000005c%000005d% 000005e%000005f%
lr =0000000% xer=0000000% ccr=0000000% sr1=0000000% trap=0000000% fp24-27: 0000060%0000061% 0000062%0000063% 0000064%0000065% 0000066%0000067%
address of fault=0000000% dsisr=0000000%\n"; fp28-31: 0000068%0000069% 000006a%000006b% 000006c%000006d% 000006e%000006f%
r0 =0000000% sp =0000001% r2 =0000002% r3 =0000003% trap=0000028%
r4 =0000004% r5 =0000005% r6 =0000006% r7 =0000007% sr0=0000020% sr1=0000021%
r8 =0000008% r9 =0000009% r10=000000a% r11=000000b% dar=0000029% dsi=000002a%
r12=000000c% r13=000000d% r14=000000e% r15=000000f% r3*=0000022%
r16=0000010% r17=0000011% r18=0000012% r19=0000013%
r20=0000014% r21=0000015% r22=0000016% r23=0000017% lr=0000024% xer=0000025%
r24=0000018% r25=0000019% r26=000001a% r27=000001b% mq=0000027% ctr=0000023%
r28=000001c% r29=000001d% r30=000001e% r31=000001f% fscr=0000071% ccr=0000026%
";
/* Most of the fields are self-explanatory. 'sr0' is the next /* Most of the fields are self-explanatory. 'sr0' is the next
instruction to execute, from SRR0, which may have some relationship instruction to execute, from SRR0, which may have some relationship
with the instruction that caused the exception. 'r3*' is the value with the instruction that caused the exception. 'r3*' is the value
@ -66,8 +76,8 @@ address of fault=0000000% dsisr=0000000%\n";
00C00 - System call exception (for instance, kill(3)). 00C00 - System call exception (for instance, kill(3)).
00E00 - FP assist exception (optional FP instructions, etc.) 00E00 - FP assist exception (optional FP instructions, etc.)
'address of fault' is the memory location that wasn't mapped 'dar' is the memory location, for traps 00300, 00400, 00600, 00A00.
(from the DAR). 'dsisr' has the following bits under trap 00300: 'dsisr' has the following bits under trap 00300:
0 - direct-store error exception 0 - direct-store error exception
1 - no page table entry for page 1 - no page table entry for page
4 - memory access not permitted 4 - memory access not permitted
@ -82,23 +92,24 @@ address of fault=0000000% dsisr=0000000%\n";
the instruction without actually having to read it from memory. the instruction without actually having to read it from memory.
*/ */
#define xtoi(x) (x >= 'a' ? x + 10 - 'a' : x - '0')
static void static void
register_dump (int fd, void **ctx) register_dump (int fd, struct sigcontext *ctx)
{ {
char buffer[sizeof(dumpform)]; char buffer[sizeof(dumpform)];
char *bufferpos = buffer; char *bufferpos;
int i = 0; unsigned regno;
unsigned *regs = (unsigned *)(ctx->regs);
memcpy(buffer, dumpform, sizeof(dumpform)); memcpy(buffer, dumpform, sizeof(dumpform));
ctx += 8; /* FIXME!!!! Why is this necessary? Is it necessary? */
/* Generate the output. */ /* Generate the output. */
while ((bufferpos = memchr (bufferpos, '%', sizeof(dumpform)))) while ((bufferpos = memchr (buffer, '%', sizeof(dumpform))))
{ {
*bufferpos++ = '0'; regno = xtoi (bufferpos[-1]) | xtoi (bufferpos[-2]) << 4;
_itoa_word ((unsigned long int)(ctx[i]), bufferpos, 16, 0); memset (bufferpos-2, '0', 3);
i++; _itoa_word (regs[regno], bufferpos+1, 16, 0);
} }
/* Write the output. */ /* Write the output. */

View File

@ -16,9 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <sys/ptrace.h> #include <signal.h>
#define SIGCONTEXT void ** #define SIGCONTEXT struct sigcontext *
#define GET_PC(ctx) ((ctx)[PT_NIP]) #define GET_PC(ctx) ((void *)((ctx)->regs->nip))
#define GET_FRAME(ctx) (*(void **)(ctx)[PT_R1]) #define GET_FRAME(ctx) (*(void **)((ctx)->regs->gpr[1]))
#define GET_STACK(ctx) ((ctx)[PT_R1]) #define GET_STACK(ctx) ((void *)((ctx)->regs->gpr[1]))