Now I try to dispatch codes dynamically, for example, SSE, AVX and so on. In a binary file, all codes which will be dispatched at the time of execution are bundled.
I worry that undefined CPU instructions in a code path which will not be executed in the CPU cause unintended behavior via speculative execution or others.
Then, I have two questions.
- Will CPU report error occurred in speculative execution usually?
- Do undefined CPU instructions without execution cause bugs?