OSDN Git Service

[MC] Use LShr for constant evaluation of ">>" on ELF/arm64--darwin.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Tue, 28 Apr 2015 01:37:11 +0000 (01:37 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Tue, 28 Apr 2015 01:37:11 +0000 (01:37 +0000)
commite1f835ab596a984f5d055ca98db375b72ddd7f14
tree19128f4f29cce2a64923e11a12f59f508544e4fa
parentfef483667f3c793d6aff81c69972549406e27ff6
[MC] Use LShr for constant evaluation of ">>" on ELF/arm64--darwin.

This matches other assemblers and is less unexpected (e.g. PR23227).
On ELF, I tried binutils gas v2.24 and nasm 2.10.09, and they both
agree on LShr.  On COFF, I couldn't get my hands on an assembler yet,
so don't change the behavior.  For now, don't change it on non-AArch64
Darwin either, as the other assembler is gas v1.38, which does an AShr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235963 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCAsmInfo.cpp
lib/MC/MCAsmInfoCOFF.cpp
lib/MC/MCAsmInfoDarwin.cpp
lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
test/MC/AArch64/expr-shr.s [new file with mode: 0644]
test/MC/ARM/bracket-exprs.s
test/MC/AsmParser/expr-shr.s [new file with mode: 0644]
test/MC/ELF/bracket-exprs.s