[LLVMdev] Best way to interface with MSVC _ftol2 runtime function for fptoui?

Joe Groff arcata at gmail.com
Wed Jan 18 20:56:10 PST 2012


2012/1/18 Jakob Stoklund Olesen <stoklund at 2pi.dk>:
> This should work:
> %1 = call i64 asm "call __ftol2", "=A,{st},~{dirflag},~{fpsr},~{flags},~{st}" (double %x) nounwind

Forgive me for being slow, but what would be the best way to implement
the equivalent of that inline asm as a custom lowering for an
instruction? Can I just create a CallInst and tell it to lower that
instead, or do I need to replicate the functionality manually as DAG
nodes?

-Joe



More information about the llvm-dev mailing list