[MC] Requiring MCAsmInfo for MCExpr evaluation?
ahmed.bougacha at gmail.com
Wed Apr 22 17:49:53 PDT 2015
On Wed, Apr 22, 2015 at 2:43 PM, Rafael Espíndola
<rafael.espindola at gmail.com> wrote:
> Looks like we have to store more information in the expressions
> themselves. Would changing
> Lhr, ///< Shift right (arithmetic or logical, depending on target)
> Lshr, ///< Logical shift right
> Ashr, ///< Arithmetic shift right
> solve the problem?
Yup, how about the attached patch?
I tried binutils v2.24 aarch64-linux-gnu-as, and it has the same
behavior. On Darwin, the only AArch64 assembler is LLVM, and the
previous behavior was wrong, so the change is fine.
We'll see about other targets. I looked at the assemblers I had lying
around (ARM, AArch64, X86; darwin, linux) and AFAIK, only ancient GAS
(I tried the last Apple-bundled one, v1.38) does the AShr.
Notably, binutils v2.24 for arm-linux-gnueabihf and x86_64-linux-gnu
both do the LShr. So it's probably fine to do the switch there too,
at the very least?
Are there even targets where AShr is the intended behavior, and not
some 20yo GAS bug?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8060 bytes
Desc: not available
More information about the llvm-commits