-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Have mono handle ConvertToIntegerNative for Double and Single #112206
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
Conversation
93fb02f
to
87d57e2
Compare
87d57e2
to
8bf0780
Compare
case MONO_TYPE_I2: | ||
opcode = OP_FCONV_TO_I2; | ||
break; | ||
#if TARGET_SIZEOF_VOID_P == 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: in other places we use SIZEOF_REGISTER for these kinds of checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it varies based on a file, e.g., in simd-intrinsics.c
, the TARGET_SIZEOF_VOID_P
looks to be the dominant way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah its mixed, in this file SIZEOF_REGISTER seems to dominate. An interesting observation is that we have some code like this:
#if (SIZEOF_REGISTER > TARGET_SIZEOF_VOID_P) && (G_BYTE_ORDER == G_BIG_ENDIAN)
and we have this comment in mono-machine.h
SIZEOF_REGISTER is usually the same as TARGET_SIZEOF_VOID_P, except when MONO_ARCH_ILP32 is defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conversions care about the size of a pointer, not the size of the register; hence why this one was selected. It matches how other code paths, such as method-to-ir
, typically deal with MONO_TYPE_I
.
Little curious if this should still be excluded on Mono (same for double), ConvertToIntegerNative ? For direct calls we would optimize calls using the new intrinsic implemented by this PR, but I would assume that indirect calls might end up in this implementation on Mono as well. |
Looks like this needs to explicitly add support to Mono Interpreter as well. |
c5e3af0
to
5fba9bf
Compare
5fba9bf
to
c0d450e
Compare
a90f670
to
4a263b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interp parts LGTM, less certain about mini
Cc. @BrzVlad for the mono mini side |
* main: Code clean up in AP for NonNull* (dotnet#112027) JIT: Invalidate LSRA's DFS tree if we aren't running new layout phase (dotnet#112364) Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250204.2 (dotnet#112339) Add doc on OS onboarding (dotnet#112026) Add `TypeName` APIs to simplify metadata lookup. (dotnet#111598) Internal monitor impl not using coop mutex causing deadlocks on Android. (dotnet#112358) Do not run NAOT arm64 OSX testing on all PRs (dotnet#112342) Special-case empty enumerables in AsyncEnumerable (dotnet#112321) Have mono handle ConvertToIntegerNative for Double and Single (dotnet#112206) Update dependencies from https://github.com/dotnet/arcade build 20250206.4 (dotnet#112338) System.Configuration.ConfigurationManager.Tests: use Assembly.Location to determine ThisApplicationPath. (dotnet#112231) Force write of local file header when "version needed to extract" changes (dotnet#112032) JIT: Don't reorder handler blocks (dotnet#112292) [RISC-V] Synthesize some floating constants inline (dotnet#111529) Enable `SA1000`: Spacing around keywords (dotnet#112302) Fix relocs for linux-riscv64 AOT (dotnet#112331)
Thank you @tannergooding for the fix. The regressions got resolved |
This should resolve dotnet/perf-autofiling-issues#49586