initiateMemRead(ExecContext *xc, Trace::InstRecord *traceData, Addr addr,
unsigned dataSize, Request::Flags flags)
{
- return xc->initiateMemRead(addr, dataSize, flags);
+ const std::vector<bool> byte_enable(dataSize, true);
+ return xc->initiateMemRead(addr, dataSize, flags, byte_enable);
}
static void
uint64_t &mem, unsigned dataSize, Request::Flags flags)
{
memset(&mem, 0, sizeof(mem));
- Fault fault = xc->readMem(addr, (uint8_t *)&mem, dataSize, flags);
+ const std::vector<bool> byte_enable(dataSize, true);
+ Fault fault = xc->readMem(addr, (uint8_t *)&mem, dataSize,
+ flags, byte_enable);
if (fault == NoFault) {
// If LE to LE, this is a nop, if LE to BE, the actual data ends up
// in the right place because the LSBs where at the low addresses on
unsigned flags)
{
std::array<T, N> real_mem;
+ // Size is fixed at compilation time. Make a static vector.
+ constexpr auto size = sizeof(T) * N;
+ static const std::vector<bool> byte_enable(size, true);
Fault fault = xc->readMem(addr, (uint8_t *)&real_mem,
- sizeof(T) * N, flags);
+ size, flags, byte_enable);
if (fault == NoFault) {
real_mem = letoh(real_mem);
for (int i = 0; i < N; i++)
for (int i = 0; i < N; i++)
real_mem[i] = mem[i];
real_mem = htole(real_mem);
- return xc->writeMem((uint8_t *)&real_mem, sizeof(T) * N,
- addr, flags, res);
+ // Size is fixed at compilation time. Make a static vector.
+ constexpr auto size = sizeof(T) * N;
+ static const std::vector<bool> byte_enable(size, true);
+ return xc->writeMem((uint8_t *)&real_mem, size,
+ addr, flags, res, byte_enable);
}
static Fault
if (traceData)
traceData->setData(mem);
mem = htole(mem);
- return xc->writeMem((uint8_t *)&mem, dataSize, addr, flags, res);
+ const std::vector<bool> byte_enable(dataSize, true);
+ return xc->writeMem((uint8_t *)&mem, dataSize, addr, flags,
+ res, byte_enable);
}
template <size_t N>
if (traceData)
traceData->setData(mem);
uint64_t host_mem = htole(mem);
- Fault fault =
- xc->writeMem((uint8_t *)&host_mem, dataSize, addr, flags, res);
+ const std::vector<bool> byte_enable(dataSize, true);
+ Fault fault = xc->writeMem((uint8_t *)&host_mem, dataSize, addr,
+ flags, res, byte_enable);
if (fault == NoFault && res)
*res = letoh(*res);
return fault;