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

[CSKY] Don't emit __multi3 on 32-bit CSKY #69732

Closed
wants to merge 3 commits into from
Closed

Conversation

Dirreke
Copy link

@Dirreke Dirreke commented Oct 20, 2023

Fix #68971
According to #21245 , disable __multi3 and other buitin functions which are not available in 32-bit target.

@github-actions
Copy link

github-actions bot commented Oct 20, 2023

✅ With the latest revision this PR passed the C/C++ code formatter.

@Dirreke
Copy link
Author

Dirreke commented Oct 22, 2023

@rengolin @DimitryAndric
Could you review it because it's similar to #21245 ?

@DimitryAndric
Copy link
Collaborator

This should be fine, but it needs a test, similar to llvm/test/CodeGen/ARM/umulo-128-legalisation-lowering.ll. (I don't know much about CSKY, but I assume that test case can mostly be copied except for the generated assembly code.)

@Dirreke
Copy link
Author

Dirreke commented Oct 23, 2023

This should be fine, but it needs a test, similar to llvm/test/CodeGen/ARM/umulo-128-legalisation-lowering.ll. (I don't know much about CSKY, but I assume that test case can mostly be copied except for the generated assembly code.)

Thanks! After some tests, I think #68971 is different from #21245 . I can not simply disable UINTTOFP_I128_FXX like __multi3 easily.

When program call the u128 related builtin functions like __multi3 and __floattidf on CSKY, the value of the parameters will be passed to the function, but the function will regard it as an address. It result a SIGSEGV.

I have no idea about how to fix it. Do you have any advice?

@Dirreke Dirreke marked this pull request as draft October 23, 2023 10:54
@Dirreke
Copy link
Author

Dirreke commented Oct 25, 2023

there's nothing to do. It's error in codegen of rust. Thank all of you2

@Dirreke Dirreke closed this Oct 25, 2023
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.

[CSKY] segmentation fault in __multi3
2 participants