Deleted Added
sdiff udiff text old ( 179533 ) new ( 188860 )
full compact
1/*-
2 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
3 * Copyright (C) 1995, 1996 TooLs GmbH.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 18 unchanged lines hidden (view full) ---

27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * $NetBSD: trap.c,v 1.58 2002/03/04 04:07:35 dbj Exp $
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/powerpc/aim/trap.c 179533 2008-06-04 07:32:49Z grehan $");
36
37#include "opt_ktrace.h"
38
39#include <sys/param.h>
40#include <sys/kdb.h>
41#include <sys/proc.h>
42#include <sys/ktr.h>
43#include <sys/lock.h>

--- 16 unchanged lines hidden (view full) ---

60#include <vm/vm.h>
61#include <vm/pmap.h>
62#include <vm/vm_extern.h>
63#include <vm/vm_param.h>
64#include <vm/vm_kern.h>
65#include <vm/vm_map.h>
66#include <vm/vm_page.h>
67
68#include <machine/cpu.h>
69#include <machine/db_machdep.h>
70#include <machine/fpu.h>
71#include <machine/frame.h>
72#include <machine/pcb.h>
73#include <machine/pmap.h>
74#include <machine/psl.h>
75#include <machine/trap.h>

--- 107 unchanged lines hidden (view full) ---

183 break;
184
185 case EXC_FPU:
186 KASSERT((td->td_pcb->pcb_flags & PCB_FPU) != PCB_FPU,
187 ("FPU already enabled for thread"));
188 enable_fpu(td);
189 break;
190
191#ifdef ALTIVEC
192 case EXC_VEC:
193 if ((vecthread = PCPU_GET(vecthread)) != NULL) {
194 KASSERT(vecthread != td,
195 ("altivec already enabled"));
196 save_vec(vecthread);
197 }
198 PCPU_SET(vecthread, td);
199 td->td_pcb->pcb_veccpu = PCPU_GET(cpuid);
200 enable_vec(td);
201 frame->srr1 |= PSL_VEC;
202 break;
203#else
204 case EXC_VEC:
205 case EXC_VECAST:
206 sig = SIGILL;
207 break;
208#endif /* ALTIVEC */
209
210 case EXC_ALI:
211 if (fix_unaligned(td, frame) != 0)
212 sig = SIGBUS;
213 else
214 frame->srr0 += 4;
215 break;
216

--- 461 unchanged lines hidden ---