[llvm] MIPS: Support '%w' token in inline asm template for MSA (PR #91920)
Jessica Clarke via llvm-commits
llvm-commits at lists.llvm.org
Tue May 14 18:43:45 PDT 2024
================
@@ -565,12 +565,27 @@ bool MipsAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum,
}
break;
}
- case 'w':
- // Print MSA registers for the 'f' constraint
- // In LLVM, the 'w' modifier doesn't need to do anything.
- // We can just call printOperand as normal.
+ case 'w': {
+ // Support to use MSA instructions on FPR.
+ // double a, b, c;
+ // asm volatile ("fmadd.d %w0, %w1, %w2" : "+f"(a) : "f"(b), "f"(c))
----------------
jrtc27 wrote:
Clearly if you don't implement a feature that feature doesn't work. My point is that you don't need a C snippet to illustrate what is going on here, especially if you simplify the code as I suggested. Otherwise the backend would be full of random bits of C in comments.
https://github.com/llvm/llvm-project/pull/91920
More information about the llvm-commits
mailing list