Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha In alpha_ucode_to_ksiginfo, don't adjus...
details: https://anonhg.NetBSD.org/src/rev/c66cbe6001d8
branches: trunk
changeset: 559770:c66cbe6001d8
user: matt <matt%NetBSD.org@localhost>
date: Tue Mar 23 18:44:00 2004 +0000
description:
In alpha_ucode_to_ksiginfo, don't adjust ucode since that's already been
done in the FP_C_TO_NETBSD_MASK macro. Constify a read-only static array.
This should fix regress/lib/libc/ieeefp/except failures.
diffstat:
sys/arch/alpha/alpha/trap.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r af22c25132b4 -r c66cbe6001d8 sys/arch/alpha/alpha/trap.c
--- a/sys/arch/alpha/alpha/trap.c Tue Mar 23 18:21:38 2004 +0000
+++ b/sys/arch/alpha/alpha/trap.c Tue Mar 23 18:44:00 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.91 2004/03/14 01:08:47 cl Exp $ */
+/* $NetBSD: trap.c,v 1.92 2004/03/23 18:44:00 matt Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.91 2004/03/14 01:08:47 cl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.92 2004/03/23 18:44:00 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1219,9 +1219,8 @@
alpha_ucode_to_ksiginfo(u_long ucode)
{
long i;
- long flags = ucode >> 1;
- static int alpha_ksiginfo_table[] = { FPE_FLTINV,
+ static const int alpha_ksiginfo_table[] = { FPE_FLTINV,
FPE_FLTDIV,
FPE_FLTOVF,
FPE_FLTUND,
@@ -1229,7 +1228,7 @@
FPE_INTOVF };
for(i=0;i < sizeof(alpha_ksiginfo_table)/sizeof(int); i++) {
- if (flags & (1 << i))
+ if (ucode & (1 << i))
return (alpha_ksiginfo_table[i]);
}
/* punt if the flags weren't set */
Home |
Main Index |
Thread Index |
Old Index