[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] RE: C67 code generator
From: |
TK |
Subject: |
[Tinycc-devel] RE: C67 code generator |
Date: |
Thu, 13 Mar 2003 16:43:25 -0800 |
Macros would be good.
Probably one for each "form" of the instruction. I think the "form"
basically depends on which functional unit is being used. The C67 has 2
sides 1/2 or A/B and each side has four different funtional units:
(M,L,S,D).
Or just make a macro for each different form...
TK
> -----Original Message-----
> From: Peter "Firefly" Lund [mailto:address@hidden
> Sent: Thursday, March 13, 2003 3:10 PM
> To: TK
> Subject: RE: C67 code generator
>
> On Thu, 13 Mar 2003, TK wrote:
>
> > I agree please reformat as you desire.
>
> I am also going to introduce macros for this:
>
> } else if (strstr(s,"MPYI.M")==s) {
> xpath = C67_map_regs(b)^C67_map_regs(c);
>
> ASSERT(C67_map_regs(a) == C67_map_regs(c));
>
> C67_g(
> (0 <<29) | //creg
> (0 <<28) | //inv
> (C67_map_regn(c) <<23) | //dst
> (C67_map_regn(b) <<18) | //src2
> (C67_map_regn(a) <<13) | //src1 (cst5)
> (xpath <<12) | //x cross path if opposite
> sides
> (0x4 << 7) | //opcode
> (0x0 << 2) | //opcode fixed
> (C67_map_regs(c) << 1) | //side of dest
> (0 << 0)); //parallel
> } else if (strstr(s,"SHR.S")==s) {
>
> All the instructions (except branches/jumps and memory load/store, I
> guess) seem to follow the same pattern: fields at fixed positions
> containing register numbers for src1/src2/dst and for the opcode (plus
> a few extra bits to handle the very exposed microarchitecture).
>
> Any idea on what form would be most useful (for such macros, I mean)?
>
> -Peter
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Tinycc-devel] RE: C67 code generator,
TK <=