[PATCH] D59046: [mips] Map SW instruction to its microMIPS R6 variant
Simon Atanasyan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 08:20:46 PDT 2019
atanasyan added a comment.
In D59046#1421451 <https://reviews.llvm.org/D59046#1421451>, @Petar.Avramovic wrote:
> SWSP instruction has the same encoding for both standard and r6 microMIPS (LOAD_STORE_SP_FM_MM16<0x32>).
> If we change SWSP_MM from ISA_MICROMIPS32_NOT_MIPS32R6 to ISA_MICROMIPS, SWSP_MM could be used for R6 <https://reviews.llvm.org/source/compiler-rt/> size reduction also.
> SWSP_MMR6 looks redundant?
There some other places in the code where we emit Mips::SW instruction and rely on mapping provided by **td** files. For example, expanding `ld` and `sd` macros in the `MipsAsmParser::expandLoadStoreDMacro`; expanding `.cprestore` in the `MipsTargetELFStreamer::emitDirectiveCpRestore`. Now LLVM generates incorrect code in these cases. As in the D59045 <https://reviews.llvm.org/D59045>, we can either use **td** mapping or addd `if (MicroMIPS)` statements. What approach is better? As to me, I prefer *td* because in that case we keep changes in one place.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59046/new/
https://reviews.llvm.org/D59046
More information about the llvm-commits
mailing list