[cfe-dev] -fcatch-undefined-behavior testing

Török Edwin edwintorok at gmail.com
Wed Dec 16 23:52:23 PST 2009

On 2009-12-17 00:58, Mike Stump wrote:
> On Dec 16, 2009, at 11:36 AM, Török Edwin wrote:
>> Ok. As a short term solution could it generate an int3 though instead of an illegal instruction?
> Which llvm intrinsic is that?

No target independent intrinsic, I only know of a target-dependent way
for x86:
tail call void asm sideeffect "int3", "~{dirflag},~{fpsr},~{flags}"()

>> Yeah the branch for the constant case would be fine, however it would mean a penalty for the non-constant shift case.
> As I said, for an optimizing compiler, it could omit the penalty, if it cared.


Best regards,

More information about the cfe-dev mailing list