This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

re: cgen bug with larger-than-normal instructions?


matthew green writes:
 >     > 	- first argument of GETIMEM*() is "pc"
 >     > 
 >     > this allows my decoder to build, but i haven't tested that it works
 >     > yet (i have now pages of errors for sem.cxx to deal with).
 >    
 >    I don't quite follow why adding "pc" is necessary.
 > 
 > well, the function is defined as:
 > 
 > 	inline UHI GETIMEMUHI(PCADDR pc, IADDR addr) const
 > 
 > so replacing `current_cpu' with `pc' seemed the right thing to do.

Well, my question really was: given that you have `addr',
why is `pc' present at all?  The GNU simulators only pass `addr',
so I'm wondering you you also need to pass `pc'.
[for clarity: for the first "element" of the insn, addr == pc,
for subsequent fetches of the same insn addr == pc + n]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]