[PATCH] [AArch64] Change int64_t from 'long long int' to 'long int' for AArch64 target.
t.p.northover at gmail.com
Thu Feb 20 05:48:33 PST 2014
I think this patch will break 32-bit ARM and 64-bit Darwin, both of
which define int64_t to be "long long" for various reasons (32-bit ARM
because "long" is 32-bits, Darwin because Just Because. ;-)).
ItaniumMangle should be fine: that mangling is only used on AArch64
non-Darwin so globally changing it is fine. Targets.cpp looks fine to
me as well.
For SemaChecking.cpp, the getNeonEltType is shared among all
implementations; perhaps give it another bool parameter and rename the
existing one? IsPolyUnsigned & IsInt64Long for example.
NeonEmitter.cpp is a bigger problem, since there doesn't appear to be
an "int64_t" type string available. It seems reasonably easy to add
one (lib/AST/ASTContext.cpp -- DecodeTypeFromStr and a comment in
Builtins.def), but I'm not sure if there's a better solution (we're
running out of letters!)
There are also a couple of bugs on the host side:
- qmask |= 1ULL << GetNeonEnum(Proto, TypeVec[ti]);
+ qmask |= 1UL << GetNeonEnum(Proto, TypeVec[ti]);
qmask and mask are Clang-internal 64-bit variables. This change will
truncate various lines in arm_neon.inc (#included into
lib/Sema/SemaChecking.cpp) when Clang is built on platforms with a
The same goes for the change to the "case".
More information about the cfe-commits