[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [f-cpu] CMP
On Tue, Jul 30, 2002 at 10:05:41PM +0200, Yann Guidon wrote:
[...]
> that is also my proposition. the ASU has a "saturated mode"
> and the output (unsigned mode ?) can be used to control
> a CMOV. Better : if there was the necessary wiring or mode,
> a SIMD version would be possible and the resulting bitfield
> would be used in a MUX instruction. Then MIN, MAX and SORT
> would require 2 or 3 instructructions but there would
> be no need of another unit.
With the `subb' instruction, you can't do signed compare/min/max/sort.
With my version of EU_CMP, you can.
> But Michael knows his unit better than me. I simply wish that
> the original "sub" with saturated output was implemented :
> MR implemented a simple bit (which is logical, in a sense)
> but a "-1" output would have been useful to emulate CMP.
Just negate the carry/borrow output.
There is only a single bit because otherwise, I had to distinguish between
`addc' and `subb'. The way it is now, the carry logic is completely
shared between both operations. If that's not a damn good reason, there
never was one.
--
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/