diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6/pr47551.patch')
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6/pr47551.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6/pr47551.patch b/meta/recipes-devtools/gcc/gcc-4.6/pr47551.patch new file mode 100644 index 0000000000..5271ffa6f2 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6/pr47551.patch | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | 2011-02-02 Richard Sandiford <richard.sandiford@linaro.org> | ||
| 2 | |||
| 3 | gcc/ | ||
| 4 | PR target/47551 | ||
| 5 | * config/arm/arm.c (coproc_secondary_reload_class): Handle | ||
| 6 | structure modes. Don't check neon_vector_mem_operand for | ||
| 7 | vector or structure modes. | ||
| 8 | |||
| 9 | gcc/testsuite/ | ||
| 10 | PR target/47551 | ||
| 11 | * gcc.target/arm/neon-modes-2.c: New test. | ||
| 12 | |||
| 13 | === modified file 'gcc/config/arm/arm.c' | ||
| 14 | --- old/gcc/config/arm/arm.c 2011-02-21 14:04:51 +0000 | ||
| 15 | +++ new/gcc/config/arm/arm.c 2011-03-02 11:38:43 +0000 | ||
| 16 | @@ -9139,11 +9139,14 @@ | ||
| 17 | return GENERAL_REGS; | ||
| 18 | } | ||
| 19 | |||
| 20 | + /* The neon move patterns handle all legitimate vector and struct | ||
| 21 | + addresses. */ | ||
| 22 | if (TARGET_NEON | ||
| 23 | + && MEM_P (x) | ||
| 24 | && (GET_MODE_CLASS (mode) == MODE_VECTOR_INT | ||
| 25 | - || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT) | ||
| 26 | - && neon_vector_mem_operand (x, 0)) | ||
| 27 | - return NO_REGS; | ||
| 28 | + || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT | ||
| 29 | + || VALID_NEON_STRUCT_MODE (mode))) | ||
| 30 | + return NO_REGS; | ||
| 31 | |||
| 32 | if (arm_coproc_mem_operand (x, wb) || s_register_operand (x, mode)) | ||
| 33 | return NO_REGS; | ||
| 34 | |||
| 35 | === added file 'gcc/testsuite/gcc.target/arm/neon-modes-2.c' | ||
| 36 | --- old/gcc/testsuite/gcc.target/arm/neon-modes-2.c 1970-01-01 00:00:00 +0000 | ||
| 37 | +++ new/gcc/testsuite/gcc.target/arm/neon-modes-2.c 2011-02-02 10:02:45 +0000 | ||
| 38 | @@ -0,0 +1,24 @@ | ||
| 39 | +/* { dg-do compile } */ | ||
| 40 | +/* { dg-require-effective-target arm_neon_ok } */ | ||
| 41 | +/* { dg-options "-O1" } */ | ||
| 42 | +/* { dg-add-options arm_neon } */ | ||
| 43 | + | ||
| 44 | +#include "arm_neon.h" | ||
| 45 | + | ||
| 46 | +#define SETUP(A) x##A = vld3_u32 (ptr + A * 0x20) | ||
| 47 | +#define MODIFY(A) x##A = vld3_lane_u32 (ptr + A * 0x20 + 0x10, x##A, 1) | ||
| 48 | +#define STORE(A) vst3_u32 (ptr + A * 0x20, x##A) | ||
| 49 | + | ||
| 50 | +#define MANY(A) A (0), A (1), A (2), A (3), A (4), A (5) | ||
| 51 | + | ||
| 52 | +void | ||
| 53 | +bar (uint32_t *ptr, int y) | ||
| 54 | +{ | ||
| 55 | + uint32x2x3_t MANY (SETUP); | ||
| 56 | + int *x = __builtin_alloca (y); | ||
| 57 | + int z[0x1000]; | ||
| 58 | + foo (x, z); | ||
| 59 | + MANY (MODIFY); | ||
| 60 | + foo (x, z); | ||
| 61 | + MANY (STORE); | ||
| 62 | +} | ||
| 63 | |||
