[PATCH] D125164: [X86] Fix some signedness errors in x86 headers
Phoebe Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat May 7 06:01:56 PDT 2022
pengfei added a comment.
One question: is it better to change the define of builtins than explicit casts?
================
Comment at: clang/lib/Headers/cetintrin.h:26
#ifdef __x86_64__
static __inline__ void __DEFAULT_FN_ATTRS _incsspq(unsigned long long __a) {
__builtin_ia32_incsspq(__a);
----------------
RKSimon wrote:
> @pengfei The Intel Intrisics guide has this taking a int ?
I think both make sense in some way. The instruction `incsspq` only takes the low 8-bit of a 64-bit register, but the operand is still 64-bit anyway.
I'm not sure which one we should change. Might be Clang given we specify `unsigned int` for `_inc_ssp`? Any special reason we use `unsigned long long` here @craig.topper ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125164/new/
https://reviews.llvm.org/D125164
More information about the cfe-commits
mailing list