diff options
author | Andrew Waterman <waterman@s144.Millennium.Berkeley.EDU> | 2010-10-05 15:08:18 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@s144.Millennium.Berkeley.EDU> | 2010-10-05 15:08:18 -0700 |
commit | a359d7b81adb7f1ca371822bd2df3bac7cda99ba (patch) | |
tree | f31b99d40ceb1b7f489a7cd7853507cdd6108153 /riscv/mmu.h | |
parent | fcdd030cbe07d48cbd442d207d53dc3947aff02c (diff) | |
download | spike-a359d7b81adb7f1ca371822bd2df3bac7cda99ba.zip spike-a359d7b81adb7f1ca371822bd2df3bac7cda99ba.tar.gz spike-a359d7b81adb7f1ca371822bd2df3bac7cda99ba.tar.bz2 |
[xcc,sim] eliminated vectored traps
now, the evec register holds the address that all traps vector to,
and the cause register is set with the trap number.
Diffstat (limited to 'riscv/mmu.h')
-rw-r--r-- | riscv/mmu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/riscv/mmu.h b/riscv/mmu.h index 9bfbeac..1b8a422 100644 --- a/riscv/mmu.h +++ b/riscv/mmu.h @@ -50,9 +50,9 @@ private: { if(addr & (size-1)) { + badvaddr = addr; if(fetch) throw trap_instruction_address_misaligned; - badvaddr = addr; throw trap_data_address_misaligned; } } @@ -61,9 +61,9 @@ private: { if(addr >= memsz || addr + size > memsz) { + badvaddr = addr; if(fetch) throw trap_instruction_access_fault; - badvaddr = addr; throw store ? trap_store_access_fault : trap_load_access_fault; } } |