summaryrefslogtreecommitdiff
path: root/src/arch/sparc/isa/formats/mem
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/sparc/isa/formats/mem')
-rw-r--r--src/arch/sparc/isa/formats/mem/swap.isa11
-rw-r--r--src/arch/sparc/isa/formats/mem/util.isa12
2 files changed, 11 insertions, 12 deletions
diff --git a/src/arch/sparc/isa/formats/mem/swap.isa b/src/arch/sparc/isa/formats/mem/swap.isa
index 99bbf3a68..17a490c4b 100644
--- a/src/arch/sparc/isa/formats/mem/swap.isa
+++ b/src/arch/sparc/isa/formats/mem/swap.isa
@@ -50,8 +50,8 @@ def template SwapExecute {{
}
if (storeCond && fault == NoFault) {
%(EA_trunc)s
- fault = xc->write((uint%(mem_acc_size)s_t)Mem,
- EA, %(asi_val)s, &mem_data);
+ fault = writeMemAtomic(xc, traceData, Mem, EA,
+ %(asi_val)s, &mem_data);
}
if (fault == NoFault) {
// Handle the swapping
@@ -87,8 +87,8 @@ def template SwapInitiateAcc {{
}
if (fault == NoFault) {
%(EA_trunc)s
- fault = xc->write((uint%(mem_acc_size)s_t)Mem,
- EA, %(asi_val)s, &mem_data);
+ fault = writeMemTiming(xc, traceData, Mem, EA, %(asi_val)s,
+ &mem_data);
}
return fault;
}
@@ -103,7 +103,8 @@ def template SwapCompleteAcc {{
Fault fault = NoFault;
%(op_decl)s;
- uint64_t mem_data = pkt->get<uint%(mem_acc_size)s_t>();
+ getMem(pkt, Mem, traceData);
+ uint64_t mem_data = Mem;
if (fault == NoFault) {
// Handle the swapping
diff --git a/src/arch/sparc/isa/formats/mem/util.isa b/src/arch/sparc/isa/formats/mem/util.isa
index aaa04b4bf..06206c02b 100644
--- a/src/arch/sparc/isa/formats/mem/util.isa
+++ b/src/arch/sparc/isa/formats/mem/util.isa
@@ -143,7 +143,7 @@ def template LoadExecute {{
%(fault_check)s;
if (fault == NoFault) {
%(EA_trunc)s
- fault = xc->read(EA, (%(mem_acc_type)s%(mem_acc_size)s_t&)Mem, %(asi_val)s);
+ fault = readMemAtomic(xc, traceData, EA, Mem, %(asi_val)s);
}
if (fault == NoFault) {
%(code)s;
@@ -171,7 +171,7 @@ def template LoadInitiateAcc {{
%(fault_check)s;
if (fault == NoFault) {
%(EA_trunc)s
- fault = xc->read(EA, (%(mem_acc_type)s%(mem_acc_size)s_t&)Mem, %(asi_val)s);
+ fault = readMemTiming(xc, traceData, EA, Mem, %(asi_val)s);
}
return fault;
}
@@ -184,7 +184,7 @@ def template LoadCompleteAcc {{
Fault fault = NoFault;
%(op_decl)s;
%(op_rd)s;
- Mem = pkt->get<typeof(Mem)>();
+ getMem(pkt, Mem, traceData);
%(code)s;
if (fault == NoFault) {
%(op_wb)s;
@@ -214,8 +214,7 @@ def template StoreExecute {{
}
if (storeCond && fault == NoFault) {
%(EA_trunc)s
- fault = xc->write((%(mem_acc_type)s%(mem_acc_size)s_t)Mem,
- EA, %(asi_val)s, 0);
+ fault = writeMemAtomic(xc, traceData, Mem, EA, %(asi_val)s, 0);
}
if (fault == NoFault) {
// Write the resulting state to the execution context
@@ -245,8 +244,7 @@ def template StoreInitiateAcc {{
}
if (storeCond && fault == NoFault) {
%(EA_trunc)s
- fault = xc->write((%(mem_acc_type)s%(mem_acc_size)s_t)Mem,
- EA, %(asi_val)s, 0);
+ fault = writeMemTiming(xc, traceData, Mem, EA, %(asi_val)s, 0);
}
return fault;
}