Chris Lattner
b3f659c8c8
fix an x86-64 encoding bug Daniel found.
...
llvm-svn: 98855
2010-03-18 20:04:36 +00:00
Chris Lattner
a3a66b28b6
add a special relocation type for movq loads for object
...
files that produce special relocation types where the
linker changes movq's into lea's.
llvm-svn: 98839
2010-03-18 18:10:56 +00:00
Chris Lattner
1e2dc539b9
xfail these tests temporarily to get teh buildbots back to happy land.
...
llvm-svn: 98476
2010-03-14 07:32:48 +00:00
Daniel Dunbar
d324a7c990
X86: Fix ADD64i32 encoding.
...
llvm-svn: 98457
2010-03-13 22:49:39 +00:00
Daniel Dunbar
906a432031
MC/X86_64: Fix matching of leaq.
...
llvm-svn: 98444
2010-03-13 19:31:44 +00:00
Daniel Dunbar
e60c883bf4
MC/X86_64: Fix matching of callq.
...
llvm-svn: 98443
2010-03-13 19:31:38 +00:00
Daniel Dunbar
18fc344290
MC/X86: Add temporary hack to match shrl $1,%eax correctly, to support testing
...
other functionality on 403.gcc compiled at -O0.
llvm-svn: 98405
2010-03-13 00:47:29 +00:00
Daniel Dunbar
b86672059e
MC/X86: Add an XFAIL test where we aren't matching the correct instruction
...
because we don't understand how the specific instruction is doing sign
extension.
llvm-svn: 98404
2010-03-13 00:47:25 +00:00
Daniel Dunbar
b70c2f795e
MC/X86: Rename alternate spellings of ADD{8,16,32} and mark as "code gen only" so they don't get selected by the asm matcher.
...
llvm-svn: 98098
2010-03-09 22:50:46 +00:00
Daniel Dunbar
f5b6a1118d
MC/X86: Rename alternate spellings of CMP{8,16,32} and mark as "code gen only" so they don't get selected by the asm matcher.
...
llvm-svn: 98097
2010-03-09 22:50:40 +00:00
Daniel Dunbar
b59f7734b9
X86: Fix encoding for TEST{8,16,32}rr.
...
llvm-svn: 97982
2010-03-08 21:10:36 +00:00
Chris Lattner
4964ef88c2
make pcrel immediate values relative to the start of the field,
...
not the end of the field, fixing rdar://7651978
llvm-svn: 96330
2010-02-16 05:03:17 +00:00
Chris Lattner
f83726f6ba
add encoder support and tests for rdtscp
...
llvm-svn: 96076
2010-02-13 03:42:24 +00:00
Daniel Dunbar
d0c6d361fe
MC/AsmParser: Attempt to constant fold expressions up-front. This ensures we avoid fixups for obvious cases like '-(16)'.
...
llvm-svn: 96064
2010-02-13 01:28:07 +00:00
Chris Lattner
509154e0f9
rip out the 'heinous' x86 MCCodeEmitter implementation.
...
We still have the templated X86 JIT emitter, *and* the
almost-copy in X86InstrInfo for getting instruction sizes.
llvm-svn: 96059
2010-02-13 00:49:29 +00:00
Chris Lattner
140caa7240
remove special cases for vmlaunch, vmresume, vmxoff, and swapgs
...
fix swapgs to be spelled right.
llvm-svn: 96058
2010-02-13 00:41:14 +00:00
Daniel Dunbar
224340cabe
MC/X86: Push immediate operands as immediates not expressions when possible.
...
llvm-svn: 96055
2010-02-13 00:17:21 +00:00
Chris Lattner
1e827fd8ca
implement the rest of correct x86-64 encoder support for
...
rip-relative addresses, and add a testcase.
llvm-svn: 96040
2010-02-12 23:24:09 +00:00
Chris Lattner
1572e760bc
fix the encodings of monitor and mwait, which were completely
...
busted in both encoders. I'm not bothering to fix it in the
old one at this point.
llvm-svn: 95947
2010-02-12 01:06:22 +00:00
Kevin Enderby
37993197bf
Remove the few # TAILCALL comments that snuck in. As they may fail on linux.
...
llvm-svn: 95827
2010-02-11 00:18:12 +00:00
Kevin Enderby
cfd0e5a15e
Update the X86 assembler matcher test case now that a few more things match
...
with some of the recent changes that have gone into llvm-mc.
llvm-svn: 95826
2010-02-11 00:13:43 +00:00
Daniel Dunbar
3e0c9790f2
MC/X86 AsmMatcher: Fix a use after free spotted by d0k, and de-XFAIL
...
x86_32-encoding.s in on expectation of it passing.
llvm-svn: 95806
2010-02-10 21:19:28 +00:00
Daniel Dunbar
df11958895
XFAIL this on linux until I figure out what is happening.
...
llvm-svn: 95804
2010-02-10 21:01:04 +00:00
Kevin Enderby
cc152d6159
Replace this file containing 4 tests of x86 32-bit encodings with a file
...
containing the subset of the full auto generated test case that currently
encodes correctly. Again it is useful as we bring up the the new encoder
to make sure currently working stuff stays working.
llvm-svn: 95791
2010-02-10 19:13:56 +00:00
Kevin Enderby
a7c1d6cfd1
Fix the encoding of the movntdqa X86 instruction. It was missing the 0x66
...
prefix which is part of the opcode encoding.
llvm-svn: 95729
2010-02-10 00:10:31 +00:00
Chris Lattner
0c3b66cd87
fix X86 encoder to output [disp] only addresses with no SIB byte
...
in X86-32 mode. This is still required in x86-64 mode to avoid
forming [disp+rip] encoding. Rewrite the SIB byte decision logic
to be actually understandable.
llvm-svn: 95693
2010-02-09 21:47:19 +00:00
Chris Lattner
d00faaa9c7
Implement x86 asm parsing support for %st and %st(4)
...
llvm-svn: 95634
2010-02-09 00:49:22 +00:00
Chris Lattner
9d624778a3
fix incorrect encoding of SBB8mi that Kevin noticed.
...
llvm-svn: 95448
2010-02-05 22:56:11 +00:00
Chris Lattner
d91f302a05
fix a case where we'd mis-encode fisttp because of an incorrect (and
...
redundant with a correct one) pattern that was added for the disassembler.
llvm-svn: 95446
2010-02-05 22:49:06 +00:00
Chris Lattner
d2e879a012
remove fixme
...
llvm-svn: 95444
2010-02-05 22:46:46 +00:00
Kevin Enderby
00f1e6c030
Added support for X86 instruction prefixes so llvm-mc can assemble them. The
...
Lock prefix, Repeat string operation prefixes and the Segment override prefixes.
Also added versions of the move string and store string instructions without the
repeat prefixes to X86InstrInfo.td. And finally marked the rep versions of
move/store string records in X86InstrInfo.td as isCodeGenOnly = 1 so tblgen is
happy building the disassembler files.
llvm-svn: 95252
2010-02-03 21:04:42 +00:00
Daniel Dunbar
bdbffbedf0
AsmParser/X86: Add temporary hack to allow parsing "sal". Eventually we need
...
some mechanism for specifying alternative syntaxes, but I'm not sure what form
that should take yet.
llvm-svn: 95158
2010-02-02 23:46:47 +00:00
Chris Lattner
73051044fd
remove the # TAILCALL markers, which was causing the to fail.
...
It's unclear if the matcher is nondeterminstic of what here,
but I'm getting matches without TAILCALL and some other hosts
are getting matches with it.
llvm-svn: 95149
2010-02-02 22:36:29 +00:00
Chris Lattner
de9b3ada5d
this apparently depends on the host somehow.
...
llvm-svn: 95122
2010-02-02 20:57:28 +00:00
Chris Lattner
2481509162
disable this test for now.
...
llvm-svn: 95120
2010-02-02 20:41:39 +00:00
Kevin Enderby
db32c4567b
Added another version of the X86 assembler matcher test case.
...
This test case is different subset of the full auto generated test case, and a
larger subset that is in x86_32-bit.s (that set will encode correctly). These
instructions can pass though llvm-mc as it were a logical cat(1) and then
reassemble to the same instruction. It is useful as we bring up the parser and
matcher so we don't break things that currently work.
llvm-svn: 95107
2010-02-02 19:05:57 +00:00
Daniel Dunbar
76e5d70c57
MC/X86 AsmParser: Handle absolute memory operands correctly. We were doing
...
something totally broken and parsing them as immediates, but the .td file also
had the wrong match class so things sortof worked. Except, that is, that we
would parse
movl $0, %eax
as
movl 0, %eax
Feel free to guess how well that worked.
llvm-svn: 94869
2010-01-30 01:02:48 +00:00
Daniel Dunbar
7f0421eebb
MC/X86: Add a nice X86 assembler matcher test case from Kevin Enderby.
...
- This test case is auto generated, and has been verified to round-trip
correctly through llvm-mc by checking the assembled .o file before and after
piping through llvm-mc. It will be extended over time as the matcher grows
support for more instructions.
llvm-svn: 94857
2010-01-29 23:32:40 +00:00
Daniel Dunbar
862023fcb2
Mark EH_RETURN64 as CodeGenOnly.
...
llvm-svn: 94205
2010-01-22 20:16:37 +00:00
Daniel Dunbar
c05f9a60d9
Move ARM and X86 specific AsmParser tests into separate subdirectories, and only
...
run if appropriate target is supported.
llvm-svn: 82419
2009-09-21 00:05:30 +00:00