<div dir="ltr">Hi Ana,<div><br></div><div>AArch64 is a 64-bit word size target, so the <span style="font-family:arial,sans-serif;font-size:13.63636302947998px">word size defined as 64 bits is correct. See the quoted from </span><font face="arial, sans-serif">wikipedia:</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">In </span><a href="http://en.wikipedia.org/wiki/Computing" title="Computing" style="text-decoration:none;color:rgb(11,0,128);background-image:none;font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">computing</a><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">, </span><b style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">word</b><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px"> is a term for the natural unit of data used by a particular </span><a href="http://en.wikipedia.org/wiki/Central_processing_unit" title="Central processing unit" style="text-decoration:none;color:rgb(11,0,128);background-image:none;font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">processor</a><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px"> design. A word is basically a fixed-sized group of </span><a href="http://en.wikipedia.org/wiki/Numerical_digit" title="Numerical digit" style="text-decoration:none;color:rgb(11,0,128);background-image:none;font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">digits</a><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px"> (binary or decimal) that are handled as a unit by the </span><a href="http://en.wikipedia.org/wiki/Instruction_set" title="Instruction set" style="text-decoration:none;color:rgb(11,0,128);background-image:none;font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">instruction set</a><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px"> and/or hardware of the processor. The number of digits in a word (the </span><i style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">word size</i><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">, </span><i style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">word width</i><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">, or </span><i style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">word length</i><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">) is an important characteristic of any specific processor design or </span><a href="http://en.wikipedia.org/wiki/Computer_architecture" title="Computer architecture" style="text-decoration:none;color:rgb(11,0,128);background-image:none;font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">computer architecture</a><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">.</span><font face="arial, sans-serif"><br>
</font></div><div><br></div><div><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px"><br>
</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-21 8:59 GMT+08:00 Ana Pazos <span dir="ltr"><<a href="mailto:apazos@codeaurora.org" target="_blank">apazos@codeaurora.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi folks,<br>
<br>
I created a test file where I include arm_neon.h.<br>
<br>
I am using Linaro GCC 4.8 (calling the installation dir $GCC48). And it<br>
fails to compile my test with errors like:<br>
<br>
        typedef __attribute__((neon_vector_type(1)))  int64_t int64x1_t;<br>
<br>
I invoke clang setting -target, --sysroot, -gcc-toolchain, mfpu=neon<br>
variables:<br>
<br>
        clang -mfpu=neon --target=aarch64-linux-gnu<br>
-sysroot=$$GCC48/aarch64-linux-gnu/libc --gcc-toolchain=$GCC48 test.c<br>
<br>
The problem is the word size defined as 64 bits in this gcc header file:<br>
        $GCC48/aarch64-linux-gnu/libc/usr/include/bits/wordsize.h<br>
<br>
It should be 32 bits.<br>
<br>
It seems this commit from Jiangning works around the in GCC sysroot issue:<br>
        3dc9e80234b0112a0463feaf65049bcd858d1d36 (For AArch64, support<br>
builtin neon vector type with 'long' as base element type)<br>
<br>
But it looks like GCC should be fixed instead.<br>
<br>
What do you think?<br>
<br>
Ana.<br>
<div><div class="h5"><br>
<br>
-----Original Message-----<br>
From: <a href="mailto:cfe-commits-bounces@cs.uiuc.edu">cfe-commits-bounces@cs.uiuc.edu</a><br>
[mailto:<a href="mailto:cfe-commits-bounces@cs.uiuc.edu">cfe-commits-bounces@cs.uiuc.edu</a>] On Behalf Of Tim Northover<br>
Sent: Thursday, February 20, 2014 5:49 AM<br>
To: <a href="mailto:reviews%2BD2845%2Bpublic%2B5d5f24294ac1b103@llvm-reviews.chandlerc.com">reviews+D2845+public+5d5f24294ac1b103@llvm-reviews.chandlerc.com</a><br>
Cc: llvm-commits; <a href="mailto:joerg@netbsd.org">joerg@netbsd.org</a>; <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
Subject: Re: [PATCH] [AArch64] Change int64_t from 'long long int' to 'long<br>
int' for AArch64 target.<br>
<br>
Hi Kevin,<br>
<br>
I think this patch will break 32-bit ARM and 64-bit Darwin, both of which<br>
define int64_t to be "long long" for various reasons (32-bit ARM because<br>
"long" is 32-bits, Darwin because Just Because. ;-)).<br>
<br>
ItaniumMangle should be fine: that mangling is only used on AArch64<br>
non-Darwin so globally changing it is fine. Targets.cpp looks fine to me as<br>
well.<br>
<br>
For SemaChecking.cpp, the getNeonEltType is shared among all<br>
implementations; perhaps give it another bool parameter and rename the<br>
existing one? IsPolyUnsigned & IsInt64Long for example.<br>
<br>
NeonEmitter.cpp is a bigger problem, since there doesn't appear to be an<br>
"int64_t" type string available. It seems reasonably easy to add one<br>
(lib/AST/ASTContext.cpp -- DecodeTypeFromStr and a comment in Builtins.def),<br>
but I'm not sure if there's a better solution (we're running out of<br>
letters!)<br>
<br>
There are also a couple of bugs on the host side:<br>
<br>
-        qmask |= 1ULL << GetNeonEnum(Proto, TypeVec[ti]);<br>
+        qmask |= 1UL << GetNeonEnum(Proto, TypeVec[ti]);<br>
<br>
qmask and mask are Clang-internal 64-bit variables. This change will<br>
truncate various lines in arm_neon.inc (#included into<br>
lib/Sema/SemaChecking.cpp) when Clang is built on platforms with a 32-bit<br>
long.<br>
<br>
The same goes for the change to the "case".<br>
<br>
Cheers.<br>
<br>
Tim.<br>
</div></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Best Regards,<div><br></div><div>Kevin Qin</div></div>
</div>