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

Side by Side Diff: src/trusted/validator_x86/RexPrefixes.h

Issue 6883091: Start unit testing for functions in nc_inst_state.c (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 8 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
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
4 * found in the LICENSE file.
5 */
6
7 /* Defines accessor functions for rex prefixes. */
8
9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_REXPREFIXES_H_
10 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_REXPREFIXES_H_
11
12 /* Defines the corresponding mask for the bits of the the Rex prefix. */
13 #define NaClRexWMask 0x8
14 #define NaClRexRMask 0x4
15 #define NaClRexXMask 0x2
16 #define NaClRexBMask 0x1
17
18 /* Defines accessor functions for each of the rex bits. */
19 static INLINE uint8_t NaClRexW(uint8_t prefix) {
20 return NaClHasBit(prefix, NaClRexWMask);
21 }
22
23 static INLINE uint8_t NaClRexR(uint8_t prefix) {
24 return NaClHasBit(prefix, NaClRexRMask);
25 }
26
27 static INLINE uint8_t NaClRexX(uint8_t prefix) {
28 return NaClHasBit(prefix, NaClRexXMask);
29 }
30
31 static INLINE uint8_t NaClRexB(uint8_t prefix) {
32 return NaClHasBit(prefix, NaClRexBMask);
33 }
34
35 /* Defines the range of rex prefix values. */
36 #define NaClRexMin 0x40
37 #define NaClRexMax 0x4F
38
39 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_REXPREFIXES_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698