summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2021-05-09 06:34:22 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2021-05-09 06:34:22 +0000
commitfaf6d3e3ea084daaeec1a2e2b87d0538461532d3 (patch)
tree2bde018ab7fe7cec00b2895d8c9f7d27fc9e7b1b /sys
parentb6b815f5036d93068057d9400d5174b60a3fd63f (diff)
fix indentation
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/riscv64/riscv64/trap.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/sys/arch/riscv64/riscv64/trap.c b/sys/arch/riscv64/riscv64/trap.c
index 7e1286ee013..82ec476ad16 100644
--- a/sys/arch/riscv64/riscv64/trap.c
+++ b/sys/arch/riscv64/riscv64/trap.c
@@ -105,7 +105,6 @@ do_trap_supervisor(struct trapframe *frame)
}
}
-
void
do_trap_user(struct trapframe *frame)
{
@@ -162,27 +161,26 @@ do_trap_user(struct trapframe *frame)
svc_handler(frame);
break;
case EXCP_ILLEGAL_INSTRUCTION:
+ if ((frame->tf_sstatus & SSTATUS_FS_MASK) == SSTATUS_FS_OFF) {
+ if (fpu_valid_opcode(frame->tf_stval)) {
- if ((frame->tf_sstatus & SSTATUS_FS_MASK) ==
- SSTATUS_FS_OFF) {
- if(fpu_valid_opcode(frame->tf_stval)) {
-
- /* XXX do this here or should it be in the
- * trap handler in the restore path?
- */
- fpu_load(p);
+ /* XXX do this here or should it be in the
+ * trap handler in the restore path?
+ */
+ fpu_load(p);
- frame->tf_sstatus &= ~SSTATUS_FS_MASK;
- break;
+ frame->tf_sstatus &= ~SSTATUS_FS_MASK;
+ break;
+ }
}
- }
- printf("ILL at %lx scause %lx stval %lx\n", frame->tf_sepc, frame->tf_scause, frame->tf_stval);
+ printf("ILL at %lx scause %lx stval %lx\n", frame->tf_sepc,
+ frame->tf_scause, frame->tf_stval);
sv.sival_ptr = (void *)frame->tf_stval;
trapsignal(p, SIGILL, 0, ILL_ILLTRP, sv);
userret(p);
break;
case EXCP_BREAKPOINT:
- printf("BREAKPOINT\n");
+ printf("BREAKPOINT\n");
sv.sival_ptr = (void *)frame->tf_stval;
trapsignal(p, SIGTRAP, 0, TRAP_BRKPT, sv);
userret(p);
@@ -290,4 +288,3 @@ fatal:
panic("Fatal page fault at %#lx: %#08lx", frame->tf_sepc,
(vaddr_t)sv.sival_ptr);
}
-