200x-xx-xx Nathan Sidwell <nathan@codesourcery.com>
gcc/testsuite/ * gcc.c-torture/execute/builtins/memops-asm-lib.c: Do the copy or set before checking whether it was allowed. * gcc.c-torture/execute/builtins/lib/memset.c: Do the memset before checking inside_main. From-SVN: r121746
This commit is contained in:
parent
4a799f3d0d
commit
a6fb11e20d
3 changed files with 18 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-02-09 Richard Sandiford <richard@codesourcery.com>
|
||||
|
||||
* gcc.c-torture/execute/builtins/memops-asm-lib.c: Do the copy or
|
||||
set before checking whether it was allowed.
|
||||
* gcc.c-torture/execute/builtins/lib/memset.c: Do the memset
|
||||
before checking inside_main.
|
||||
|
||||
2007-02-09 Richard Sandiford <richard@codesourcery.com>
|
||||
|
||||
* gcc.dg/compat/struct-layout-1.h (v16sf): Define to v4sf on
|
||||
|
|
|
@ -4,15 +4,16 @@ extern int inside_main;
|
|||
void *
|
||||
memset (void *dst, int c, __SIZE_TYPE__ n)
|
||||
{
|
||||
while (n-- != 0)
|
||||
n[(char *) dst] = c;
|
||||
|
||||
/* Single-byte memsets should be done inline when optimisation
|
||||
is enabled. */
|
||||
is enabled. Do this after the copy in case we're being called to
|
||||
initialize bss. */
|
||||
#ifdef __OPTIMIZE__
|
||||
if (inside_main && n < 2)
|
||||
abort ();
|
||||
#endif
|
||||
|
||||
while (n-- != 0)
|
||||
n[(char *) dst] = c;
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
|
|
@ -51,27 +51,29 @@ my_bzero (void *d, size_t n)
|
|||
void *
|
||||
memcpy (void *d, const void *s, size_t n)
|
||||
{
|
||||
void *result = my_memcpy (d, s, n);
|
||||
TEST_ABORT;
|
||||
return my_memcpy (d, s, n);
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
bcopy (const void *s, void *d, size_t n)
|
||||
{
|
||||
TEST_ABORT;
|
||||
my_bcopy (s, d, n);
|
||||
TEST_ABORT;
|
||||
}
|
||||
|
||||
void *
|
||||
memset (void *d, int c, size_t n)
|
||||
{
|
||||
void *result = my_memset (d, c, n);
|
||||
TEST_ABORT;
|
||||
return my_memset (d, c, n);
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
bzero (void *d, size_t n)
|
||||
{
|
||||
TEST_ABORT;
|
||||
my_bzero (d, n);
|
||||
TEST_ABORT;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue