aboutsummaryrefslogtreecommitdiff
path: root/pk/handlers.c
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2021-03-29 16:49:29 -0700
committerAndrew Waterman <andrew@sifive.com>2021-03-29 16:58:42 -0700
commitfe4118a6918b7829f96f42944522da79564a1393 (patch)
tree8b773647c83062d25d8a7ef4cc24aac8f75777fa /pk/handlers.c
parentc09d4af850ff8b502b5efd4de1aac39fcbc63618 (diff)
downloadpk-fe4118a6918b7829f96f42944522da79564a1393.zip
pk-fe4118a6918b7829f96f42944522da79564a1393.tar.gz
pk-fe4118a6918b7829f96f42944522da79564a1393.tar.bz2
pk: remove vestigial trapframe_t::insn field
This assumes that stval is populated with the opcode on illegal instruction exceptions. But since we're only using the opcode for error reporting, it's OK if this assumption is violated.
Diffstat (limited to 'pk/handlers.c')
-rw-r--r--pk/handlers.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/pk/handlers.c b/pk/handlers.c
index efd14f1..7216713 100644
--- a/pk/handlers.c
+++ b/pk/handlers.c
@@ -25,13 +25,6 @@ static void handle_store_access_fault(trapframe_t *tf)
static void handle_illegal_instruction(trapframe_t* tf)
{
- tf->insn = *(uint16_t*)tf->epc;
- int len = insn_len(tf->insn);
- if (len == 4)
- tf->insn |= ((uint32_t)*(uint16_t*)(tf->epc + 2) << 16);
- else
- kassert(len == 2);
-
dump_tf(tf);
panic("An illegal instruction was executed!");
}