I can appreciate the implementation benefits in not having a single mutating global state register.
One option I just thought of is simply to have multi-output variants of the instruction which would take an extra flags register as an output operand.
Anyway that's really interesting to find out. It would complicate the optimized implementation of JS engines, which need it to promote int32 arithmetic to doubles where needed, which is what I was thinking of when I asked the question.
One option I just thought of is simply to have multi-output variants of the instruction which would take an extra flags register as an output operand.
Anyway that's really interesting to find out. It would complicate the optimized implementation of JS engines, which need it to promote int32 arithmetic to doubles where needed, which is what I was thinking of when I asked the question.