Changed the encoding of X86 floating point stack operations where both operands
authorKevin Enderby <enderby@apple.com>
Tue, 25 May 2010 20:52:34 +0000 (20:52 +0000)
committerKevin Enderby <enderby@apple.com>
Tue, 25 May 2010 20:52:34 +0000 (20:52 +0000)
commitcf50a5390c09325a7fc41640449205eced4363f6
tree9776ab8bf2e7958ae5c072cbaba7d095db5a1ab0
parent854f30d965c6dfabf5154a090beb27a67847a1fd
Changed the encoding of X86 floating point stack operations where both operands
are st(0).  These can be encoded using an opcode for storing in st(0) or using
an opcode for storing in st(i), where i can also be 0.  To allow testing with
the darwin assembler and get a matching binary the opcode for storing in st(0)
is now used.  To do this the same logical trick is use from the darwin assembler
in converting things like this:

fmul %st(0), %st

into this:

fmul %st(0)

by looking for the second operand being X86::ST0 for specific floating point
mnemonics then removing the second X86::ST0 operand.  This also has the add
benefit to allow things like:

fmul %st(1), %st

that llvm-mc did not assemble.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104634 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/AsmParser/X86AsmParser.cpp
test/MC/AsmParser/X86/x86_32-new-encoder.s