summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Mao <zhehao.mao@gmail.com>2015-11-17 21:20:37 -0800
committerHoward Mao <zhehao.mao@gmail.com>2015-11-17 21:20:37 -0800
commitb8548164acc7a0b36aebc8855a9457057b28189e (patch)
tree289124141404ac8fb8353b582b4ca8f2f3e1e840
parentcdf86f59e5706d1c35371b555892fe7b8ab2b01d (diff)
downloadenv-vectorless.zip
env-vectorless.tar.gz
env-vectorless.tar.bz2
disable vector trap handlingvectorless
-rw-r--r--v/entry.S18
-rw-r--r--v/vm.c28
2 files changed, 23 insertions, 23 deletions
diff --git a/v/entry.S b/v/entry.S
index 8fa19f7..da72295 100644
--- a/v/entry.S
+++ b/v/entry.S
@@ -146,17 +146,17 @@ trap_entry:
csrr t0, sstatus
li t1, SSTATUS_XS
and t0, t0, t1
- beqz t0, 2f
+ #beqz t0, 2f
- # disable saving vector state for now
- addi t0,sp,SIZEOF_TRAPFRAME_T_SCALAR
+ ## disable saving vector state for now
+ #addi t0,sp,SIZEOF_TRAPFRAME_T_SCALAR
- vgetcfg x4
- STORE x4,0*REGBYTES(t0)
- vgetvl x4
- STORE x4,1*REGBYTES(t0)
- addi t0,t0,2*REGBYTES
- vxcptevac t0
+ #vgetcfg x4
+ #STORE x4,0*REGBYTES(t0)
+ #vgetvl x4
+ #STORE x4,1*REGBYTES(t0)
+ #addi t0,t0,2*REGBYTES
+ #vxcptevac t0
2:j handle_trap
.global do_tohost
diff --git a/v/vm.c b/v/vm.c
index 74abadd..55e7072 100644
--- a/v/vm.c
+++ b/v/vm.c
@@ -196,24 +196,24 @@ void handle_trap(trapframe_t* tf)
}
else if (tf->cause == CAUSE_FAULT_LOAD || tf->cause == CAUSE_FAULT_STORE)
handle_fault(tf->badvaddr);
- else if ((long)tf->cause < 0 && (uint8_t)tf->cause == IRQ_COP)
- {
- if (tf->hwacha_cause == HWACHA_CAUSE_VF_FAULT_FETCH ||
- tf->hwacha_cause == HWACHA_CAUSE_FAULT_LOAD ||
- tf->hwacha_cause == HWACHA_CAUSE_FAULT_STORE)
- {
- long badvaddr = vxcptaux();
- handle_fault(badvaddr);
- }
- else
- assert(!"unexpected interrupt");
- }
+ //else if ((long)tf->cause < 0 && (uint8_t)tf->cause == IRQ_COP)
+ //{
+ // if (tf->hwacha_cause == HWACHA_CAUSE_VF_FAULT_FETCH ||
+ // tf->hwacha_cause == HWACHA_CAUSE_FAULT_LOAD ||
+ // tf->hwacha_cause == HWACHA_CAUSE_FAULT_STORE)
+ // {
+ // long badvaddr = vxcptaux();
+ // handle_fault(badvaddr);
+ // }
+ // else
+ // assert(!"unexpected interrupt");
+ //}
else
assert(!"unexpected exception");
out:
- if (!(tf->sr & SSTATUS_PS) && (tf->sr & SSTATUS_XS))
- restore_vector(tf);
+ //if (!(tf->sr & SSTATUS_PS) && (tf->sr & SSTATUS_XS))
+ // restore_vector(tf);
pop_tf(tf);
}