[vlc-devel] [PATCH]: added proper alignments for arm_neon
Felix Paul Kühne
fkuehne.videolan at gmail.com
Fri Jul 27 03:40:00 CEST 2012
On 26.07.2012, at 17:10, Felix Paul Kühne wrote:
>
> On 26.07.2012, at 10:56, Rémi Denis-Courmont wrote:
>
>> Le jeudi 26 juillet 2012 16:08:55 Felix Paul Kühne, vous avez écrit :
>>> the attached patch fixes alignment issues (and crashes) in our NEON code
>>> for iOS.
>>
>> If I grok the binutils documentation, this patch breaks the official ARM
>> assembler syntax:
>>
>> ".align expression [, expression]
>> This is the generic .align directive. For the ARM however if the first
>> argument is zero (ie no alignment is needed) the assembler will behave as if
>> the argument had been 2 (ie pad to the next four byte boundary). This is for
>> compatibility with ARM's own assembler."
>
> I'm understanding it differently, but this might be an English parsing error:
>
> With the ARM compiler, .align 0 == .align 2. So, if we put a .align 2, there is no difference for this compiler. However, on clang, there is because it fails to do the alignment properly on 4 bytes if I don't specify this argument. I have no idea what gcc is doing in this case because I don't have any GCC copy for ARM compilation around.
>
> So, if you consider this patch as correct as mentioned in a previous mail in this thread and since it's what Måns is suggesting for x264, I'd like to commit it.
To follow up on this and to follow Rafaël's remark, here's an updated patch which references Måns' argumentation for future lookup.
Best regards,
Felix
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-arm_neon-align-ARM-ASM-to-4-bytes-to-work-around-the.patch
Type: application/octet-stream
Size: 3070 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120726/01c192df/attachment.obj>
More information about the vlc-devel
mailing list