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]

cgen bug with larger-than-normal instructions?


matthew green writes:
 > i am doing a sim port for an architecture that has 16 bit insns for
 > all but the 16-bit & 32-bit immediately load insns, which are 32-bits
 > & 48-bits long each, with the immediate value placed after the insn.
 > 
 > currently, cgen produces code that fails to compile:
 > 
 > decode.cxx:1457: implicit declaration of function `int GETIMEMUHI(...)'
 > 
 > this function is currently missing from cgen-cpu.h, but even after i
 > add it there, the problem persists.  i believe the generate code is
 > wrong, and (with an insight from bje) i have developed the following
 > patch.  it makes two changes to cgen itself:
 > 
 > 	- call GETIMEM* as "current_cpu->GETIMEM*"

This is a sid-ism and as such doesn't belong in utils-cgen.scm.
How do the other sid ports invoke GETIMEM?

 > 	- 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.

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