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
Differential D29177
[PowerPC][Altivec] Add mfvrd and mffprd extended mnemonic nemanjai on Jan 26 2017, 6:33 AM. Authored by
Details mfvrd and mffprd are both alias to mfvrsd. Patch by nemanjai
Diff Detail
Event TimelineComment 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 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. Comment Actions No problem! It was you who wrote this patch after all :P Comment Actions Hi there, @nemanjai! Thanks. |