1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

532 Commits

Author SHA1 Message Date
Michael J. Spencer
4dc462314c MC-COFF: Implement InitSections. Fixes PR8335.
llvm-svn: 116151
2010-10-09 15:44:27 +00:00
Michael J. Spencer
9e8793d7d6 MC-COFF: Add COFFAsmParser. Completes PR8343.
llvm-svn: 116150
2010-10-09 11:01:07 +00:00
Jim Grosbach
3075d28c15 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.

llvm-svn: 116112
2010-10-08 21:45:55 +00:00
Rafael Espindola
bfd3c31acf Call InitSections in llc and clang so that the binaries produced by them
are easier to diff with those produced by llvm-mc.

llvm-svn: 116095
2010-10-08 19:37:38 +00:00
Jim Grosbach
edbbf33203 Add test file for simple ARM binary encodings with MC
llvm-svn: 116024
2010-10-08 00:47:59 +00:00
Michael J. Spencer
452789b5c0 MC-COFF: Add test for my last commit.
llvm-svn: 116015
2010-10-08 00:00:28 +00:00
Michael J. Spencer
85094f7689 MC-COFF: Fix symbol aliases. Fixes PR8251.
llvm-svn: 115909
2010-10-07 06:29:33 +00:00
Rafael Espindola
ed469a30f0 Get binding and visibility info from the the alias, but Type from the symbol
being aliased.

llvm-svn: 115836
2010-10-06 21:02:29 +00:00
Rafael Espindola
6283a4a478 If a symbol is global, reloc against it even if it is in a mergeable section.
llvm-svn: 115817
2010-10-06 19:27:21 +00:00
Rafael Espindola
d085e53b36 Make sure weak symbols are listed after the local ones.
llvm-svn: 115795
2010-10-06 16:47:31 +00:00
Rafael Espindola
0c327e6e77 Correctly handle GOTPCREL relocations.
llvm-svn: 115793
2010-10-06 16:23:36 +00:00
Rafael Espindola
8c7f9745de Use a relocation against the symbol if it is a PLT and the symbol is in another
section. Common because of linkonce sections.

llvm-svn: 115718
2010-10-05 23:57:26 +00:00
Rafael Espindola
e2bc98a2b2 Implement more alias cases.
llvm-svn: 115699
2010-10-05 22:26:43 +00:00
Chris Lattner
ca34143ddd Replace a gross hack (the MOV64ri_alt instruction) with a slightly less
gross hack (having the asmmatcher handle the alias).

llvm-svn: 115685
2010-10-05 21:09:45 +00:00
Rafael Espindola
5762077d52 Don't crash in a strange .size directive.
llvm-svn: 115684
2010-10-05 21:02:45 +00:00
Michael J. Spencer
19b6962abb MC-COFF: Fix (PR8278) temporary symbol relocations.
llvm-svn: 115656
2010-10-05 19:48:03 +00:00
Rafael Espindola
0b536fb0fb Add support for a fill value in the .zero directive.
llvm-svn: 115655
2010-10-05 19:42:57 +00:00
Rafael Espindola
f850cfbc16 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.

llvm-svn: 115643
2010-10-05 18:01:23 +00:00
Michael J. Spencer
26a49596d7 test/COFF: Fix symbol indexes and names. Update tests to match.
llvm-svn: 115642
2010-10-05 17:57:08 +00:00
Michael J. Spencer
723b94923a test/COFF: Remove temp file usage.
llvm-svn: 115641
2010-10-05 17:56:56 +00:00
Michael J. Spencer
8d37ea7265 Cleanup Whitespace.
llvm-svn: 115639
2010-10-05 17:56:37 +00:00
Rafael Espindola
e829a55e8e Produce a undefined reference to _GLOBAL_OFFSET_TABLE_ when needed.
llvm-svn: 115623
2010-10-05 15:48:37 +00:00
Rafael Espindola
9cd97ce8ed Tests that now pass.
llvm-svn: 115622
2010-10-05 15:43:32 +00:00
Sean Callanan
be873cd53a Added a testcase for the ENTER instruction.
llvm-svn: 115580
2010-10-05 00:21:40 +00:00
Rafael Espindola
dcac047c7f Implement ELF::R_X86_64_GOTPCREL.
llvm-svn: 115547
2010-10-04 19:51:39 +00:00
Rafael Espindola
f7e642c0da Produce a R_X86_64_PLT32 when needed.
llvm-svn: 115541
2010-10-04 19:04:13 +00:00
Rafael Espindola
08361a0329 Produce a R_X86_64_GOT32 when needed.
llvm-svn: 115537
2010-10-04 18:44:25 +00:00
Jan Wen Voung
9c76bbf90a 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.

