[LLVMdev] Bug in X86CompilationCallback_SSE

Corrado Zoccolo czoccolo at gmail.com
Thu Mar 12 04:19:03 PDT 2009


On Thu, Mar 12, 2009 at 6:46 AM, Evan Cheng <echeng at apple.com> wrote:
>
> On Mar 11, 2009, at 2:39 PM, Corrado Zoccolo wrote:
>
>> I don't know how to file a PR, but I have a patch (see below), that
>> should work regardless of abi differences, since it relies on the
>> compiler to do the though job.
>>
>> void X86CompilationCallback_SSE(void) {
>>    char * SAVEBUF= (char*) alloca(64+12); // alloca is 16byte aligned
>
> How do you ensure it's 16-byte aligned? Can you declare a local array
> and specify alignment using attribute __aligned?
>
> Evan

Well, my gcc ensures it is properly alligned (following malloc
specification), but alloca is not fully specified, so probably it is
better to use the local array with the attribute to be sure that this
will work also on different versions of gcc.

-- 
__________________________________________________________________________

dott. Corrado Zoccolo                          mailto:czoccolo at gmail.com
PhD - Department of Computer Science - University of Pisa, Italy
--------------------------------------------------------------------------



More information about the llvm-dev mailing list