On 21.02.2013 08:22, Mr. Orangeade wrote: 

> Hi guys,
> 
> I'm
trying to count integer division instructions (sdiv/udiv instructions
from ARM ISA to be more specific).
> I've added the following code to
cpu/simple/base.cc:
> 
> void
> BaseSimpleCPU::postExecute()
> {
>
.....
> if (curStaticInst->opClass() == IntDivOp){
> numIntDivInsts++;
>
}
> .....
> }
> 
> Is it the right way to achieve the described
target?
> I'm asking because I see bigger amount of executed sdiv/udiv
than I'd expect.
> That may be okay but I want to check that I didn't
miss anything important.
> 
> Many thanks!
> Orangeade 
> 
>
_______________________________________________
> gem5-users mailing
list
> gem5-users@gem5.org
>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users [1]

It looks like
this should do it and only sdiv and udiv appear to be tagged as
IntDivOp. 

Ali 

 

Links:
------
[1]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to