[PATCH] D98916: [ARM] support symbolic expression as immediate in memory instructions
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 22 10:52:36 PDT 2021
MaskRay added inline comments.
================
Comment at: llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp:986
+ const MCOperand &MO1 = MI.getOperand(OpIdx + 1);
+ if (MO1.isImm())
+ isAdd = EncodeAddrModeOpValues(MI, OpIdx, Reg, Imm12, Fixups, STI);
----------------
Nit: https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements If you use braces for `else`, use braces for `then` as well.
================
Comment at: llvm/test/MC/ARM/arm-memory-instructions-immediate.s:1
+// RUN: llvm-mc -triple=armv7 -filetype=obj < %s | llvm-objdump --triple=armv7 -d - | FileCheck %s
+// RUN: not llvm-mc -triple=armv7 -filetype=obj --defsym=ERR=1 < %s -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s
----------------
You can omit ` < `
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98916/new/
https://reviews.llvm.org/D98916
More information about the llvm-commits
mailing list