Mojn,

Petter Urkedal wrote:
4.  I like the idea of adding minimum and maximum functions in the
instruction set; if we need them, that is.  They should not require much
logic.  But in this case, note that there is a difference between signed
and unsigned.  Do we want both?  On the other hand it only takes 2 to 3
cycles to compute any of these if my idea of the instruction set is
correct.

Contrary to Timothy's opinion, I think that
UMIN/SMIN and UMAX/SMAX are worth it if you have enough bits in
the opcode. They spare conditional jumps and similar control stuffs,
and the logic is quite simple : take the carry out of the add/sub
unit, XOR with one bit of the opcode (which discriminates
MAX and MIN) and send the result to the "write enable" signal
of the register set's write port.

I don't remember exactly but you can perform signed/unsigned
integer MIN/MAX by XORing the MSB of the operands.
This is pointless for FP. However if the critical datapath
must be balanced, I would put the XORs at the same place,
that is just before the ADD/SUB unit, instead of at the end
(XOR of both operands instead of one result).

Furthermore, I have seen (in old/past studies) that MIN/MAX
are used a lot in signal processing and graphics, for
clipping to coordinates and stuffs like that, so since
it's so "simple" to implement, I usually include it
in my CPUs' instruction sets, along with a complete ROP2
(8 boolean operations : OR/ORN/NOR/AND/ANDN/NAND/XOR/XORN)

Just my 2 cents,
YG

_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to