OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [builtins/] [lib/] [memset.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
extern void abort (void);
2
extern int inside_main;
3
 
4
__attribute__ ((__noinline__))
5
void *
6
memset (void *dst, int c, __SIZE_TYPE__ n)
7
{
8
  while (n-- != 0)
9
    n[(char *) dst] = c;
10
 
11
  /* Single-byte memsets should be done inline when optimisation
12
     is enabled.  Do this after the copy in case we're being called to
13
     initialize bss.  */
14
#ifdef __OPTIMIZE__
15
  if (inside_main && n < 2)
16
    abort ();
17
#endif
18
 
19
  return dst;
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.