Skip to content

[cherry-pick] Fix MIPS FPU comparisons #124

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

overdrivenpotato
Copy link

This patch fixes FPU register moves/comparisons for MIPS1/2/3 targets. Currently, rustc by way of LLVM generates broken code for the mipsel-sony-psp target when using Rust-PSP. The LLVM patch goes over the details.

MIPS I, II, and III have delay slots for floating point
comparisons and floating point register transfers (mtc1, mfc1).
Currently, these are not taken into account and thus broken code
may be generated on these targets. This patch inserts nops
as necessary, while attempting to leave the current instruction
if it is safe to stay.

The tests in this patch were updated by @sajattack

Patch by @overdrivenpotato (Marko Mijalkovic <marko.mijalkovic97@gmail.com>)

Differential Revision: https://reviews.llvm.org/D115127
Copy link
Member

@cuviper cuviper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cuviper cuviper merged commit 8404254 into rust-lang:rustc/13.0-2021-09-30 Dec 8, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 13, 2021
Update LLVM submodule

Update LLVM submodule with recent cherry-picks. In particular:
 * rust-lang/llvm-project#123
 * rust-lang/llvm-project#124
vext01 pushed a commit to vext01/llvm-project that referenced this pull request Apr 3, 2024
Tweak successor lowering / filter out debug instructions from AOT IR.
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.

2 participants