Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arch-x86: Fixed M5InternalError when decoding certain bytes
0F 38 is the two bytes prefixes to decode a three-byte opcode. To prevent errors, the two_bytes_opcode decoder will complain if it tries to decode 38 as the opcode, because it is a prefix. The decoder, will treat 38 as a prefix, preventing it to end in the two_byte_opcode decoder. However, using the VEX prefix is possible to reach this forbidden state. The set of bytes C4 01 01 38 00 will trigger the mentioned M5InternalError. The previous instruction is not valid, but it could be decoded from an speculative path. In its place, a UD2 instructtion should be emitted if the VEX prefix is present. Change-Id: I6b7c4b3593dd8e6e8ac99aaf306b8feeb7784b56 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49990 Reviewed-by: Gabe Black <[email protected]> Maintainer: Gabe Black <[email protected]> Tested-by: kokoro <[email protected]>
- Loading branch information