On Tue, 4 Jun 2013, Vladimir Murzin wrote:
On Mon, Jun 03, 2013 at 04:02:15PM -0400, Nicolas Pitre wrote:
On Mon, 3 Jun 2013, Vladimir Murzin wrote:
+.data +.align 4 +raid6_neon_constants: +.word 0x1d1d1d1d, 0x1d1d1d1d, 0x1d1d1d1d, 0x1d1d1d1d
+.text
If the above constants are indeed constants, you should put them in the .text section instead.
Yes, they are constants. Doesn't .rodata fit best for them?
That is fine as well.
The advantage with .text is that you can get a reference to those constants via an offset on top of the pc register, e.g.:
adr r7, raid6_neon_constants ldm r7, {...}
The adr, when in range, is more efficient than a ldr as this is translated into:
add r1, pc, #(raid6_neon_constants - . - 8)
But that works only if the target label is in the same section as the code.
Nicolas