From f5ee661c9b93b99e4e7cb830ec33ed8104fe2784 Mon Sep 17 00:00:00 2001 From: Jake Burkholder Date: Sat, 8 Jun 2002 07:17:19 +0000 Subject: [PATCH] Remove code from trap which is handled in userland now. --- sys/conf/files.sparc64 | 2 -- sys/sparc64/include/fp.h | 3 --- sys/sparc64/sparc64/machdep.c | 7 ++----- sys/sparc64/sparc64/trap.c | 22 +++------------------- 4 files changed, 5 insertions(+), 29 deletions(-) diff --git a/sys/conf/files.sparc64 b/sys/conf/files.sparc64 index 1753ebbaf34..534da7c2b6c 100644 --- a/sys/conf/files.sparc64 +++ b/sys/conf/files.sparc64 @@ -41,8 +41,6 @@ sparc64/sparc64/elf_machdep.c standard sparc64/sparc64/eeprom.c optional eeprom sparc64/sparc64/eeprom_ebus.c optional eeprom ebus sparc64/sparc64/eeprom_sbus.c optional eeprom sbus -sparc64/sparc64/emul.c standard -sparc64/sparc64/fp.c standard sparc64/sparc64/identcpu.c standard sparc64/sparc64/in_cksum.c optional inet sparc64/sparc64/intr_machdep.c standard diff --git a/sys/sparc64/include/fp.h b/sys/sparc64/include/fp.h index bdadacc89c0..a5caf9ea3b5 100644 --- a/sys/sparc64/include/fp.h +++ b/sys/sparc64/include/fp.h @@ -41,9 +41,6 @@ struct fpstate { struct pcb; struct thread; -void fp_init_thread(struct thread *); -int fp_enable_thread(struct thread *, struct trapframe *); -int fp_exception(struct thread *, struct trapframe *, int *); /* * Note: The pointers passed to the next two functions must be aligned on * 64 byte boundaries. diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index f44c25f8687..aef521273ac 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -606,11 +606,8 @@ setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings) pcb = td->td_pcb; sp = rounddown(stack, 16); tf = td->td_frame; - fp_init_thread(td); - bzero(pcb->pcb_rw, sizeof(pcb->pcb_rw)); - bzero(pcb->pcb_rwsp, sizeof(pcb->pcb_rwsp)); - pcb->pcb_nsaved = 0; - bzero(tf, sizeof (*tf)); + bzero(pcb, sizeof(*pcb)); + bzero(tf, sizeof(*tf)); tf->tf_out[0] = stack; tf->tf_out[3] = PS_STRINGS; tf->tf_out[6] = sp - SPOFF - sizeof(struct frame); diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c index ac2647e4a3f..da03096703d 100644 --- a/sys/sparc64/sparc64/trap.c +++ b/sys/sparc64/sparc64/trap.c @@ -72,7 +72,6 @@ #include #include -#include #include #include #include @@ -198,10 +197,7 @@ if ((type & ~T_KERNEL) != T_BREAKPOINT) * User Mode Traps */ case T_MEM_ADDRESS_NOT_ALIGNED: - if ((sig = unaligned_fixup(td, tf)) == 0) { - TF_DONE(tf); - goto user; - } + sig = SIGILL; goto trapsig; #if 0 case T_ALIGN_LDDF: @@ -216,18 +212,9 @@ if ((type & ~T_KERNEL) != T_BREAKPOINT) sig = SIGFPE; goto trapsig; case T_FP_DISABLED: - if (fp_enable_thread(td, tf)) - goto user; - /* Fallthrough. */ case T_FP_EXCEPTION_IEEE_754: case T_FP_EXCEPTION_OTHER: - mtx_lock(&Giant); - if ((sig = fp_exception_other(td, tf, &ucode)) == 0) { - mtx_unlock(&Giant); - TF_DONE(tf); - goto user; - } - mtx_unlock(&Giant); + sig = SIGFPE; goto trapsig; case T_DATA_ERROR: case T_DATA_EXCEPTION: @@ -258,10 +245,7 @@ if ((type & ~T_KERNEL) != T_BREAKPOINT) } goto user; case T_ILLEGAL_INSTRUCTION: - if ((sig = emul_insn(td, tf)) == 0) { - TF_DONE(tf); - goto user; - } + sig = SIGILL; goto trapsig; case T_PRIVILEGED_ACTION: case T_PRIVILEGED_OPCODE: -- 2.45.2