[PATCH] D80028: [AArch64] Support expression results as immediate values in mov
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 19 13:10:47 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp:974
+ const MCExpr *E = dyn_cast<MCExpr>(getImm());
+ if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(E)) {
+ uint64_t Value = CE->getValue();
----------------
What happens when Shift isn't zero?
================
Comment at: llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp:1785
+ addExpr(Inst, getImm());
+ Inst.addOperand(MCOperand::createImm(0));
+ }
----------------
Why are we adding two operands here?
================
Comment at: llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp:250
AArch64MCExpr::VariantKind RefKind =
static_cast<AArch64MCExpr::VariantKind>(Target.getRefKind());
+ if (!RefKind) {
----------------
I'd prefer to explicitly compute a RefKind here, as opposed to inferring that a null RefKind has some specific meaning.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80028/new/
https://reviews.llvm.org/D80028
More information about the llvm-commits
mailing list