[llvm] [ARM] Add reference to `ARMAsmParser` in `ARMOperand` (PR #86110)
Alfie Richards via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 04:46:11 PDT 2024
================
@@ -3378,7 +3387,21 @@ class ARMOperand : public MCParsedAsmOperand {
void addVecListOperands(MCInst &Inst, unsigned N) const {
assert(N == 1 && "Invalid number of operands!");
- Inst.addOperand(MCOperand::createReg(VectorList.RegNum));
+
+ if (isAnyVectorList())
+ Inst.addOperand(MCOperand::createReg(VectorList.RegNum));
+ else if (isDReg() && !Parser->hasMVE()) {
+ Inst.addOperand(MCOperand::createReg(Reg.RegNum));
+ } else if (isQReg() && !Parser->hasMVE()) {
+ auto DPair = Parser->getDRegFromQReg(Reg.RegNum);
+ DPair = Parser->getMRI()->getMatchingSuperReg(
+ DPair, ARM::dsub_0, &ARMMCRegisterClasses[ARM::DPairRegClassID]);
+ Inst.addOperand(MCOperand::createReg(DPair));
----------------
AlfieRichardsArm wrote:
For this code https://github.com/llvm/llvm-project/pull/83436#discussion_r1514421363 is somewhat helpful context if you are curious
https://github.com/llvm/llvm-project/pull/86110
More information about the llvm-commits
mailing list