[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] signed cmpl



On Fri, 20 Dec 2002 19:50:17 +0100
Michael Riepe <michael@stud.uni-hannover.de> wrote:

> On Fri, Dec 20, 2002 at 03:33:56PM +0000, Nicolas Boulay wrote:
> 
> > Now it exist an instruction format using 8 bits immediats by stolen
> > 2 bits in the flag field of the instruction word. I don't like it
> > because it stole those 2 bits, so not every reg-reg->reg
> > instructions could use 8 bits immediat. 6 bits will do it. So what
> > is the number of instructions using immediat between -32 and 32 and
> > that can't use the 8 bits immediat version of each instruction
> > because it miss those 2 flag bits.
> 
> The 6-bit approach may be cleaner, but it also makes programming
> harder. If you use loadi/storei, for example, you won't get far with
> only 6 bits. Or if you deal with characters a lot. Do you really want
> to waste two cycles and a register every time you need a character
> value >= 0x40?
> 

Humm... i had in mind to add the 6 bits immediat forme not replace the 8
bits one.

> There is also the opposite way: never use those two bits in
> instructions that have only register operands - assign additional
> opcodes instead, if necessary.
> 

Ouch, what a decoder mess ! field  in the opcode are a great think to
reduice decoder complexity, if you mix adresseing mode/flag/opcode you
will need 3 cycles for decode :)

> On the other hand, there are instructions which could easily share an
> opcode - e.g. inc, dec, neg, abs and nabs. They belong to the same EU,
> always use two register operands, and have plenty of room (9 unused
> flags).

Because of the "risc rules" (to keep decode simple) adressing mode
must not be too complexe.

> 
> Before I agree with 6-bit immediates, I want to see detailed usage
> statistics, not just guesses. Compile a lot of stuff, including glibc,
> all the GNU tools, X11, a JVM and some benchmarks (preferably SPEC
> CPU2000), and gather statistics about immediate operand sizes. After
> that, we can talk again.

And not linux kernel and Hurd ? :)

But that's true we need statistic.

nicO

> 
> -- 
>  Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
>  "All I wanna do is have a little fun before I die"
> *************************************************************
> To unsubscribe, send an e-mail to majordomo@seul.org with
> unsubscribe f-cpu       in the body. http://f-cpu.seul.org/
> _____________________________________________________________________
> GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321
> (prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagn_.
> R_glement : http://www.ifrance.com/_reloc/sign.sms
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/