minor improvements to readability
This commit is contained in:
parent
0e88664ff7
commit
978c3db06e
|
@ -720,7 +720,7 @@ iss::status riscv_hart_m_p<BASE, FEAT, LOGCAT>::write(const address_type type, c
|
||||||
return iss::Err;
|
return iss::Err;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if(length > 1 && (addr & (length - 1)) && (access & access_type::DEBUG) != access_type::DEBUG) {
|
if(length > 1 && (addr & (length - 1)) && !is_debug(access)) {
|
||||||
this->reg.trap_state = (1UL << 31) | 6 << 16;
|
this->reg.trap_state = (1UL << 31) | 6 << 16;
|
||||||
fault_data = addr;
|
fault_data = addr;
|
||||||
return iss::Err;
|
return iss::Err;
|
||||||
|
@ -740,7 +740,7 @@ iss::status riscv_hart_m_p<BASE, FEAT, LOGCAT>::write(const address_type type, c
|
||||||
} else {
|
} else {
|
||||||
res = write_mem(phys_addr, length, data);
|
res = write_mem(phys_addr, length, data);
|
||||||
}
|
}
|
||||||
if(unlikely(res != iss::Ok && (access & access_type::DEBUG) == 0)) {
|
if(unlikely(res != iss::Ok && !is_debug(access))) {
|
||||||
this->reg.trap_state = (1UL << 31) | (7UL << 16); // issue trap 7 (Store/AMO access fault)
|
this->reg.trap_state = (1UL << 31) | (7UL << 16); // issue trap 7 (Store/AMO access fault)
|
||||||
fault_data = addr;
|
fault_data = addr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue