2 ms·
Is it possible to configure CPU to interrupt on overflow? Otherwise cost will be too high.
by vbezhenar 4y ago
Is it possible to configure CPU to interrupt on overflow? Otherwise cost will be too high.
- jart 4y agoYou use -ftrapv, which uses the CPU accelerated overflow detection.
- marcosdumay 4y agoWe are in a loop where CPU designers don't create good portable ways to detect overflow, because languages won't use them; and languages do not detect overflow because CPUs don't have a good portable way of doing it. On AMD64 you can at least avoid check after each single instruction. So it becomes less expensive.
- zajio1am 4y ago> On AMD64 you can at least avoid check after each single instruction. So it becomes less expensive. How?