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

Joe Groff arcata at gmail.com
Wed Jan 18 18:37:49 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

Thanks Jakob, the ~{st} constraint does the trick. It wasn't clear to
me that "clobbers" means "pops" for x87 registers.

-Joe



More information about the llvm-dev mailing list