[LLVMdev] Intrinsics __readeflags and __writeeflags

Alexey Volkov avolkov.intel at gmail.com
Wed Dec 18 03:26:42 PST 2013


I don't insist on implementing LLVM intrinsic, clang header with inline asm
should be enough and is much easier to implement.
I am just looking for the best way to introduce this functionality to LLVM.
I understand the problem with arbitrary results in some cases. Again, the
main benefit here is compatibility with other compilers.

Alexey.

2013/12/18 David Chisnall <David.Chisnall at cl.cam.ac.uk>

> 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
>
>


-- 
Alexey Volkov
Intel Corporation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131218/4a191bab/attachment.html>


More information about the llvm-dev mailing list