Skip to content

reimplement: SHC_3BB0A8C1_0x0047B060 structure and register issue#119

Draft
TheRedDaemon wants to merge 1 commit into
mainfrom
reimpl/SHC_3BB0A8C1_0x0047B060
Draft

reimplement: SHC_3BB0A8C1_0x0047B060 structure and register issue#119
TheRedDaemon wants to merge 1 commit into
mainfrom
reimpl/SHC_3BB0A8C1_0x0047B060

Conversation

@TheRedDaemon

@TheRedDaemon TheRedDaemon commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Removed the open flags, since Windows provides MACROs for them.

This function does not seem to be compatible with the bitfields, but even if I use an int, the last "loopCount" usage is still optimized to an 16bit mov instead of the "and 0xffff".
Yet still, even if I assume they used a plain int, I would still be confused regarding the bit compares, since that is horrible to use. Maybe they used helper macros? I managed to make the other cases work so far, increasing my confusion.
While it seems they are not compatible with bit fields, certain changes to the structure of the code cause specific parts to be properly handled like in the original. Even the current case contains one such compare.

In any case, the function has some non-fitting register usage even if the bitfield usage is transformed, so something is wrong anyway.
The logic itself should be sound.

@TheRedDaemon TheRedDaemon requested a review from gynt June 20, 2026 16:32
@TheRedDaemon TheRedDaemon added the help wanted Extra attention is needed label Jun 20, 2026
@TheRedDaemon TheRedDaemon force-pushed the reimpl/SHC_3BB0A8C1_0x0047B060 branch from 6114e84 to f5d77a1 Compare June 20, 2026 16:54
@TheRedDaemon TheRedDaemon force-pushed the reimpl/SHC_3BB0A8C1_0x0047B060 branch from f5d77a1 to 12ef8bf Compare June 20, 2026 17:01
@TheRedDaemon TheRedDaemon changed the title reimplement: SHC_3BB0A8C1_0x0047B060 register and bitfield issues reimplement: SHC_3BB0A8C1_0x0047B060 structure and register issue Jun 20, 2026
gynt pushed a commit that referenced this pull request Jun 23, 2026

@gynt gynt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Desired changes have been implemented upstream a1f7e6d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants