From cdacbe734a9e6e0f20e0a37ef694995373b83f66 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 8 Nov 2010 13:58:22 -0600 Subject: ARM/Alpha/Cpu: Change prefetchs to be more like normal loads. This change modifies the way prefetches work. They are now like normal loads that don't writeback a register. Previously prefetches were supposed to call prefetch() on the exection context, so they executed with execute() methods instead of initiateAcc() completeAcc(). The prefetch() methods for all the CPUs are blank, meaning that they get executed, but don't actually do anything. On Alpha dead cache copy code was removed and prefetches are now normal ops. They count as executed operations, but still don't do anything and IsMemRef is not longer set on them. On ARM IsDataPrefetch or IsInstructionPreftech is now set on all prefetch instructions. The timing simple CPU doesn't try to do anything special for prefetches now and they execute with the normal memory code path. --- src/arch/mips/isa/formats/mem.isa | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/arch/mips/isa') diff --git a/src/arch/mips/isa/formats/mem.isa b/src/arch/mips/isa/formats/mem.isa index e7dbd8e9b..c4666e4ab 100644 --- a/src/arch/mips/isa/formats/mem.isa +++ b/src/arch/mips/isa/formats/mem.isa @@ -452,7 +452,7 @@ def template MiscExecute {{ Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const { - Addr EA; + Addr EA M5_VAR_USED = 0; Fault fault = NoFault; %(fp_enable_check)s; @@ -577,12 +577,11 @@ def format StoreUnalignedMemory(memacc_code, ea_code = {{ EA = (Rs + disp) & ~3; def format Prefetch(ea_code = {{ EA = Rs + disp; }}, mem_flags = [], pf_flags = [], inst_flags = []) {{ pf_mem_flags = mem_flags + pf_flags + ['PREFETCH'] - pf_inst_flags = inst_flags + ['IsMemRef', 'IsLoad', - 'IsDataPrefetch', 'MemReadOp'] + pf_inst_flags = inst_flags (header_output, decoder_output, decode_block, exec_output) = \ LoadStoreBase(name, Name, ea_code, - 'xc->prefetch(EA, memAccessFlags);', + 'warn_once("Prefetching not implemented for MIPS\\n");', pf_mem_flags, pf_inst_flags, exec_template_base = 'Misc') }}; -- cgit v1.2.3