Hi Meng, Have a look in e.g. build/ARM/arch/arm/generated/decoder.hh and atomic_simple_cpu_exec.cc
Andreas On 12/04/2013 03:17, "Meng Wang" <[email protected]> wrote: >Hi, all >I am reading atomic cpu's code and find a piece of code hard to >understand. It's in src/cpu/simple/atomic.cc file: >void >AtomicSimpleCPU::tick() >{ > Š... > preExecute(); > > if (curStaticInst) { > fault = curStaticInst->execute(this, traceData); > > // keep an instruction count > if (fault == NoFault) > countInst(); > else if (traceData && !DTRACE(ExecFaulting)) { > delete traceData; > traceData = NULL; > } > > postExecute(); > } > ŠŠ >} > >I can't understand this code: " fault = curStaticInst->execute(this, >traceData);". According the context, I know curStaticInst belongs to >StaticInstPtr class whose behaviors are similar to a pointer. It >overloads operator "->" and makes it dereference to a method of another >class: StaticInst. However, I cannot find the execute(AtomicSimpleCPU*, >Trace::InstRecord*) definition or declaration in it and all classes >inherited by it, except that I found a comment in src/cpu/static_inst.hh >said "The execute() signatures are auto-generated by scons based on the >set of CPU models we are compiling in today." My question is how the >execute method is found without declaration of this method. > >Thank you very much. > >Meng > >_______________________________________________ >gem5-dev mailing list >[email protected] >http://m5sim.org/mailman/listinfo/gem5-dev > -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
