Commit Graph

546 Commits

Author SHA1 Message Date
Bill Wendling
6932643a37 Add encodings for VNEG and VSQRT. Also add encodings for VMOV, but not a test
just yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116386 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 01:17:33 +00:00
Bill Wendling
54908dd72b Add encodings for VCVT instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116385 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 00:56:35 +00:00
Jim Grosbach
89c898f8af Add ARM encoding information for comparisons, forced-cc-out arithmetics, and
arithmetic-with-carry-in instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116384 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 00:50:27 +00:00
Bill Wendling
1fc6d8837f Add VCMPZ and VABS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116383 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 00:38:07 +00:00
Bill Wendling
cd77686254 Refactor VCMP instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116379 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 00:04:29 +00:00
Bill Wendling
5a1fd8cf68 Add encodings for VNMUL[SD].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116375 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 23:47:37 +00:00
Bill Wendling
caa3d467ab Add encodings for VDIV and VMUL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116370 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 23:22:27 +00:00
Jim Grosbach
c14b80f6d3 Be nitpicky and line up the comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116365 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 23:14:03 +00:00
Bill Wendling
dd3bc112e6 Add encoding for VSUB and VCMP.
Fear not! I'm going to try a refactoring right now. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116359 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 22:55:35 +00:00
Bill Wendling
6e8bf26342 Don't need to specify calling convention. Add 'readnone' to functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116354 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 22:24:10 +00:00
Bill Wendling
174777bb2b Encoding for VADDD. Plus a test for the VFP instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116348 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 22:08:41 +00:00
Jim Grosbach
0de6ab3c43 Add encoding information for the remainder of the generic arithmetic
ARM instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116313 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 17:11:26 +00:00
Jim Grosbach
42fac8ee3b MC machine encoding for simple aritmetic instructions that use a shifted
register operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116259 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 23:16:21 +00:00
Michael J. Spencer
28ca86aa19 MC-COFF: Fix .bss section size. Fixes PR8335. Patch by NAKAMUTA Takumi!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-09 16:04:45 +00:00
Michael J. Spencer
192d136750 MC-COFF: Implement InitSections. Fixes PR8335.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116151 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-09 15:44:27 +00:00
Michael J. Spencer
7d4900416a MC-COFF: Add COFFAsmParser. Completes PR8343.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116150 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-09 11:01:07 +00:00
Jim Grosbach
56ac907c57 Implement a few more binary encoding bits. Still very early stage proof-of-
concept level stuff at this point, but it is generally working for those
instructions that know how to map the operands.

This patch fills in the register operands for add/sub/or/etc instructions
and adds the conditional execution predicate encoding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116112 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 21:45:55 +00:00
Rafael Espindola
ff9dfedd10 Call InitSections in llc and clang so that the binaries produced by them
are easier to diff with those produced by llvm-mc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116095 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 19:37:38 +00:00
Jim Grosbach
0f448b5bf6 Add test file for simple ARM binary encodings with MC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116024 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 00:47:59 +00:00
Michael J. Spencer
adab850daa MC-COFF: Add test for my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116015 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 00:00:28 +00:00
Michael J. Spencer
b5814a3c15 MC-COFF: Fix symbol aliases. Fixes PR8251.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115909 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 06:29:33 +00:00
Rafael Espindola
152c1061e0 Get binding and visibility info from the the alias, but Type from the symbol
being aliased.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115836 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06 21:02:29 +00:00
Rafael Espindola
153666c038 If a symbol is global, reloc against it even if it is in a mergeable section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115817 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06 19:27:21 +00:00
Rafael Espindola
3223f19ff0 Make sure weak symbols are listed after the local ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115795 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06 16:47:31 +00:00
Rafael Espindola
8cecf253e4 Correctly handle GOTPCREL relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115793 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06 16:23:36 +00:00
Rafael Espindola
3729d0052b Use a relocation against the symbol if it is a PLT and the symbol is in another
section. Common because of linkonce sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115718 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 23:57:26 +00:00
Rafael Espindola
01f9ea35a7 Implement more alias cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 22:26:43 +00:00
Chris Lattner
508fc4708b Replace a gross hack (the MOV64ri_alt instruction) with a slightly less
gross hack (having the asmmatcher handle the alias).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 21:09:45 +00:00
Rafael Espindola
62fed8bd38 Don't crash in a strange .size directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115684 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 21:02:45 +00:00
Michael J. Spencer
eb6e77f8cc MC-COFF: Fix (PR8278) temporary symbol relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115656 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 19:48:03 +00:00
Rafael Espindola
e452b17130 Add support for a fill value in the .zero directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115655 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 19:42:57 +00:00
Rafael Espindola
737cd213e3 Implement a simple alias case and refactor the code a bit so that the
isInSymtab and isLocal logic in the two loops don't get easily out of sync.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115643 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 18:01:23 +00:00
Michael J. Spencer
a25c0a4283 test/COFF: Fix symbol indexes and names. Update tests to match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 17:57:08 +00:00
Michael J. Spencer
f191d120b1 test/COFF: Remove temp file usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115641 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 17:56:56 +00:00
Michael J. Spencer
cc1f91c833 Cleanup Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 17:56:37 +00:00
Rafael Espindola
5c77c16f31 Produce a undefined reference to _GLOBAL_OFFSET_TABLE_ when needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115623 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 15:48:37 +00:00
Rafael Espindola
266a69f375 Tests that now pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115622 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 15:43:32 +00:00
Sean Callanan
90371ad165 Added a testcase for the ENTER instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115580 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 00:21:40 +00:00
Rafael Espindola
607d1f6d32 Implement ELF::R_X86_64_GOTPCREL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115547 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-04 19:51:39 +00:00
Rafael Espindola
92bf6684f6 Produce a R_X86_64_PLT32 when needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115541 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-04 19:04:13 +00:00
Rafael Espindola
28f9ac8101 Produce a R_X86_64_GOT32 when needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-04 18:44:25 +00:00
Jan Wen Voung
083cf1574f Add hook in MCSection to decide when to use "optimized nops", for each
section kind. Previously, optimized nops were only used for MachO.
Also added tests for ELF and COFF.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115523 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-04 17:32:41 +00:00
Rafael Espindola
55fb102130 Include the section address in the computation of the relocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-04 15:59:01 +00:00
Rafael Espindola
01263d35d4 Correctly compute the relocation when it is not in the first fragment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115506 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-04 15:28:43 +00:00
Eli Friedman
d32d85e5ba Add 3DNowA instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115477 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-03 20:23:13 +00:00
Chris Lattner
591d76ea5a the immediate field of pshufw is actually an 8-bit field, not a 8-bit field that is sign extended. This fixes PR8288
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115473 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-03 19:09:13 +00:00
Chris Lattner
cc07d7116a add support for the prefetch/prefetchw instructions, move femms into
the right file.  The assembler supports all the 3dnow instructions now,
but not the "3dnowa" ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115468 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-03 18:42:30 +00:00
Chris Lattner
f132fa0e74 what the heck, add support for the rest of the 3dNow! binary operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115467 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-03 18:24:18 +00:00
Chris Lattner
548abfcbd6 Implement support for the bizarre 3DNow! encoding (which is unlike anything
else in X86), and add support for pavgusb.  This is apparently the
only instruction (other than movsx) that is preventing ffmpeg from building
with clang.

If someone else is interested in banging out the rest of the 3DNow! 
instructions, it should be quite easy now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115466 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-03 18:08:05 +00:00
Rafael Espindola
9d8b7555cd Implement a very basic PIC case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115454 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-03 00:46:57 +00:00