OpenCores
URL https://opencores.org/ocsvn/hf-risc/hf-risc/trunk

Subversion Repositories hf-risc

[/] [hf-risc/] [trunk/] [tools/] [riscv-gnu-toolchain-master/] [glibc/] [sysdeps/] [riscv/] [bits/] [string.h] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 serginhofr
/* This file should provide inline versions of string functions.
2
 
3
   Surround GCC-specific parts with #ifdef __GNUC__, and use `__extern_inline'.
4
 
5
   This file should define __STRING_INLINES if functions are actually defined
6
   as inlines.  */
7
 
8
#ifndef _BITS_STRING_H
9
#define _BITS_STRING_H  1
10
 
11
#define _STRING_ARCH_unaligned   0
12
 
13
#if defined(__GNUC__) && !defined(__cplusplus)
14
 
15
static __inline__ unsigned long __libc_detect_null(unsigned long w)
16
{
17
  unsigned long mask = 0x7f7f7f7f;
18
  if (sizeof(long) == 8)
19
    mask = ((mask << 16) << 16) | mask;
20
  return ~(((w & mask) + mask) | w | mask);
21
}
22
 
23
#endif /* __GNUC__ && !__cplusplus */
24
 
25
#endif /* bits/string.h */

powered by: WebSVN 2.1.0

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