#60 gets rid of most cases of using the BKPT instruction, but there is one rare case where it can still be generated. A construction called a "constant pool" is used to store data that is not meant to be executed in the code section. The data is an instruction pointer offset. It can only be generated if the executable has over 32 MB of code, for jumps to a far away address. Ideally this case would be replaced with a UDF instruction like the others.
The toolchain (I believe the linker) and the validator would need corresponding changes to replace BKPT with UDF for this constant pool case. Probably it's not worth doing since changing the toolchain is annoying and no one is using >32MB executables. Also even when it is used, the instruction is never meant to be executed. So I'm just documenting this without expecting to actually do it.
#60 gets rid of most cases of using the BKPT instruction, but there is one rare case where it can still be generated. A construction called a "constant pool" is used to store data that is not meant to be executed in the code section. The data is an instruction pointer offset. It can only be generated if the executable has over 32 MB of code, for jumps to a far away address. Ideally this case would be replaced with a UDF instruction like the others.
The toolchain (I believe the linker) and the validator would need corresponding changes to replace BKPT with UDF for this constant pool case. Probably it's not worth doing since changing the toolchain is annoying and no one is using >32MB executables. Also even when it is used, the instruction is never meant to be executed. So I'm just documenting this without expecting to actually do it.