This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Write a md about a cpu having a risc unit and a dsp unit


> -----Original Message-----
> From: gcc-owner On Behalf Of mike
> Sent: 25 May 2004 07:02

> Hello,
>      I am going to write a machine description for a cpu having a risc
>      unit and a dsp unit.
>      The risc unit and dsp unit have their own register file.
>      When using dsp instrcutions, the risc unit has to load the data
>      from the main memory to dsp registers (using "load" instruction).
>      And when the dsp unit processed the instruction, the 
> risc unit uses
>      "store" instruction to store the data back to the main memory.
> 
>      Any idea how to describe this in the machine description?


  Off the top of my head, the following strategy should work:

  Do it by describing the risc registers and the dsp registers as different
register classes, by having the risc unit insn patterns use constraints that
only allow risc unit register class and having the dsp unit insn patterns
use constraints that only allow the dsp unit registers, and supply movsi (et
al) patterns implemented using the load and store instructions that allow
reload to work out how to get values from one to the other.




    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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