mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03: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
Notes:
sideshowbarker
2024-07-19 07:43:27 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1924112d7d6
@ -1760,6 +1760,10 @@ const char* register_name(SegmentRegister index)
|
||||
return "fs";
|
||||
case SegmentRegister::GS:
|
||||
return "gs";
|
||||
case SegmentRegister::SegR6:
|
||||
return "segr6";
|
||||
case SegmentRegister::SegR7:
|
||||
return "segr7";
|
||||
default:
|
||||
ASSERT_NOT_REACHED();
|
||||
return nullptr;
|
||||
|
@ -88,6 +88,8 @@ enum class SegmentRegister {
|
||||
DS,
|
||||
FS,
|
||||
GS,
|
||||
SegR6,
|
||||
SegR7,
|
||||
None = 0xFF,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user