By: Paul A. Clayton (paaronclayton.delete@this.gmail.com), February 25, 2013 8:18 pm
Room: Moderated Discussions
Wilco (Wilco.Dijkstra.delete@this.ntlworld.com) on February 25, 2013 5:24 pm wrote:
[snip]
> Well then you'll be surprised to hear that there are more adds/subs
> followed by a beq/bne than all logical operations combined...
How many of the adds are with negative immediates (e.g., loop counter)?
[snip]
> If going all-out on flags, what about a flag for all-ones, top 16/24-bits zero (or same-sign
> as bit 15/23), even/odd, parity etc. Half/quarter carry? Just where do you stop?
I wonder if providing (user mode) exceptions for operations that lose information like overflow and storing to a smaller memory area when sign/zero extension from memory will not reproduce the value. (This would be more problematic in terms of opcode space since stores would like to use largish immediates and two or more register names. Using "signed-extended" store for exceptions would have a certain symmetry with loads--"zero-extended" stores could be simple inserts, ignoring MSbits--, but the actual use of such would seem small.)
The concept of explicitly testing for arithmetic overflow for every possible operation seems excessive. Generating an exception (handled in user mode) would seem to avoid excessive test instructions.
[snip]
> Well then you'll be surprised to hear that there are more adds/subs
> followed by a beq/bne than all logical operations combined...
How many of the adds are with negative immediates (e.g., loop counter)?
[snip]
> If going all-out on flags, what about a flag for all-ones, top 16/24-bits zero (or same-sign
> as bit 15/23), even/odd, parity etc. Half/quarter carry? Just where do you stop?
I wonder if providing (user mode) exceptions for operations that lose information like overflow and storing to a smaller memory area when sign/zero extension from memory will not reproduce the value. (This would be more problematic in terms of opcode space since stores would like to use largish immediates and two or more register names. Using "signed-extended" store for exceptions would have a certain symmetry with loads--"zero-extended" stores could be simple inserts, ignoring MSbits--, but the actual use of such would seem small.)
The concept of explicitly testing for arithmetic overflow for every possible operation seems excessive. Generating an exception (handled in user mode) would seem to avoid excessive test instructions.