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

Multiple Mono Mini Targets and Mono Interpreter missing support for float->nint casting. #46820

Closed
jkoritzinsky opened this issue Jan 11, 2021 · 1 comment · Fixed by #49427
Closed

Comments

@jkoritzinsky
Copy link
Member

Description

Mono's Mini JIT compiler on multiple platforms and the Mono Interpreter both lack support for casting a float value to a native int storage.

Configuration

  • .NET 6 master (found in PR)
  • Mono Interpreter
  • Mono Mini targeting Linux arm64
  • Based on a cursory look through source, also effects Mini targetting ARM32 and LLVM

Regression?

I don't believe so.

Other information

For the interpreter, this shows up as the following assert:

  • Assertion: should not be reached at /Users/runner/work/1/s/src/mono/mono/mini/interp/transform.c:5065

For JIT, this is the message that shows up. The assert initially fired from /__w/1/s/src/mono/mono/mini/mini-codegen.c:1251

"Opcode 'r4_conv_to_i' missing from machine description file."

Discovered in #46401 where a test casts a float value to the C# nint type.

@lambdageek
Copy link
Member

/cc @SamMonoRT

@SamMonoRT SamMonoRT added this to the 6.0.0 milestone Jan 12, 2021
@SamMonoRT SamMonoRT removed the untriaged New issue has not been triaged by the area owner label Jan 12, 2021
jkoritzinsky added a commit that referenced this issue Jan 12, 2021
* Implement managed side of CLong/CULong/NFloat.

* Make CLong, CULong, and NFloat intrinsically handled correctly by the JIT.

* Add framework tests for CLong, CULong, and NFloat.

* Add interop test of CLong to validate calling convention semantics.

* Update CULong.cs

* Fix implicit conversions.

* Fix overflow and equality test failures.

* Fix formatting.

* Fix formatting and add function header.

* Add doc comments.

* Don't throw on float out of range. Rename tests.

* Rewrite EqualsTest implementations more straightforward.

* Fix NFloat tests.

* Use .Equals instead of ==

* Use ToString directly instead of hard coding the expected value.

* Update the emitted assembly stub's thiscall retbuf support for x86 to account for the new native exchange types.

* Add sizeof tests.

* Add test with struct containing CLong.

* Disable ThisCallTest on Mono due to #46820

* validate type name.
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Mar 10, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Mar 10, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Apr 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants