[UDFS] Remove X86 optimizations#316
Draft
Copilot wants to merge 6 commits into
Draft
Conversation
Agent-Logs-Url: https://github.com/Zero3K20/reactos/sessions/d8e7977a-cb2b-413c-8006-dd3f99094730 Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Zero3K20/reactos/sessions/d8e7977a-cb2b-413c-8006-dd3f99094730 Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove x86 optimizations
[UDFS] Remove X86 optimizations
Apr 28, 2026
This was referenced Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The UDFS driver contained several
#ifdef _X86_code paths using MSVC inline assembly (__asm) as architecture-specific "optimizations", making the code non-portable and incompatible with non-MSVC compilers (e.g. Clang/GCC).Changes
udf_info/udf_info.cpp— Drop 256-entryint8lookup table forvalid_char_arrguarded by#ifdef _X86_; use the existing generic string form unconditionallyudf_dbg.h— Replace__asm int 3inUDFBreakPoint()withDbgBreakPoint(); collapse dualUDFTouch()implementations into a single portable one usingvolatile UCHARto prevent the memory read from being elidedInclude/mem_tools.cpp— Samevolatile UCHARfix forDbgTouch(), removing x86 inline asm variantInclude/string_lib.cpp— Remove x86 asm string-length loops inRtlAppendUnicodeToString()andMyInitUnicodeString(); keep the genericwhile(Str2[i])loopInclude/mem_tools.h— Replace__asm int 3debug breakpoints with portable__debugbreak()inMyFreePool__()andMyReallocPool__()Before (example):
After: