Skip to content

Improve SSE intrinsic support. - #6

Merged
OmniBlade merged 3 commits into
TheAssemblyArmada:masterfrom
OmniBlade:feature/intrin2
Sep 4, 2026
Merged

OmniBlade merged 3 commits into
TheAssemblyArmada:masterfrom
OmniBlade:feature/intrin2

Conversation

@OmniBlade

Copy link
Copy Markdown
Contributor

Corrects intrinsic use for lrint family to return correctly sized integer in all cases. This causes 32bit code to fall back to software conversion for 64bit returns as there is no intrinsic available.

Also adds intrinsic use for sqrt which according to the standard should give the same results as the software implementation.

Okladnoj added a commit to Okladnoj/GeneralsGameCode that referenced this pull request Sep 3, 2026
TheAssemblyArmada/GameMath#6 adds an SSE path to sqrt and corrects the
lrint family, and OmniBlade asked for it to be checked against the
software path ARM uses. The cast matrix answers that, but only if the
build fetches his branch, so the pin moves here for the duration of the
run and goes back to the TheSuperHackers tag afterwards.

The macOS half is already in: the dump built against this branch is byte
identical to the one on 59f7ccd, so the -ffp-contract=off he added for
clang moves nothing on ARM and math-mac-arm64-clang.txt stands as the
software reference. Nothing else could change there - the new sqrt sits
behind USE_SSE, which is x86 and x64 only, which is exactly why the
Windows half is the half that answers the question.
@OmniBlade
OmniBlade merged commit f82580a into TheAssemblyArmada:master Sep 4, 2026
20 checks passed
@OmniBlade
OmniBlade deleted the feature/intrin2 branch September 4, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant