Re-enable index-basics-workers test to see if still times
[chromium-blink-merge.git] / tools / memory_watcher / ia32_modrm_map.cc
blob5c4ec3f2ff497d64d3c4d6826e991fa3b6c8eccf
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 /*
6 * Table of relevant information about how to decode the ModR/M byte.
7 * Based on information in the IA 32 Intel Architecture
8 * Software Developer's Manual Volume 2: Instruction Set Reference.
9 */
11 #include "mini_disassembler.h"
12 #include "mini_disassembler_types.h"
14 namespace sidestep {
16 const ModrmEntry MiniDisassembler::s_ia16_modrm_map_[] = {
17 // mod == 00
18 /* r/m == 000 */ { false, false, OS_ZERO },
19 /* r/m == 001 */ { false, false, OS_ZERO },
20 /* r/m == 010 */ { false, false, OS_ZERO },
21 /* r/m == 011 */ { false, false, OS_ZERO },
22 /* r/m == 100 */ { false, false, OS_ZERO },
23 /* r/m == 101 */ { false, false, OS_ZERO },
24 /* r/m == 110 */ { true, false, OS_WORD },
25 /* r/m == 111 */ { false, false, OS_ZERO },
26 // mod == 01
27 /* r/m == 000 */ { true, false, OS_BYTE },
28 /* r/m == 001 */ { true, false, OS_BYTE },
29 /* r/m == 010 */ { true, false, OS_BYTE },
30 /* r/m == 011 */ { true, false, OS_BYTE },
31 /* r/m == 100 */ { true, false, OS_BYTE },
32 /* r/m == 101 */ { true, false, OS_BYTE },
33 /* r/m == 110 */ { true, false, OS_BYTE },
34 /* r/m == 111 */ { true, false, OS_BYTE },
35 // mod == 10
36 /* r/m == 000 */ { true, false, OS_WORD },
37 /* r/m == 001 */ { true, false, OS_WORD },
38 /* r/m == 010 */ { true, false, OS_WORD },
39 /* r/m == 011 */ { true, false, OS_WORD },
40 /* r/m == 100 */ { true, false, OS_WORD },
41 /* r/m == 101 */ { true, false, OS_WORD },
42 /* r/m == 110 */ { true, false, OS_WORD },
43 /* r/m == 111 */ { true, false, OS_WORD },
44 // mod == 11
45 /* r/m == 000 */ { false, false, OS_ZERO },
46 /* r/m == 001 */ { false, false, OS_ZERO },
47 /* r/m == 010 */ { false, false, OS_ZERO },
48 /* r/m == 011 */ { false, false, OS_ZERO },
49 /* r/m == 100 */ { false, false, OS_ZERO },
50 /* r/m == 101 */ { false, false, OS_ZERO },
51 /* r/m == 110 */ { false, false, OS_ZERO },
52 /* r/m == 111 */ { false, false, OS_ZERO }
55 const ModrmEntry MiniDisassembler::s_ia32_modrm_map_[] = {
56 // mod == 00
57 /* r/m == 000 */ { false, false, OS_ZERO },
58 /* r/m == 001 */ { false, false, OS_ZERO },
59 /* r/m == 010 */ { false, false, OS_ZERO },
60 /* r/m == 011 */ { false, false, OS_ZERO },
61 /* r/m == 100 */ { false, true, OS_ZERO },
62 /* r/m == 101 */ { true, false, OS_DOUBLE_WORD },
63 /* r/m == 110 */ { false, false, OS_ZERO },
64 /* r/m == 111 */ { false, false, OS_ZERO },
65 // mod == 01
66 /* r/m == 000 */ { true, false, OS_BYTE },
67 /* r/m == 001 */ { true, false, OS_BYTE },
68 /* r/m == 010 */ { true, false, OS_BYTE },
69 /* r/m == 011 */ { true, false, OS_BYTE },
70 /* r/m == 100 */ { true, true, OS_BYTE },
71 /* r/m == 101 */ { true, false, OS_BYTE },
72 /* r/m == 110 */ { true, false, OS_BYTE },
73 /* r/m == 111 */ { true, false, OS_BYTE },
74 // mod == 10
75 /* r/m == 000 */ { true, false, OS_DOUBLE_WORD },
76 /* r/m == 001 */ { true, false, OS_DOUBLE_WORD },
77 /* r/m == 010 */ { true, false, OS_DOUBLE_WORD },
78 /* r/m == 011 */ { true, false, OS_DOUBLE_WORD },
79 /* r/m == 100 */ { true, true, OS_DOUBLE_WORD },
80 /* r/m == 101 */ { true, false, OS_DOUBLE_WORD },
81 /* r/m == 110 */ { true, false, OS_DOUBLE_WORD },
82 /* r/m == 111 */ { true, false, OS_DOUBLE_WORD },
83 // mod == 11
84 /* r/m == 000 */ { false, false, OS_ZERO },
85 /* r/m == 001 */ { false, false, OS_ZERO },
86 /* r/m == 010 */ { false, false, OS_ZERO },
87 /* r/m == 011 */ { false, false, OS_ZERO },
88 /* r/m == 100 */ { false, false, OS_ZERO },
89 /* r/m == 101 */ { false, false, OS_ZERO },
90 /* r/m == 110 */ { false, false, OS_ZERO },
91 /* r/m == 111 */ { false, false, OS_ZERO },
94 }; // namespace sidestep