[llvm-dev] Bug in X86 assembler?
Jun Koi via llvm-dev
llvm-dev at lists.llvm.org
Thu Feb 18 08:50:47 PST 2016
On Thu, Feb 18, 2016 at 11:08 PM, Tim Northover <t.p.northover at gmail.com>
> On 18 February 2016 at 04:27, Tamazov, Artem via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > Even in your example, assembler replaces mov by movq, which, say, hints:
> This is the difference between AT&T and Intel syntax (give llvm-mc the
> -output-asm-variant=1 option to see what something closer to what's
> been input).
> The x86 reference manual really does seem to list the 64-bit immediate
> move with mnemonic MOV. I'm not sure why GAS chose movabs, but this
> probably is a bug in our Intel syntax support.
Yes, this is confused because different assembler takes different input.
For example, nasm accepts "mov" - but rejects "movabs", while LLVM only
accepts "movabs" (Intel syntax) in this case.
So this command will work for LLVM. Should we fix it so it works with
"mov", according to Intel manual?
$ echo "movabs r8, 0x12345678"|./bin/llvm-mc -assemble -show-encoding
-x86-asm-syntax=intel -print-imm-hex -triple=x86_64
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev