mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
LibX86: Tolerate invalid segment register indices when disassembling
While #6 and #7 are not valid segment register, they can still be encoded in otherwise-valid instructions, so let's tolerate it.
This commit is contained in:
parent
d7d7a32d47
commit
1924112d7d
2 changed files with 6 additions and 0 deletions
|
@ -1760,6 +1760,10 @@ const char* register_name(SegmentRegister index)
|
||||||
return "fs";
|
return "fs";
|
||||||
case SegmentRegister::GS:
|
case SegmentRegister::GS:
|
||||||
return "gs";
|
return "gs";
|
||||||
|
case SegmentRegister::SegR6:
|
||||||
|
return "segr6";
|
||||||
|
case SegmentRegister::SegR7:
|
||||||
|
return "segr7";
|
||||||
default:
|
default:
|
||||||
ASSERT_NOT_REACHED();
|
ASSERT_NOT_REACHED();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
@ -88,6 +88,8 @@ enum class SegmentRegister {
|
||||||
DS,
|
DS,
|
||||||
FS,
|
FS,
|
||||||
GS,
|
GS,
|
||||||
|
SegR6,
|
||||||
|
SegR7,
|
||||||
None = 0xFF,
|
None = 0xFF,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue