Commit Graph

559 Commits

Author SHA1 Message Date
Rafael Espindola
5df0b65e8f Refactor code a bit and avoid creating unnecessary entries in the string
map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116579 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-15 15:39:06 +00:00
Bob Wilson
cfbece50f6 ARM instructions that are both predicated and set the condition codes
have been printed with the "S" modifier after the predicate.  With ARM's
unified syntax, they are supposed to go in the other order.  We fixed this
for Thumb when we switched to unified syntax but missed changing it for
ARM.  Apparently we don't generate these instructions often because no one
noticed until now.  Thanks to Bill Wendling for the testcase!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116563 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-15 03:23:44 +00:00
Jim Grosbach
53e7dcbd47 Simplify test file a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116540 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 23:32:44 +00:00
Jim Grosbach
8faff9c759 Add testcase for RRX and ASRS (which effectively tests MOVs, since those
are just forms of that instruction).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116538 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 23:29:18 +00:00
Jim Grosbach
1de588df69 MOVi16 and MOVT ARM mode encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 18:54:27 +00:00
Rafael Espindola
a0949b50dc Remove some code duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116484 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 16:34:44 +00:00
Bill Wendling
bbbdcd453d Add support for vmov.f64/.f32 encoding. There's a bit of a hack going on
here. The f32 in FCONSTS is handled as a double instead of a float in the
code. So the encoding of the immediate into the instruction isn't exactly in
line with the documentation in that regard. But given that we know it's handled
as a double, it doesn't cause any harm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116471 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 02:33:26 +00:00
Bill Wendling
946a2740a5 Add encoding for 'fmstat'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116466 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 01:19:34 +00:00
Bill Wendling
88cf038436 - Add encodings for multiply add/subtract instructions in all their glory.
- Add missing patterns for some multiply add/subtract instructions.
- Add encodings for VMRS and VMSR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116464 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 01:02:08 +00:00
Jim Grosbach
b3af5de2d9 Refactor the ARM 'setend' instruction pattern. Use a single instruction pattern
and handle the operand explicitly. Flesh out encoding information. Add an
explicit disassembler testcase for the instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116432 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 21:00:04 +00:00
Bill Wendling
67a704de03 Add MC encodings for VCVT* instrunctions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116431 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 20:58:46 +00:00
Jim Grosbach
b35ad41fef Add ARM mode encoding for [SU]XT[BH] and [SU]XTA[BH] instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116421 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 19:56:10 +00:00
Jim Grosbach
24989ecc70 Add ARM mode operand encoding information for ADDE/SUBE instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116412 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 18:00:52 +00:00
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