OLD | NEW |
(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 |
| 18 #include <stdint.h> |
| 19 |
| 20 #include <vector> |
| 21 |
| 22 namespace core { |
| 23 namespace unittests { |
| 24 |
| 25 // Examples of 3-byte VEX instructions that aren't properly handled by Distorm. |
| 26 extern const std::vector<std::vector<uint8_t>> kVexInstructions; |
| 27 |
| 28 // Most of the 3-byte VEX instructions end up with a Mod R/M encoded operand |
| 29 // and some optional extra bytes (depending on the value of the Mod R/M byte), |
| 30 // see the comment of core::GetOperandBytesSize. |
| 31 // |
| 32 // This is a list of all the 3-byte VEX instruction that we support and all the |
| 33 // possible variations of the Mod R/M byte, all these instructions have been |
| 34 // verified in a disassembler. |
| 35 extern const std::vector<std::vector<uint8_t>> kVexInstructionsModRMVariants; |
| 36 |
| 37 } // namespace unittests |
| 38 } // namespace core |
| 39 |
| 40 #endif // SYZYGY_CORE_DISASSEMBLER_UTIL_UNITTEST_VEX_UTILS_H_ |
OLD | NEW |