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

[mono][jit] Revert parts of '[mono] Remove the support for non r4fp, its not used by any supported platforms. (#82005)' #84418

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

vargaz
Copy link
Contributor

@vargaz vargaz commented Apr 6, 2023

Some platforms don't support r4fp, so put back the general JIT support code. Force r4fp on platforms that support it.

Fixes #84401.

@ghost ghost assigned vargaz Apr 6, 2023
@vargaz vargaz force-pushed the r4fp-back branch 3 times, most recently from 627ebdc to 038c14a Compare April 6, 2023 13:56
@vargaz vargaz changed the title [mono][jit] Revert parts of 4fdb1f64188dea5807d8eb655fab9dbb0a7c9410. [mono][jit] Revert parts of '[mono] Remove the support for non r4fp, its not used by any supported platforms. (#82005)' Apr 6, 2023
…its not used by any supported platforms. (dotnet#82005)'

Some platforms don't support r4fp, so put back the general JIT support code.
Force r4fp on platforms that support it.

Fixes dotnet#84401.
@vargaz vargaz merged commit 15c253f into dotnet:main Apr 6, 2023
@vargaz vargaz deleted the r4fp-back branch April 6, 2023 21:03
@Xinlong-Wu
Copy link
Contributor

Noticed you have revert this patch. I'm wondering if it is because the architecture RISC-V64 uses code like cfg->r4fp ? If yes, I will submit a patch to re-implement floating point arithmetic for RISC-V.

I had to use cfg->r4fp before because the floating point numbers in the RISC-V architecture of previous Mono would treat single floating point as double floating point during register passing, so I had to rely on cfg->r4fp to do some special processing when loading floating point immediate numbers and floating point numbers in the stack, to converting them to double floating point numbers to avoid breaks the ABI of the RISC-V architecture.

Removing the parameter cfg->r4fp causes Mono to generate the correct IR for RISC-V, which actually fixes the problem exactly. So there is no longer any need to do some extra special handling to make the RISC-V code ugly if we remove cfg->r4fp completely.

I think this is necessary, so I will submit an implementation that does not use cfg->r4fp. Feel free to close or merge it )

@ghost ghost locked as resolved and limited conversation to collaborators May 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ppc64le] Common.Tests and more tests are failing for missing opcode 'rcompare' on Power.
3 participants