fixed potential bug on memcpy

This commit is contained in:
Màrius Montón 2019-09-24 11:02:15 +02:00
parent 7431fc5abb
commit 5f0da6b208
1 changed files with 1 additions and 1 deletions

View File

@ -547,7 +547,7 @@ void CPU::CPU_thread(void) {
void CPU::call_interrupt(tlm::tlm_generic_payload &trans, sc_time &delay) { void CPU::call_interrupt(tlm::tlm_generic_payload &trans, sc_time &delay) {
interrupt = true; interrupt = true;
/* Socket caller send a cause (its id) */ /* Socket caller send a cause (its id) */
memcpy(&int_cause, trans.get_data_ptr(), sizeof(int)); memcpy(&int_cause, trans.get_data_ptr(), sizeof(uint32_t));
} }
void CPU::invalidate_direct_mem_ptr(sc_dt::uint64 start, sc_dt::uint64 end) void CPU::invalidate_direct_mem_ptr(sc_dt::uint64 start, sc_dt::uint64 end)