[PATCH] D70101: [X86] Fix the implementation of __readcr3/__writecr3 to work in 64-bit mode
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 14 10:34:11 PST 2019
rnk added a comment.
In D70101#1741565 <https://reviews.llvm.org/D70101#1741565>, @craig.topper wrote:
> So in order to match the long and int behavior, I need two different macros to replace the argument? I think __INTPTR_TYPE__ will return int on 32-bit targets so I can't use that for the long case. But maybe for the __int64?
Right, we can use `__INTPTR_TYPE__` for all `__writecr*` functions (they use int or long long), and our own macro (`__LPTRINT_TYPE__`?) for `__readcr*`. Make sure to undef it so it doesn't leak out of the header, similar to `__DEFAULT_FN_ATTRS`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70101/new/
https://reviews.llvm.org/D70101
More information about the cfe-commits
mailing list