1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     nstd_Printf.h
4   Copyright (C)2009 Nintendo Co., Ltd.  All rights reserved.
5   These coded instructions, statements, and computer programs contain
6   proprietary information of Nintendo of America Inc. and/or Nintendo
7   Company Ltd., and are protected by Federal copyright law. They may
8   not be disclosed to third parties or copied or duplicated in any form,
9   in whole or in part, without the prior written consent of Nintendo.
10   $Rev: 15473 $
11  *---------------------------------------------------------------------------
12 
13 
14 */
15 
16 #ifndef NN_NSTD_STRING_H_
17 #define NN_NSTD_STRING_H_
18 
19 #include <nn/types.h>
20 #include <nn/util/detail/util_CLibImpl.h>
21 
22 
23 // TODO: C versions of symbol names do not include ARMv4/ARMv5
24 NN_EXTERN_C void nnnstdMemCpy(void *dstp, const void *srcp, size_t size);
25 NN_EXTERN_C void nnnstdMemMove(void *dstp, const void *srcp, size_t size);
26 
27 #if     defined(NN_PROCESSOR_ARM_V4) || defined(NN_PROCESSOR_ARM_V5)
28     #define NN_NSTD_ARM_NS ARMv4
29 #elif   defined(NN_PROCESSOR_ARM_V6)
30     #define NN_NSTD_ARM_NS ARMv6
31 #else
32     #error processor not selected
33 #endif
34 
35 
36 #ifdef __cplusplus
37 
38 namespace nn { namespace nstd {
39 
40     namespace NN_NSTD_ARM_NS
41     {
MemCpy(void * dstp,const void * srcp,size_t size)42         inline void MemCpy(void *dstp, const void *srcp, size_t size)
43         {
44             nnnstdMemCpy(dstp, srcp, size);
45         }
46 
MemMove(void * dstp,const void * srcp,size_t size)47         inline void MemMove(void *dstp, const void *srcp, size_t size)
48         {
49             nnnstdMemMove(dstp, srcp, size);
50         }
51     }
52 
53     using namespace NN_NSTD_ARM_NS;
54 }}
55 
56 #endif
57 
58 #endif /* NN_NSTD_STRING_H_ */
59