Some ISAs (Alpha, ARM) encode special information in the lowest bits
of the current instruction address. You don't want these bits to be used
to calculate the address, but it's important that they're there for
instructions that might consume them. 

Ali 

On Wed, 19 Oct 2011
22:49:52 +0800, Xuehan Xu  wrote:  

Dear Sirs:
 I saw the following
line in the preExecute() function of the SimpleCPU model:

//If more
fetch data is needed, pass it in.
Addr fetchPC = (pcState.instAddr() &
PCMask) + fetchOffset;

 I'm a little confused, isn't pcState.instAddr()
returns the address where the instruction will be fetched? Why does it
AND the PCMask?  

 
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to