Inline asm in HQ#X prevents compiling in 64bit

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
Edward850
Posts: 63
Joined: Fri Mar 20, 2009 21:48

Inline asm in HQ#X prevents compiling in 64bit

Post by Edward850 »

For whatever reason, the hq2/3/4x filters a filled with inline assembler functions. Inline assembler, however, cannot be used in 64bit, so something about these functions needs to change.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Inline asm in HQ#X prevents compiling in 64bit

Post by Graf Zahl »

That code must be disabled for 64 bit, I thought this had already been set up in the code, as it worked in older builds.

You can see that there are two sets of HQnX, the other one being plain C++. The assembly version was brought back because it creates far superior results.
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Inline asm in HQ#X prevents compiling in 64bit

Post by _mental_ »

I implemented the same hqnx as assembly version by using MMX intrinsics.
There was an intention to enable this scaler for compilers without Microsoft inline assemble support. But this should help for x64 Windows build too.
Let me know if you are interested in it. I'm asking, because it's not a big deal to make a pull request with just code. Although CMake changes might take some time, as I am using this implementation to build for OS X only via custom Xcode project.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Inline asm in HQ#X prevents compiling in 64bit

Post by Graf Zahl »

If it's the same algorithm but gets rid of the inline assembly, I'd gladly take it.
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Inline asm in HQ#X prevents compiling in 64bit

Post by _mental_ »

I just did a quick test. Sad but Microsoft removed MMX intrisics in x64 for some reason. 32-bit build is OK.
Actually, code compiles just fine for 64-bit. But all intrinsics are treated as regular functions, leading to unresolved errors during linking.
Looks like the same algorithm needs to be rewritten using SSE2. Surely this will take some time.
Locked

Return to “Closed Bugs”