[PATCH] D80028: [AArch64] Support expression results as immediate values in mov
Jian Cai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 26 10:17:27 PDT 2020
jcai19 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();
----------------
efriedma wrote:
> What happens when Shift isn't zero?
Thank you for the comments. And sorry for the delay, I was trying to look into the cases where the value of Shift is not zero. However, even gcc could not support mov instructions with shift operand.
$ cat foo.s
mov x0, 0x1, lsl 16
$ aarch64-linux-gnu-gcc -c foo.s
foo.s: Assembler messages:
foo.s:1: Error: unexpected characters following instruction at operand 2 -- `mov x0,0x1,lsl 16'
So far the only cases I found with non-zero Shift is during instruction matching stage, when different values of Shift are tried out, and that should not affect this code. Are there additional cases that would cause Shift to not be zero?
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