Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GEN] Replace inline assembler for non VS6 builds #508

Merged
merged 3 commits into from
Apr 1, 2025

Conversation

Mauller
Copy link

@Mauller Mauller commented Mar 25, 2025

This replaces the inline ASM in non VS6 builds that causes crashing during running of the application.

This is a combination of code suggestions by myself and fixes by xezon.

This fix doesn't include other ASM changes seen in the Zero hour ASM change, this only resolves ASM that is causing crashes.

@xezon xezon changed the title [Gen] Replace asm that causes crashing in non VS6 builds [GEN] Replace asm that causes crashing in non VS6 builds Mar 25, 2025
@DevGeniusCode DevGeniusCode added Build Anything related to building, compiling Generals Related Generals only ThisProject This issue was introduced by this project Major Severity: Minor < Major < Critical < Blocker and removed ThisProject This issue was introduced by this project labels Mar 26, 2025
@Mauller Mauller force-pushed the fix-inline-asm-gen branch from 94384b9 to bbc3758 Compare March 27, 2025 19:01
@Mauller
Copy link
Author

Mauller commented Mar 28, 2025

Pushed update for this last night. Should be good to go now.

@Mauller Mauller requested a review from xezon March 29, 2025 07:54
@Mauller Mauller force-pushed the fix-inline-asm-gen branch from bbc3758 to 5fe44c1 Compare March 29, 2025 11:08
@xezon xezon changed the title [GEN] Replace asm that causes crashing in non VS6 builds [GEN] Replace inline assembler for non VS6 builds Mar 29, 2025
@Mauller Mauller force-pushed the fix-inline-asm-gen branch from 5fe44c1 to e3c3e39 Compare March 29, 2025 12:16
Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

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

There is still assembler code in mpu.cpp, lcw.cpp, wwprofile.cpp, wwdebug.h, PerfTimer.h. These things were solved in the ZH version of this change.

@Mauller Mauller force-pushed the fix-inline-asm-gen branch from e3c3e39 to 5cd45b7 Compare March 29, 2025 16:25
@Mauller Mauller requested a review from xezon March 29, 2025 16:28
@Mauller
Copy link
Author

Mauller commented Mar 29, 2025

Requested fixes ammended to the original commit and a new commit added with changes to the other ASM containing code.

There was far less ASM in the Generals code in the end compared to Zero hour.

@Mauller Mauller self-assigned this Mar 29, 2025
@Mauller Mauller force-pushed the fix-inline-asm-gen branch from 5cd45b7 to 960f50b Compare March 29, 2025 21:06
@Mauller Mauller force-pushed the fix-inline-asm-gen branch 2 times, most recently from 63350dc to b1adbfe Compare March 30, 2025 14:40
Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

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

There still is assembler in WWProfile_Get_Ticks, Calculate_Processor_Speed. Perhaps some of it can be resolved.

@Mauller Mauller force-pushed the fix-inline-asm-gen branch from b1adbfe to ea0bec3 Compare March 30, 2025 16:11
@Mauller
Copy link
Author

Mauller commented Mar 30, 2025

Updated cpu detection and profiling code to instead use MSVC intrinsic instructions.

@Mauller Mauller force-pushed the fix-inline-asm-gen branch 5 times, most recently from 6b5bfcf to ac1e264 Compare March 30, 2025 18:48
@Mauller
Copy link
Author

Mauller commented Mar 30, 2025

Fuel the JET!

@Mauller Mauller force-pushed the fix-inline-asm-gen branch from ac1e264 to bfdc034 Compare March 30, 2025 19:47
@xezon xezon added this to the Code foundation build up milestone Mar 31, 2025
@Mauller Mauller force-pushed the fix-inline-asm-gen branch from bfdc034 to 49e99e4 Compare March 31, 2025 21:20
@Mauller
Copy link
Author

Mauller commented Mar 31, 2025

updated to be in line with recent changes to ZH PR.

@xezon xezon added Critical Severity: Minor < Major < Critical < Blocker and removed Major Severity: Minor < Major < Critical < Blocker labels Apr 1, 2025
Mauller added 3 commits April 1, 2025 18:59
This replaces the inline ASM in non VS6 builds that causes crashing during running of the application.

This is a combination of code suggestions by myself and fixes by xezon.

This fix doesn't include other ASM changes seen in the Zero hour ASM change, this only resolves ASM that is causing crashes.
@Mauller Mauller force-pushed the fix-inline-asm-gen branch from 49e99e4 to b4ae0d2 Compare April 1, 2025 18:11
@xezon
Copy link

xezon commented Apr 1, 2025

Played a bit. Looks good.

@xezon xezon merged commit c115e91 into TheSuperHackers:main Apr 1, 2025
10 checks passed
@xezon xezon deleted the fix-inline-asm-gen branch April 1, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Anything related to building, compiling Critical Severity: Minor < Major < Critical < Blocker Generals Related Generals only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants