Changeset d6b81941 in mainline for kernel/generic/include/memstr.h


Ignore:
Timestamp:
2011-03-29T21:59:55Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
563b538, ad7a6c9
Parents:
ebebd38 (diff), 3abfe9a8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge toolchain upgrade and related changes. Highlights:

  • GCC 4.6, binutils 2.21
  • change the default CROSS_PREFIX to /usr/local/cross to avoid ugly pollution in the /usr/local directory (closes #252)
  • amd64: use a silly workaround to avoid possible GCC 4.6 bug (going to report to GCC's bugzilla)
  • toolchain.sh now supports parallel toolchain build (i.e. all targets at once)
  • improve linker scripts to support the newest compiler input sections
  • remove unused variables and other various fixes for GCC 4.6 warnings (GCC 4.5.1 also passes compilation)
  • unification of kernel memcpy() and memstr() functions (use compiler builtins whenever possible, keep plain C fallback implementations in a sepearate object file)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/memstr.h

    rebebd38 rd6b81941  
    3737
    3838#include <typedefs.h>
    39 #include <arch/memstr.h>
    4039
    41 /*
    42  * Architecture independent variants.
    43  */
    44 extern void *_memcpy(void *dst, const void *src, size_t cnt);
    45 extern void _memsetb(void *dst, size_t cnt, uint8_t x);
    46 extern void _memsetw(void *dst, size_t cnt, uint16_t x);
    47 extern void *memmove(void *dst, const void *src, size_t cnt);
     40#define memset(dst, val, cnt)  __builtin_memset((dst), (val), (cnt))
     41#define memcpy(dst, src, cnt)  __builtin_memcpy((dst), (src), (cnt))
     42
     43extern void memsetb(void *, size_t, uint8_t);
     44extern void memsetw(void *, size_t, uint16_t);
     45extern void *memmove(void *, const void *, size_t);
    4846
    4947#endif
Note: See TracChangeset for help on using the changeset viewer.