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

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

Issue 11194045: Change BKPT and UDF encodings on ARM. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Clarify comments. Fix unaligned_data_irt.nexe, it had a hard-coded BKPT #0x7777. 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 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 /* 8 /*
9 * NaCl Safety Macro Definitions 9 * NaCl Safety Macro Definitions
10 */ 10 */
11 #ifndef NATIVE_CLIENT_SRC_INCLUDE_NACL_MACROS_H_ 11 #ifndef NATIVE_CLIENT_SRC_INCLUDE_NACL_MACROS_H_
12 #define NATIVE_CLIENT_SRC_INCLUDE_NACL_MACROS_H_ 1 12 #define NATIVE_CLIENT_SRC_INCLUDE_NACL_MACROS_H_ 1
13 13
14 #include <stdio.h> 14 #include <stdio.h>
15 #include <stdlib.h> 15 #include <stdlib.h>
16 16
17 #define NACL_TO_STRING_INTERNAL(v) #v
18 #define NACL_TO_STRING(v) NACL_TO_STRING_INTERNAL(v)
19
17 /***************************************************************************** 20 /*****************************************************************************
18 * Safety macros * 21 * Safety macros *
19 *****************************************************************************/ 22 *****************************************************************************/
20 23
21 #define NACL_ARRAY_SIZE_UNSAFE(arr) ((sizeof arr)/sizeof arr[0]) 24 #define NACL_ARRAY_SIZE_UNSAFE(arr) ((sizeof arr)/sizeof arr[0])
22 25
23 /* 26 /*
24 * ASSERT_IS_ARRAY(arr) generates a somewhat opaque compile-time 27 * ASSERT_IS_ARRAY(arr) generates a somewhat opaque compile-time
25 * error if arr is a non-array pointer. This protects against 28 * error if arr is a non-array pointer. This protects against
26 * situations where one writes code like: 29 * situations where one writes code like:
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 NACL_ASSERT_SAME_SIZE(Dest, Source); 361 NACL_ASSERT_SAME_SIZE(Dest, Source);
359 362
360 Dest dest; 363 Dest dest;
361 memcpy(&dest, &source, sizeof(dest)); 364 memcpy(&dest, &source, sizeof(dest));
362 return dest; 365 return dest;
363 } 366 }
364 367
365 #endif /* __cplusplus */ 368 #endif /* __cplusplus */
366 369
367 #endif /* NATIVE_CLIENT_SRC_INCLUDE_NACL_MACROS_H_ */ 370 #endif /* NATIVE_CLIENT_SRC_INCLUDE_NACL_MACROS_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698