Encapsulate some types related to cpu word length.

The purpose is to facilitate porting to RV64.

Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn>
This commit is contained in:
Wang Chen
2024-03-27 14:11:18 +08:00
committed by Chen Wang
parent 1976f03d28
commit fd1d098906
63 changed files with 960 additions and 864 deletions

View File

@@ -29,9 +29,9 @@ void external_interrupt_handler()
reg_t trap_handler(reg_t epc, reg_t cause)
{
reg_t return_pc = epc;
reg_t cause_code = cause & 0xfff;
reg_t cause_code = cause & MCAUSE_MASK_ECODE;
if (cause & 0x80000000) {
if (cause & MCAUSE_MASK_INTERRUPT) {
/* Asynchronous trap - interrupt */
switch (cause_code) {
case 3: