Bob Wilson
d5673d9f1f
Speculatively revert this to see if it fixes buildbot failures.
...
--- Reverse-merging r99440 into '.':
U test/MC/AsmParser/X86/x86_32-bit_cat.s
U test/MC/AsmParser/X86/x86_32-encoding.s
U include/llvm/IntrinsicsX86.td
U include/llvm/CodeGen/SelectionDAGNodes.h
U lib/Target/X86/X86InstrSSE.td
U lib/Target/X86/X86ISelLowering.h
llvm-svn: 99450
2010-03-24 23:26:29 +00:00
Kevin Enderby
9cab7fdb12
Added the Advanced Encryption Standard (AES) Instructions.
...
llvm-svn: 99440
2010-03-24 22:33:33 +00:00
Kevin Enderby
8d8cb5c491
Fixed the SS42AI template for the SSE 4.2 instructions with TA prefix so it does
...
not get an "Unknown immediate size" assert failure when used. All instructions
of this form have an 8-bit immediate. Also added a test case of an example
instruction that is of this form.
llvm-svn: 99435
2010-03-24 22:28:42 +00:00
Daniel Dunbar
3e9483dbd9
MC/Mach-O: Remove Darwin host specific tests, we don't need them anymore.
...
llvm-svn: 99100
2010-03-20 22:36:32 +00:00
Daniel Dunbar
97cf61ad35
MC/Mach-O: Tweak optimal_nop test to be host independent.
...
- This also avoids us running valgrind on /usr/bin/as, which has leaks. :)
llvm-svn: 99099
2010-03-20 22:36:29 +00:00
Kevin Enderby
766909ae3b
Fixed the encoding problems of the crc32 instructions. All had the Operand size
...
override prefix and only the r/m16 forms should have had that. Also for variant
one, the AT&T syntax, added suffixes to all forms. Also added the missing
64-bit form for 'CRC32 r64, r/m8'. Plus added test cases for all forms and
tweaked one test case to add the needed suffixes.
llvm-svn: 98980
2010-03-19 20:04:42 +00:00
Daniel Dunbar
3c66c7a3c1
MC/Mach-O/x86_64: Add relocation support.
...
- This is "extraordinarily" Darwin 'as' compatible. See the litany of FIXMEs littered about for more information.
- There are a few cases which seem to clearly be 'as' bugs which I have left unsupported, and there is one cases where we diverge but should fix if it blocks diffing .o files (Darwin 'as' ends up widening a jump unnecessarily).
- 403.gcc build, runs, and diffs equivalently to the 'as' built version now (using llvm-mc). However, it builds so slowly that I wouldn't recommend trying it quite yet. :)
llvm-svn: 98974
2010-03-19 18:07:55 +00:00
Daniel Dunbar
f803121396
MC/X86: Rename alternate spellings of {ADD64,CMP64} and mark as "code gen only" so they don't get selected by the asm matcher.
...
llvm-svn: 98972
2010-03-19 18:07:48 +00:00
Daniel Dunbar
f8e4be91ff
MC/Mach-O: Factor out isScatteredFixupFullyResolvedSimple predicate, and fix some corner cases.
...
llvm-svn: 98924
2010-03-19 03:18:12 +00:00
Daniel Dunbar
3ef39d497f
X86: Fix encoding for TEST64rr.
...
llvm-svn: 98919
2010-03-19 01:15:03 +00:00
Daniel Dunbar
1a50b05aff
X86MCCodeEmitter: Fix two minor issues with reloc_riprel_4byte_movq_load, we
...
were missing it on some movq instructions and were not including the appropriate
PCrel bias.
llvm-svn: 98880
2010-03-18 21:53:54 +00:00
Daniel Dunbar
ab14df376a
MC/X86/AsmMatcher: Use the new instruction cleanup routine to implement a
...
temporary workaround for matching inc/dec on x86_64 to the correct instruction.
- This hack will eventually be replaced with a robust mechanism for handling
matching instructions based on the available target features.
llvm-svn: 98858
2010-03-18 20:06:02 +00:00
Chris Lattner
bf3e096258
fix an x86-64 encoding bug Daniel found.
...
llvm-svn: 98855
2010-03-18 20:04:36 +00:00
Chris Lattner
45ab55ccec
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
Daniel Dunbar
476b525e01
MC/Mach-O/x86_64: Temporary labels in cstring sections require symbols (and external relocations, but we don't have x86_64 relocations yet).
...
llvm-svn: 98583
2010-03-15 21:56:50 +00:00
Chris Lattner
c90ed01cf3
xfail properly
...
llvm-svn: 98479
2010-03-14 07:55:34 +00:00
Chris Lattner
3e251f1db0
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
a6526284f4
X86: Fix ADD64i32 encoding.
...
llvm-svn: 98457
2010-03-13 22:49:39 +00:00
Daniel Dunbar
eb158a88db
MC/X86_64: Symbol support.
...
llvm-svn: 98456
2010-03-13 22:49:35 +00:00
Daniel Dunbar
fec15da5d7
MC/Mach-O: Initial x86_64 support.
...
llvm-svn: 98454
2010-03-13 22:10:17 +00:00
Daniel Dunbar
6d5fa0c9d6
MC/X86_64: Fix matching of leaq.
...
llvm-svn: 98444
2010-03-13 19:31:44 +00:00
Daniel Dunbar
de2f4ae158
MC/X86_64: Fix matching of callq.
...
llvm-svn: 98443
2010-03-13 19:31:38 +00:00
Daniel Dunbar
e8b67adb94
MC/Mach-O: PCrel relocations weren't using the right base address, they are
...
relative to the fragment address, not its offset. This was masked by the text
section normally being at address 0.
llvm-svn: 98420
2010-03-13 02:38:00 +00:00
Daniel Dunbar
9ffe22ec23
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
3eab04b641
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
8ad9589475
MC/Mach-O: Implement initial support for relaxation.
...
- The implementation is currently very brain dead and inefficient, but I have a
clear plan on how to fix it.
- The good news is, it works and correctly assembles 403.gcc (when built with
Clang, at '-Os', '-Os -g', and '-O3'). Even better, at '-Os' and '-Os -g',
the resulting binary is exactly equivalent to that when built with the system
assembler. So it probably works! :)
llvm-svn: 98396
2010-03-12 22:07:14 +00:00
Daniel Dunbar
ee26fc9e9f
MC/Mach-O: Implement "absolutizing" semantics of .set, by evaluating the assembly time value of variables.
...
llvm-svn: 98241
2010-03-11 05:53:37 +00:00
Daniel Dunbar
14b4e621b0
MC/Mach-O: Use the SECTDIFF relocation type for (A - B + constant) where A is external.
...
- I'm not sure why, but this is what 'as' does.
llvm-svn: 98115
2010-03-10 00:58:25 +00:00
Daniel Dunbar
0bc3059b94
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
d92e9bc7c1
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
f33a8c5ab6
MC/Mach-O: For PCrel relocations, we need to compensate for the PCrel adjustment when determining if we need a scattered relocation.
...
llvm-svn: 98082
2010-03-09 21:27:58 +00:00
Kevin Enderby
23e37f3e39
Fix the vmxon entry in the X86InstrInfo.td so it has the correct prefix bytes
...
for the encoding and is not the same as vmptrld.
llvm-svn: 97992
2010-03-08 22:17:26 +00:00
Daniel Dunbar
42f1b1b255
MC/Macho-O: Align the zerofill section itself to the maximum alignment.
...
llvm-svn: 97991
2010-03-08 22:03:42 +00:00
Daniel Dunbar
3292ad448b
MC/Mach-O: Fix address compution for zero fill sections.
...
llvm-svn: 97984
2010-03-08 21:10:42 +00:00
Daniel Dunbar
66c79cf44d
X86: Fix encoding for TEST{8,16,32}rr.
...
llvm-svn: 97982
2010-03-08 21:10:36 +00:00
Kevin Enderby
11cce486ac
This is a patch to the assembler frontend to detect when aligning a text
...
section with TextAlignFillValue and calls EmitCodeAlignment() instead of
calling EmitValueToAlignment(). This allows x86 assembly code to be aligned
with optimal nops.
llvm-svn: 97158
2010-02-25 18:46:04 +00:00
Chris Lattner
b29b154904
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
8530ba626c
add encoder support and tests for rdtscp
...
llvm-svn: 96076
2010-02-13 03:42:24 +00:00
Daniel Dunbar
09733841aa
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
d4fe983f23
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
5b01ab848c
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
4ef0be5df5
MC/X86: Push immediate operands as immediates not expressions when possible.
...
llvm-svn: 96055
2010-02-13 00:17:21 +00:00
Chris Lattner
c80a6de0a9
add some disassemble testcases for weird instructions
...
llvm-svn: 96045
2010-02-12 23:46:48 +00:00
Chris Lattner
4170bb81da
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
9307e00dc0
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
b1094f1489
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
3763f70025
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
b20be19ae6
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
7f6e51fc2a
XFAIL this on linux until I figure out what is happening.
...
llvm-svn: 95804
2010-02-10 21:01:04 +00:00
Kevin Enderby
9be8c4c590
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