Hi !

On Wed, 06 Jun 2012 21:59:35 -0400, André Pouliot wrote:
On 2012-06-06 18:44, [email protected] wrote:
You want signed or unsigned comparisons ?
Just indicate it inside the comparison instruction,
and save some precious bits in the predication/condition codes
that are embedded in ALL instructions.
My drawings show that it only requires a pair of XOR
gates at the start of the add/sub unit, with no critical
datapath impact.
Already planned to differentiate between signed and unsigned. Anyway
for correct result we need to be able to specify it it help to have
correct flag :)
Then just create a flag alias ?...

For the YASEP i'm down to "CMPU" and "CMPS",
depending on the operand's types, then
check the carry flag in the following instruction.

And I have SMIN/SMAX/UMIN/UMAX almost for free too,
just by playing on writeback inhibition depending on the
carry bit (I don't want to bother yet with a last-stage
MUX for simplicity and speed).

Some of these considerations have led me to design
condition codes as described at the bottom of
http://yasep.org/#!doc/forms
 * no less/greater : just check the MSB or a carry.
 * I use odd/even a lot too : just check the LSB.
 * Equal or Zero (register is cleared) : OR all the bits
    of a register (can be "cached").
 * I also did a concession to the Carry flag and Zero flag
    (last written value was zero) to ease some code.

I like the even / odd part I don't think we have that. I'm not sure
if it really useful but it can be interesting

It depends. For a microcontroller, being able to play with
bits is critical. For a shader, less, but the sign bit
is certainly necessary to detect overflow.
When you have the sign bit, the parity
bit comes almost for free :-)

Have a good night, all

Yann
_______________________________________________
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