[LLVMdev] Intrinsics __readeflags and __writeeflags

David Chisnall David.Chisnall at cl.cam.ac.uk
Wed Dec 18 03:12:32 PST 2013


On 18 Dec 2013, at 11:03, Alexey Volkov <avolkov.intel at gmail.com> wrote:

> These intrinsics are introduced for compatibility purposes.
> Besides MSVC GCC also supports it in its main trunk; ICC supports it on Windows and is going to support in the next version on Linux. 

There have been two questions, neither of which is really answered.  The questions are:

- Why does this need to be an LLVM intrinsic, rather than an inline function in a clang header expanding to some inline asm?

- Given that this instruction has such poorly defined semantics that it effectively returns an arbitrary number in any function that does arithmetic, what possible benefit is there in providing it as an LLVM intrinsic?

David





More information about the llvm-dev mailing list