exp2 and log2 intrinsic expansion

I'm having a problem when generating the following LLVM intrinsics:


On linux, these are available on as part of standard math libraries, the
code geenrator expands them into library calls, and the linker happily finds
them. However, on Windows and OSX, where no implementation exists, instead
of throwing a runtime error, we get a call to a function with a null

It ends up looking like this:

mov eax, 0
call eax

Would it be possible to add a more intelligible error in cases like this?
I'm pretty sure that if this was
a normal function call I would get an error about an undefined symbol.