Why does SFUNC exist as a separate instruction?
Currently there are only eight functions and the proposed 32-bit version of xoroshiro128+ will add another but that leaves over 500 potential functions unused.
The opcode for SFUNC is in effect
EEEE 1001111 111 DDDDDDDDD 00000FFFF
where FFFF specifies the function.
(Is it 111 or 11I? Documentation is contradictory.)
Meanwhile the opcode
EEEE 1101011 ... ......... .........
for instructions with no source (nor destination sometimes) has room for over 400 more and S[8:7] = 00 always.
Could SFUNC be moved to
EEEE 1101011 00L DDDDDDDDD 01000FFFF ?
(C and Z could be modified if they have any meaning.)
If so this would free up
EEEE 1001111 11I DDDDDDDDD SSSSSSSSS
for a final, last-minute instruction that really needs both D & S, e.g. a MASKNIB as described below.
Nibble-wide video (4bpp) is ideally suited to 32-bit data as one long holds eight pixels but manipulating nibbles can be tedious and slow when the minimum memory width is a byte. Unless I've misunderstood, the current nibble instructions can change only one nibble in D at a time.
I think it would be great if a mask instruction MASKNIB could change each of the eight nibbles in D in one go, as follows:
DDDD := DDDD if SSSS = 0000
DDDD := SSSS if SSSS > 0000
In other words a zero nibble is transparent which is exactly how the TI VDP and its variants in 16-colour mode worked: 0000 = transparent, 0001 = black, ... , 1111 = white. (Colours could be changed in later chips with a palette.)
MASKNIB would make it easy to have loads of sprites or cursors, pointers, grids, rulers, etc. As a logical ALU operation it would not be out of place.