Commit 6cc4833a by Julian Brown Committed by Julian Brown

gcc/

    * config/arm/arm.c (arm_block_move_unaligned_straight)
    (arm_adjust_block_mem, arm_block_move_unaligned_loop)
    (arm_movmemqi_unaligned): New.
    (arm_gen_movmemqi): Support unaligned block copies.

    gcc/testsuite/
    * lib/target-supports.exp (check_effective_target_arm_unaligned):
    New.
    * gcc.target/arm/unaligned-memcpy-1.c: New.
    * gcc.target/arm/unaligned-memcpy-2.c: New.
    * gcc.target/arm/unaligned-memcpy-3.c: New.
    * gcc.target/arm/unaligned-memcpy-4.c: New.

From-SVN: r180131
parent 00820a2a
2011-10-18 Julian Brown <julian@codesourcery.com>
* config/arm/arm.c (arm_block_move_unaligned_straight)
(arm_adjust_block_mem, arm_block_move_unaligned_loop)
(arm_movmemqi_unaligned): New.
(arm_gen_movmemqi): Support unaligned block copies.
2011-10-18 Ira Rosen <ira.rosen@linaro.org>
* doc/md.texi (vec_widen_ushiftl_hi, vec_widen_ushiftl_lo,
2011-10-18 Julian Brown <julian@codesourcery.com>
* lib/target-supports.exp (check_effective_target_arm_unaligned): New.
* gcc.target/arm/unaligned-memcpy-1.c: New.
* gcc.target/arm/unaligned-memcpy-2.c: New.
* gcc.target/arm/unaligned-memcpy-3.c: New.
* gcc.target/arm/unaligned-memcpy-4.c: New.
2011-10-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/47023
......
/* { dg-do compile } */
/* { dg-require-effective-target arm_unaligned } */
/* { dg-options "-O2" } */
#include <string.h>
void unknown_alignment (char *dest, char *src)
{
memcpy (dest, src, 15);
}
/* We should see three unaligned word loads and store pairs, one unaligned
ldrh/strh pair, and an ldrb/strb pair. Sanity check that. */
/* { dg-final { scan-assembler-times "@ unaligned" 8 } } */
/* { dg-final { scan-assembler-times "ldrh" 1 } } */
/* { dg-final { scan-assembler-times "strh" 1 } } */
/* { dg-final { scan-assembler-times "ldrb" 1 } } */
/* { dg-final { scan-assembler-times "strb" 1 } } */
/* { dg-do compile } */
/* { dg-require-effective-target arm_unaligned } */
/* { dg-options "-O2" } */
#include <string.h>
char dest[16];
void aligned_dest (char *src)
{
memcpy (dest, src, 15);
}
/* Expect a multi-word store for the main part of the copy, but subword
loads/stores for the remainder. */
/* { dg-final { scan-assembler-times "stmia" 1 } } */
/* { dg-final { scan-assembler-times "ldrh" 1 } } */
/* { dg-final { scan-assembler-times "strh" 1 } } */
/* { dg-final { scan-assembler-times "ldrb" 1 } } */
/* { dg-final { scan-assembler-times "strb" 1 } } */
/* { dg-do compile } */
/* { dg-require-effective-target arm_unaligned } */
/* { dg-options "-O2" } */
#include <string.h>
char src[16];
void aligned_src (char *dest)
{
memcpy (dest, src, 15);
}
/* Expect a multi-word load for the main part of the copy, but subword
loads/stores for the remainder. */
/* { dg-final { scan-assembler-times "ldmia" 1 } } */
/* { dg-final { scan-assembler-times "ldrh" 1 } } */
/* { dg-final { scan-assembler-times "strh" 1 } } */
/* { dg-final { scan-assembler-times "ldrb" 1 } } */
/* { dg-final { scan-assembler-times "strb" 1 } } */
/* { dg-do compile } */
/* { dg-require-effective-target arm_unaligned } */
/* { dg-options "-O2" } */
#include <string.h>
char src[16];
char dest[16];
void aligned_both (void)
{
memcpy (dest, src, 15);
}
/* We know both src and dest to be aligned: expect multiword loads/stores. */
/* { dg-final { scan-assembler-times "ldmia" 1 } } */
/* { dg-final { scan-assembler-times "stmia" 1 } } */
......@@ -1973,6 +1973,18 @@ proc check_effective_target_arm_dsp { } {
}]
}
# Return 1 if this is an ARM target that supports unaligned word/halfword
# load/store instructions.
proc check_effective_target_arm_unaligned { } {
return [check_no_compiler_messages arm_unaligned assembly {
#ifndef __ARM_FEATURE_UNALIGNED
#error no unaligned support
#endif
int i;
}]
}
# Add the options needed for NEON. We need either -mfloat-abi=softfp
# or -mfloat-abi=hard, but if one is already specified by the
# multilib, use it. Similarly, if a -mfpu option already enables
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment