I wrote this helper function to get a register value from one of my
trace analysis modules:
ir::PTXU64 TraceAnalysis::getRegisterValue(unsigned int tid,
ir::PTXOperand::RegisterType reg) {
executive::EmulatedKernel::RegisterFile rf =
_kernel->getCurrentRegisterFile();
return rf [tid * _kernel->registerCount() + reg];
}
Here _kernel is defined in the initialize function the same as in
MemoryChecker.cpp
_kernel = static_cast< const executive::EmulatedKernel* >( &kernel );
Then you should be able to get a register value using a call along the lines of:
getRegisterValue( tid, instruction->d.reg)
Hope this helps,
Mark
> --
> You received this message because you are subscribed to the Google Groups "gpuocelot" group.
> To post to this group, send email to gpuo...@googlegroups.com.
> To unsubscribe from this group, send email to gpuocelot+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/gpuocelot?hl=en.
>
Thank you for your help!
Chen