[PATCH] D127195: [CodeEmitter] Fix encoding wide instructions on big-endian hosts
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 03:30:33 PDT 2022
foad added reviewers: jmolloy, myhsu, dsanders, 0x59616e.
foad added inline comments.
================
Comment at: llvm/utils/TableGen/CodeEmitterGen.cpp:488
<< " Scratch = Scratch.zext(" << BitWidth << ");\n"
- << " LoadIntFromMemory(Inst, (const uint8_t *)&InstBits[opcode * "
- << NumWords << "], " << NumBytes << ");\n"
+ << " Inst = APInt(" << BitWidth
+ << ", makeArrayRef(InstBits + opcode * " << NumWords << ", " << NumWords
----------------
This could conceivably slow things down by constructing a new APInt instead of modifying the existing one in-place, but I think it's more important to make sure it works correctly before addressing that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127195/new/
https://reviews.llvm.org/D127195
More information about the llvm-commits
mailing list