[cfe-dev] LLVM 3.0rc3 Testing Beginning
Huaxia
huaxia.zhao at googlemail.com
Sat Nov 12 17:25:35 PST 2011
Hi,
I just downloaded 3.0 and have a try on in-line assembly code and the
problem is still there. I think it is not a critical issue for 3.0 release
anyway.
It seems clang doesnt support "A" constraint in in-line assembly template
under 64-bit mode, which basically load an 128bit data from memory to
RDX:RAX, with the following error during the compiling:
clang -g -Wall -m64 -mcx16 try.c -o try
fatal error: error in backend: Cannot select: 0x1e92f20: i64 = build_pair
0x1e92d20, 0x1e92e20 [ORD=81]
... (ignore the rest dump)
gcc can correctly do this. I tried clang/llvm 2.9 on both Apple and Debian
unstable, and clang-3.0rc3 binary build, all failed.
Best Regards
Huaxia Zhao
P.S.
The test code part:
typedef __int128_t int128_t;
int128_t
atomic_compare_and_swap128(
volatile int128_t * Mem,
int128_t Swp,
int128_t Cmp)
{
assert(Mem != NULL);
int128_t Out = 0;
int64_t low64 = int128__low64(Swp); // get low and high 64-bit
separately.
int64_t high64 = int128__high64(Swp);
/* the *Mem MUST BE 16-byte Aligned. */
__asm__ __volatile__
(
"pushq %%rbx \n"
"movq %[low64], %%rbx \n"
"lock cmpxchg16b (%[Mem]) \n"
"popq %%rbx \n"
: [Mem] "+D" (Mem), "=A" (Out)
: "A" (Cmp), [low64] "m" (low64), "c" (high64)
);
return Out;
}
On 12 November 2011 01:33, Huaxia <huaxia.zhao at googlemail.com> wrote:
> Hello:
>
> Newbie here. I just tested the LLVM 2.9 today and found the in-line
> assembly of clang/llvm do not handle 128-bit integer very well (as
> gcc-does).
> Both Apple and Linux version seem affected. I will try 3.0rc3 tomorrow to
> see if fixed.
>
> Thanks.
>
> Huaxia Zhao
>
>
>
>
> On 8 November 2011 06:00, Bill Wendling <wendling at apple.com> wrote:
>
>> Good day, LLVMers!
>>
>> We are starting on our third (and hopefully last) round of testing for
>> LLVM 3.0. Please visit:
>>
>> http://llvm.org/pre-releases/3.0/rc3/
>>
>> for the sources. There are also binaries for Darwin up there, with more
>> to come during the week. Please build this release candidate, test it out
>> on your projects, and let us know if you find any regressions from the 2.9
>> release.
>>
>> Please keep in mind that we are not taking any more fixes except for
>> those issues which are critical for the release.
>>
>> Share and enjoy!
>> -bw
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>
>
>
> --
> Huaxia Zhao (Frank)
> huaxia.zhao at gmail.com
>
--
Huaxia Zhao (Frank)
huaxia.zhao at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111113/0af8fcec/attachment.html>
More information about the cfe-dev
mailing list