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

Side by Side Diff: syzygy/core/disassembler_util_unittest_vex_utils.h

Issue 2841863003: Improve the decoding of the VEX encoded instructions. (Closed)
Patch Set: Address Sam's comment, support SIB.base = 5 Created 3 years, 7 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
OLDNEW
(Empty)
1 // Copyright 2017 Google Inc. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 #ifndef SYZYGY_CORE_DISASSEMBLER_UTIL_UNITTEST_VEX_UTILS_H_
16 #define SYZYGY_CORE_DISASSEMBLER_UTIL_UNITTEST_VEX_UTILS_H_
17
huangs 2017/05/01 18:54:14 #include <stdint.h> for uint8_t.
Sébastien Marchand 2017/05/01 21:19:27 Done.
18 #include <vector>
19
20 namespace core {
21 namespace unittests {
22
23 // Examples of 3-byte VEX instructions that aren't properly handled by Distorm.
24 extern const std::vector<std::vector<uint8_t>> kVexInstructions;
25
26 // Most of the 3-byte VEX instructions end up with a Mod R/M encoded operand
27 // and some optional extra bytes (depending on the value of the Mod R/M byte),
28 // see the comment of core::GetOperandBytesSize.
29 //
30 // This is a list of all the 3-byte VEX instruction that we support and all the
31 // possible variations of the Mod R/M byte, all these instructions have been
32 // verified in a disassembler.
33 extern const std::vector<std::vector<uint8_t>> kVexInstructionsModRMVariants;
34
35 } // namespace unittests
36 } // namespace core
37
38 #endif // SYZYGY_CORE_DISASSEMBLER_UTIL_UNITTEST_VEX_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698