mfvrd and mffprd are both alias to mfvrsd.
This patch enables correct parsing of the aliases, but we still emit a mfvrsd.
Patch by nemanjai
Paths
| Differential D29177
[PowerPC][Altivec] Add mfvrd and mffprd extended mnemonic ClosedPublic Authored by nemanjai on Jan 26 2017, 6:33 AM.
Details Summary mfvrd and mffprd are both alias to mfvrsd. Patch by nemanjai
Diff Detail
Event TimelineComment Actions
@nemanjai can you help me with that? Comment Actions
I have a small test case written in C that is just a one-line asm statement, which currently yields an "unrecognized instruction mnemonic" error: asm ("mfvrd 3, 10\n\t"); , but I lack the knowledge to convert it down to .ll . Comment Actions
Here's an example of what this will do now (as opposed to emitting the error that Bruno posted): $ printf "mfvsrd 4, 34\nmfvrd 4, 2" | llvm-mc --show-encoding .text mfvsrd 4, 34 # encoding: [0x67,0x00,0x44,0x7c] mfvsrd 4, 34 # encoding: [0x67,0x00,0x44,0x7c] Comment Actions
Seems reasonable to me. Comment Actions We are looking into the most adequate way of including these alias. But we still need extended mnemonics for the lower half of the VSX regs as well. Comment Actions Provide both of the extended mnemonics for MFVSRD and add/update tests for them. Please note that changes to test case p8-scalar_vector_conversions.ll may seem unrelated, but the unoptimized IR (no mem2reg) produces different mnemonics in some cases and not others (i.e. depending on which source register is selected). This update just locks the parameter registers to what the calling convention says and thereby fixes the mnemonic choice. brunoalr retitled this revision from [PowerPC][Altivec] Add mfvrd extended mnemonic to [PowerPC][Altivec] Add mfvrd and mffprd extended mnemonic.Feb 1 2017, 4:00 AM brunoalr edited edge metadata. Comment Actions
No problem! It was you who wrote this patch after all :P Comment Actions
Hi there, @nemanjai! Thanks. This revision is now accepted and ready to land.Mar 13 2017, 2:02 PM Closed by commit rL297849: [PowerPC][Altivec] Add mfvrd and mffprd extended mnemonic (authored by nemanjai). · Explain WhyMar 15 2017, 9:17 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 91887 llvm/trunk/lib/Target/PowerPC/PPCInstrVSX.td
llvm/trunk/test/CodeGen/PowerPC/bitcasts-direct-move.ll
llvm/trunk/test/CodeGen/PowerPC/fp-int-conversions-direct-moves.ll
llvm/trunk/test/CodeGen/PowerPC/fp128-bitcast-after-operation.ll
llvm/trunk/test/CodeGen/PowerPC/p8-scalar_vector_conversions.ll
llvm/trunk/test/MC/Disassembler/PowerPC/vsx.txt
llvm/trunk/test/MC/PowerPC/vsx.s
|