[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Rep:Re: [f-cpu] signed cmpl
- To: <f-cpu@seul.org>
- Subject: Rep:Re: [f-cpu] signed cmpl
- From: "Nicolas Boulay" <nicolas.boulay@ifrance.com>
- Date: Tue, 17 Dec 2002 08:38:53 GMT
- Delivered-to: archiver@seul.org
- Delivered-to: f-cpu-outgoing@seul.org
- Delivered-to: f-cpu@seul.org
- Delivery-date: Tue, 17 Dec 2002 03:39:11 -0500
- Reply-to: f-cpu@seul.org
- Send-by: 140.94.82.18 with Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt; FR 15/06/2000)
- Sender: owner-f-cpu@seul.org
There some imm instruction using 8 or 16 bits.
I had proposed a long time ago, to use the 6 bits register adresse field
to create an immediat adressing mode available for every instructions.
Maybe this could solve your problem.
nicO
-----Message d'origine-----
De: Michael Riepe <michael@stud.uni-hannover.de>
A: f-cpu@seul.org
Date: 17/12/02
Objet: Re: [f-cpu] signed cmpl
One more remark...
> Of course there will be both signed and unsigned integer compare
> instructions (and also min/max/sort). Projected names for the signed
> counterparts are cmpls, cmples, mins, maxs and minmaxs (aka sorts).
Today I noticed that the current instruction set is slightly
insufficient:
we cannot perform the `register > constant' or `register >= constant'
operations with a single instruction. On the other hand, `cmpli'
and `cmplei' are widely equivalent, except for `cmpli $0, r2, r1' and
`cmplei $255, r2, r1' which have no corresponding instruction.
Therefore,
we should implement a different pair of compare instructions. I guess
the best alternative is `cmpg' and `cmple'. We may also provide all of
them (cmp[lg] and cmp[lg]e) with little additional hardware (and without
latency increasing) - an extra row of MUXes in an uncritical place will
do the trick.
In either case, all four `reg x reg -> reg' instructions will be
available
as assembler aliases, whether or not they're implemented in hardware.
The
`reg x imm -> reg' instructions can also be mapped to each other if we
don't provide the full set, but the argument ranges will be slightly
different (like 1...256, or -127...128 for signed operations). But
whatever we do, we should provide immediate compare instructions with
both a `less' and a `greater' (-or-equal) condition.
Comments?
--
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
_____________________________________________________________________
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/