toying with the design of my toy virtual machine. .
i have a wild idea. what if i got rid of all the conditional jp instructions and replace them with conditional MOV?
the idea would be to eliminate branches so that pipelines get perfect prediction with no backtracking- instead, both branches run straight through, assign their outcomes to TRUE register, and FALSE register, then do the conditional math code; and MOVZ copies the true value to destination register if zero flag set; copies false value to destination if not- mov takes 3 registers and a flag
is this a terrible idea? am i gonna miss conditional jump?
What about side effects?
Loops?
@ekg done exclusively with unconditional jmp to entrypoint index
Register pressure, and code complexity would probably scale exponentially with the number of conditions/jumps. But I don't know enough to say anything definitively...
@ekg i got rid of those