llvm-svn: 115523
2010-10-04 17:32:41 +00:00
Rafael Espindola
491c3f9ef7 Include the section address in the computation of the relocation.
llvm-svn: 115509
2010-10-04 15:59:01 +00:00
Rafael Espindola
ce6ea76503 Correctly compute the relocation when it is not in the first fragment.
llvm-svn: 115506
2010-10-04 15:28:43 +00:00
Eli Friedman
35432e5685 Add 3DNowA instructions.
llvm-svn: 115477
2010-10-03 20:23:13 +00:00
Chris Lattner
d03783eaf2 the immediate field of pshufw is actually an 8-bit field, not a 8-bit field that is sign extended. This fixes PR8288
llvm-svn: 115473
2010-10-03 19:09:13 +00:00
Chris Lattner
4599fd89fd 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.

llvm-svn: 115468
2010-10-03 18:42:30 +00:00
Chris Lattner
6d6f84f99c what the heck, add support for the rest of the 3dNow! binary operations.
llvm-svn: 115467
2010-10-03 18:24:18 +00:00
Chris Lattner
8174253484 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.

llvm-svn: 115466
2010-10-03 18:08:05 +00:00
Rafael Espindola
e209fd8ab7 Implement a very basic PIC case.
llvm-svn: 115454
2010-10-03 00:46:57 +00:00
Chris Lattner
3c29a2b776 fix a regression introduced in r115243, in which the instruction
backing int_x86_ssse3_pshuf_w got removed.  This caused PR8280.

llvm-svn: 115422
2010-10-02 21:32:15 +00:00
Chris Lattner
0f389ed003 actually, move the elf tests into the existing elf dir.
llvm-svn: 115416
2010-10-02 18:53:48 +00:00
Chris Lattner
1a96333869 consolidate ELF tests into asmparser tests.
llvm-svn: 115415
2010-10-02 18:52:57 +00:00
Chris Lattner
3528fce592 move ARM MC tests up one level.
llvm-svn: 115414
2010-10-02 18:52:05 +00:00
Chris Lattner
2c53557b0d move X86 subdir up a level
llvm-svn: 115292
2010-10-01 04:32:20 +00:00
Rafael Espindola
5aae0d6863 Factor some logic into ShouldRelocOnSymbol. This simplifies the code and
fixes some cases where we were producing relocations with at symbol that
should use a section instead.

llvm-svn: 115194
2010-09-30 20:18:35 +00:00
Chris Lattner
5bf2e8957f more cleanups.
llvm-svn: 115178
2010-09-30 17:29:05 +00:00
Chris Lattner
06b22c9040 merge and clean up tests.
llvm-svn: 115177
2010-09-30 17:24:05 +00:00
Chris Lattner
3eb4b129ce merge two tests.
llvm-svn: 115175
2010-09-30 17:18:22 +00:00
Chris Lattner
4305b3410a rename test
llvm-svn: 115174
2010-09-30 17:16:49 +00:00
Chris Lattner
3c83d4c5b2 generalize test.
llvm-svn: 115172
2010-09-30 17:15:42 +00:00
Chris Lattner
ba10206990 rename test.
llvm-svn: 115171
2010-09-30 17:14:55 +00:00
Chris Lattner
4e40805fb9 merge two tests.
llvm-svn: 115170
2010-09-30 17:14:30 +00:00
Chris Lattner
df2f5c0a40 preemptively add the rest of the non-n fpstack instructions.
llvm-svn: 115168
2010-09-30 17:11:29 +00:00