> Hi, > For the backend TI DSP TMS320C6x, There are four types of functional > units which are .L unit, .M unit, .S unit and .D unit, and each type > consists of two units named .X1 and .X2 respectively. Namely, there are > total 8 units. Except the .M units surve only for multiply, other units > share many functions. For example, they both enable 32 bits arithmetical > operation. And in the assembly, which functional unit is used to perform > operation must be explicitly indicated. For example, ADD .S1 A0, A1, A2; > ADD .L1 A0, A1, A2; ADD .D1 A0, A1, A2 achieve the same goal by using > different units. Surely, when producing assembly, a functional unit > allocation somewhat like register allocation is needed. I wonder how can > I describe the relationship in the machine description file, and whether > I need write a functional unit allocation algorithm or it is done by a > general purpose allocation algorithm embedded in GCC, like register > allocation, I only need give some architecture descriptions? Thanks in > advance for your kind assistance.
IMHO. the functional units that accompany the assembly instruction are optional. However, for c6x-gcc the reason cc1 doesnt allocate functional units is that the assembler ( as part of the c6x binutils ) does the functional unit allocation on its own. There are some notes about how the assembler does this in Extending the GNU Assembler for Texas Instruments TMS320C6x-DSP.pdf HTH, Pranav > > Regards, > Li Wang >