Rename ANYB?

Currently, ANYB is implemented as an OR that does not write to D. What I'm expecting is to see if any of the bits in D are set, based on the mask in S. That would mean AND.
What is the use case for OR?
Edit: Oh wait. That's TEST. Hmm... maybe we just need a better name for ANYB....
What is the use case for OR?
Edit: Oh wait. That's TEST. Hmm... maybe we just need a better name for ANYB....
Comments
If TESTOR, perhaps TEST could become TESTAND ?
Or even perhaps ANDNR and ORNR (ie NR=no result)
or ANDTEST and ORTEST ?
Right.
Between S and D, are ANYBits set? Use WZ to find out.
This seems like a niche instruction. Another one that could be freed up for another instruction.
It's a freebie. We've still got open instruction slots.
ozpropdev you can check if two registers are zero with an 'or' instruction p1 code example below.
or reg1, reg2 wz if_z jmp #:bothRegsZero
nice one!
Mike
Jeff
In P1 we can use NR but we don't have that facility in P2.
altds nowrite, #%100_000_000 or reg1, reg2 wz nowrite long inb << 19
mov tempreg, reg1 or tempreg, reg2 wz
anyb reg1,reg2 wz
use case: checking for a 64bit zero result.Yes ANYB is a better alternative, than what I suggested, if it were written for the P2.
My example works on the P1 and you can set the NR flag, it could work on the P2 if you don't care
if the D register gets overwritten.
Jeff
anyb r0,r1 wz if_z anyb r2,r3 wz if_z anyb r4,r5 wz if_z anyb r6,r7 wz if_z jmp #gotzero
I bet people are really having fun testing P2 code.
The P2 is really going to be special when it is done!!!
Jeff
Right now, OR/ANYB set C to the parity of the result. That's what all the AND/OR/XOR instructions currently do. To have it set C if all highs would mean a 32-input AND gate and mux.
AND's need to set C to parity for things like bit filters and LFSR tests.
OR's might be better setting C to reflect all highs.