It is also planned to include this feature in Linaro GCC in the 2015.03 release.
On 5 March 2015 at 09:23, Pinski, Andrew
wrote:
> It does but not in GCC 4.9. It was added for GCC 5.
>
> Thanks,
> Andrew Pinski
>
>
> From: linaro-toolchain-boun...@lists.linaro.org
> on behalf of Edward Nevill
>
> Sent: Thursday, March 5, 2015 1:19 AM
> To: linaro-toolchain@lists.linaro.org
> Subject: Does gcc know about ldp
>
> Hi,
>
> I have being trying to persuade gcc to generate the ldp instruction without
> success. I have tried many combinations, below is an example.
>
> --- cut here ---
> #define LDP(x,y,p) { \
> struct vec { long x, y; } data; \
> data = *(struct vec *)p; p += 2; \
> x = data.x; y = data.y; \
> }
>
> long testp(long *p) {
> long x, y;
> LDP(x, y, p);
> return x+y;
> }
> --- cut here ---
>
> $ gcc --version
> gcc (GCC) 4.9.1
> Copyright (C) 2014 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> $ gcc -S -O3 ldp.c
> $ cat ldp.s
>
>
> .cpu generic+fp+simd
> .file "ldp.c"
> .text
> .align 2
> .global testp
> .type testp, %function
> testp:
> ldr x1, [x0,8] ;; why not ldp?
> ldr x0, [x0]
> add x0, x1, x0
> ret
> .size testp, .-testp
> .ident "GCC: (GNU) 4.9.1"
>
> What can I do do make it generate ldp?
>
> Ed.
>
>
>
> ___
> linaro-toolchain mailing list
> linaro-toolchain@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-toolchain
>
> ___
> linaro-toolchain mailing list
> linaro-toolchain@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-toolchain
___
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain