checkin: tgc5f builds and runs through
This commit is contained in:
@ -39,6 +39,7 @@
|
||||
#include "iss/instrumentation_if.h"
|
||||
#include "iss/log_categories.h"
|
||||
#include "iss/vm_if.h"
|
||||
#include "iss/vm_types.h"
|
||||
#include "riscv_hart_common.h"
|
||||
#include <stdexcept>
|
||||
#ifndef FMT_HEADER_ONLY
|
||||
@ -691,6 +692,11 @@ iss::status riscv_hart_m_p<BASE, FEAT, LOGCAT>::read(const address_type type, co
|
||||
case traits<BASE>::CSR: {
|
||||
if(length != sizeof(reg_t))
|
||||
return iss::Err;
|
||||
// We emulate the FCSR in the architectural state
|
||||
if(addr == 3) {
|
||||
*data = this->get_fcsr();
|
||||
return iss::Ok;
|
||||
}
|
||||
return read_csr(addr, *reinterpret_cast<reg_t* const>(data));
|
||||
} break;
|
||||
case traits<BASE>::FENCE: {
|
||||
@ -822,6 +828,11 @@ iss::status riscv_hart_m_p<BASE, FEAT, LOGCAT>::write(const address_type type, c
|
||||
case traits<BASE>::CSR: {
|
||||
if(length != sizeof(reg_t))
|
||||
return iss::Err;
|
||||
// We emulate the FCSR in the architectural state
|
||||
if(addr == 3) {
|
||||
this->set_fcsr(*data);
|
||||
return iss::Ok;
|
||||
}
|
||||
return write_csr(addr, *reinterpret_cast<const reg_t*>(data));
|
||||
} break;
|
||||
case traits<BASE>::FENCE: {
|
||||
|
Reference in New Issue
Block a user