Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Side by Side Diff: src/include/nacl_base.h

Issue 10919162: [MIPS] Implementation of sel_ldr for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Rebase (Saturday morning). Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/include/elf_constants.h ('k') | src/include/portability.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl Basic Common Definitions. 8 * NaCl Basic Common Definitions.
9 */ 9 */
10 #ifndef NATIVE_CLIENT_SRC_INCLUDE_NACL_BASE_H_ 10 #ifndef NATIVE_CLIENT_SRC_INCLUDE_NACL_BASE_H_
11 #define NATIVE_CLIENT_SRC_INCLUDE_NACL_BASE_H_ 1 11 #define NATIVE_CLIENT_SRC_INCLUDE_NACL_BASE_H_ 1
12 12
13 /* 13 /*
14 * The following part is necessary for Mips because Mips compilers by default
15 * preprocess "mips" string and replace it with character '1'. To allow using
16 * "NACL_mips" macro, we need to undefine "mips" macro.
17 */
18
19 #ifdef mips
20 # undef mips
21 #endif
22
23 /*
14 * putting extern "C" { } in header files make emacs want to indent 24 * putting extern "C" { } in header files make emacs want to indent
15 * everything, which looks odd. rather than putting in fancy syntax 25 * everything, which looks odd. rather than putting in fancy syntax
16 * recognition in c-mode, we just use the following macros. 26 * recognition in c-mode, we just use the following macros.
17 * 27 *
18 * TODO: before releasing code, we should provide a defintion of a 28 * TODO: before releasing code, we should provide a defintion of a
19 * function to be called from c-mode-hook that will make it easy to 29 * function to be called from c-mode-hook that will make it easy to
20 * follow our coding style (which we also need to document). 30 * follow our coding style (which we also need to document).
21 */ 31 */
22 #ifdef __cplusplus 32 #ifdef __cplusplus
23 # define EXTERN_C_BEGIN extern "C" { 33 # define EXTERN_C_BEGIN extern "C" {
(...skipping 28 matching lines...) Expand all
52 * NACL_ARCH or NACL_arm, you need to include this header. 62 * NACL_ARCH or NACL_arm, you need to include this header.
53 */ 63 */
54 #define NACL_MERGE(x, y) x ## y 64 #define NACL_MERGE(x, y) x ## y
55 #define NACL_ARCH(x) NACL_MERGE(NACL_, x) 65 #define NACL_ARCH(x) NACL_MERGE(NACL_, x)
56 /* 66 /*
57 * Avoid using 0, because "#if FOO == 0" is true if FOO is undefined, and does 67 * Avoid using 0, because "#if FOO == 0" is true if FOO is undefined, and does
58 * not produce a warning or error. 68 * not produce a warning or error.
59 */ 69 */
60 #define NACL_x86 1 70 #define NACL_x86 1
61 #define NACL_arm 2 71 #define NACL_arm 2
72 #define NACL_mips 3
62 73
63 /***************************************************************************** 74 /*****************************************************************************
64 * Architecture name encodings. 75 * Architecture name encodings.
65 * 76 *
66 * NACL_ARCH_NAME(name, arch) - Name specific to the given architecture, 77 * NACL_ARCH_NAME(name, arch) - Name specific to the given architecture,
67 * NACL_SUBARCH_NAME(name, arch, subarch) - Name specific to the 78 * NACL_SUBARCH_NAME(name, arch, subarch) - Name specific to the
68 * given architecture and subarchitecture. 79 * given architecture and subarchitecture.
69 */ 80 */
70 #define NACL_MERGE_ARCH_NAME(name, arch) NaCl_ ## name ## _ ## arch 81 #define NACL_MERGE_ARCH_NAME(name, arch) NaCl_ ## name ## _ ## arch
71 #define NACL_ARCH_NAME(name, arch) NACL_MERGE_ARCH_NAME(name, arch) 82 #define NACL_ARCH_NAME(name, arch) NACL_MERGE_ARCH_NAME(name, arch)
72 #define NACL_MERGE_SUBARCH_NAME(name, arch, subarch) \ 83 #define NACL_MERGE_SUBARCH_NAME(name, arch, subarch) \
73 NaCl_ ## name ## _ ## arch ## _ ## subarch 84 NaCl_ ## name ## _ ## arch ## _ ## subarch
74 #define NACL_SUBARCH_NAME(name, arch, subarch) \ 85 #define NACL_SUBARCH_NAME(name, arch, subarch) \
75 NACL_MERGE_SUBARCH_NAME(name, arch, subarch) 86 NACL_MERGE_SUBARCH_NAME(name, arch, subarch)
76 87
77 #endif /* NATIVE_CLIENT_SRC_INCLUDE_NACL_BASE_H_ */ 88 #endif /* NATIVE_CLIENT_SRC_INCLUDE_NACL_BASE_H_ */
OLDNEW
« no previous file with comments | « src/include/elf_constants.h ('k') | src/include/portability.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698