Daniel Dunbar
52823cc91c
build: Attempt to rectify inconsistencies between CMake and LLVMBuild versions of explicit dependencies.
...
- The hope is that we have a tool/test to verify these are accurate (and tight) soon.
llvm-svn: 144444
2011-11-12 02:10:57 +00:00
Bob Wilson
c391f7ff64
Remove FIXME comment that should have been removed with r144351.
...
llvm-svn: 144392
2011-11-11 17:34:14 +00:00
Benjamin Kramer
f554228d82
Clients are responsible for initializing the targets, remove it from the disassembler API.
...
This will break users of the LLVMCreateDisasm API (not that I know of any). They have to call the
LLVMInitializeAll* functions from llvm-c/Target.h themselves now. edis' C API in all its horribleness
should be unaffected.
llvm-svn: 144385
2011-11-11 13:20:40 +00:00
Bill Wendling
70976ad9c2
Reenable compact unwinding now that <rdar://problem/10430076> is fixed.
...
llvm-svn: 144351
2011-11-11 01:03:50 +00:00
Bill Wendling
f311655e3f
Disable compact unwind generation until I can solve the codegen problems.
...
llvm-svn: 144346
2011-11-11 00:28:42 +00:00
Daniel Dunbar
b27317f7dd
build/MCDisassembler: Fix required libraries list of MCDisassembler to use
...
all-targets instead of an explicit list.
llvm-svn: 144320
2011-11-10 22:00:34 +00:00
Benjamin Kramer
6312682b46
Simplify code. No functionality change.
...
llvm-svn: 144186
2011-11-09 13:19:15 +00:00
Eric Christopher
5223a57533
Remove the pubnames section, no one consumes it.
...
llvm-svn: 144169
2011-11-09 05:24:07 +00:00
Bill Wendling
39674fc008
Emit the compact unwind *if* we have a compact unwind encoding.
...
*headdesk*
llvm-svn: 144138
2011-11-08 22:23:43 +00:00
Michael J. Spencer
5ca95bc56f
MC/COFF: Correctly emit the size of an empty string table.
...
llvm-svn: 144111
2011-11-08 19:52:32 +00:00
Benjamin Kramer
69d57cf9c4
Simplify some uses of utohexstr.
...
As a side effect hex is printed lowercase instead of uppercase now.
llvm-svn: 144013
2011-11-07 21:00:59 +00:00
Eric Christopher
4996c70034
Add the support code to enable the dwarf accelerator tables. Upcoming patches
...
to fix the types section (all types, not just global types), and testcases.
The code to do the final emission is disabled by default.
llvm-svn: 143923
2011-11-07 09:24:32 +00:00
Benjamin Kramer
20baffb257
Replace (Lower|Upper)caseString in favor of StringRef's newest methods.
...
llvm-svn: 143891
2011-11-06 20:37:06 +00:00
Benjamin Kramer
adc5b46782
Twinify.
...
llvm-svn: 143811
2011-11-05 13:11:25 +00:00
Benjamin Kramer
c74798d5cf
Add an option to pad an uleb128 to MCObjectWriter and remove the uleb128 encoding from the DWARF asm printer.
...
As a side effect we now print dwarf ulebs with .ascii directives.
llvm-svn: 143809
2011-11-05 11:52:44 +00:00
Bruno Cardoso Lopes
c9473e9809
Add mips ELF relocation types. Patch by Jack Carter!
...
llvm-svn: 143738
2011-11-04 22:24:36 +00:00
Daniel Dunbar
bf9bba47a1
build: Add initial cut at LLVMBuild.txt files.
...
llvm-svn: 143634
2011-11-03 18:53:17 +00:00
Kevin Enderby
60d8516857
Replace tabs I added in this new line of code with spaces.
...
Thanks to Nick for spotting this!
llvm-svn: 143556
2011-11-02 17:56:38 +00:00
Kevin Enderby
82ed3be1fb
Fixed a bug in the code to create a dwarf file and directory table entires when
...
it is separating the directory part from the basename of the FileName. Noticed
that this:
.file 1 "dir/foo"
when assembled got the two parts switched. Using the Mac OS X dwarfdump tool
it can be seen easily:
% dwarfdump -a a.out
include_directories[ 1] = 'foo'
Dir Mod Time File Len File Name
---- ---------- ---------- ---------------------------
file_names[ 1] 1 0x00000000 0x00000000 dir
...
Which should be:
...
include_directories[ 1] = 'dir'
Dir Mod Time File Len File Name
---- ---------- ---------- ---------------------------
file_names[ 1] 1 0x00000000 0x00000000 foo
llvm-svn: 143521
2011-11-01 23:39:05 +00:00
Kevin Enderby
6469fc275a
First part of support for generating dwarf for assembly source files with the
...
-g flag. In this part we generate the .file for the source being assembled and
the .loc's for the assembled instructions.
The next part will be to generate the dwarf Compile Unit DIE and a dwarf
subprogram DIE for each non-temporary label.
Once the next part is done test cases will be added. rdar://9275556
llvm-svn: 143509
2011-11-01 22:27:22 +00:00
Nick Lewycky
d59c0cac6c
Teach our Dwarf emission to use the string pool.
...
llvm-svn: 143097
2011-10-27 06:44:11 +00:00
Jim Grosbach
6485a7991d
Trailing whitespace.
...
llvm-svn: 143071
2011-10-26 22:44:41 +00:00
Nick Lewycky
1a62d78325
On an ELF system, ".debug_str" is mergeable and contains null terminated strings
...
composed of one byte characters.
llvm-svn: 143044
2011-10-26 18:44:32 +00:00
Bruno Cardoso Lopes
82b077ec22
This is the first of several patches for Mips direct object generation.
...
This first patch is for expression variable kinds.
Patch by Jack Carter!
llvm-svn: 142934
2011-10-25 18:13:20 +00:00
Rafael Espindola
e0d0908356
Fix parsing of a line with only a # in it.
...
llvm-svn: 142537
2011-10-19 18:48:52 +00:00
Nick Lewycky
40f8f2ff24
Add support for a new extension to the .file directive:
...
.file filenumber "directory" "filename"
This removes one join+split of the directory+filename in MC internals. Because
bitcode files have independent fields for directory and filenames in debug info,
this patch may change the .o files written by existing .bc files.
llvm-svn: 142300
2011-10-17 23:05:28 +00:00
Benjamin Kramer
cc863b2bb6
Let printf do the formatting instead aligning strings ourselves.
...
While at it, merge some format strings.
llvm-svn: 142140
2011-10-16 16:30:34 +00:00
Benjamin Kramer
1930b003fe
Add AsmToken::getEndLoc and use it to add ranges to x86 asm register parsing.
...
<stdin>:1:12: error: register %rax is only available in 64-bit mode
incl %rax
^~~~
llvm-svn: 142137
2011-10-16 12:10:27 +00:00
Benjamin Kramer
47f5e30e78
PR11143: Save the old diagnostic handler and call it when munging diagnostics for #line directives.
...
This reenables proper inline asm diagnostics in clang
llvm-svn: 142132
2011-10-16 10:48:29 +00:00
Chris Lattner
7284526aff
remove the dead 'ShowLine' argument from SMDiagnostic.
...
llvm-svn: 142108
2011-10-16 05:47:55 +00:00
Chris Lattner
03b80a4027
Make SMDiagnostic a little more sane. Instead of passing around note/warning/error as a
...
string, pass it around as an enum.
llvm-svn: 142107
2011-10-16 05:43:57 +00:00
Chris Lattner
a3a0681083
Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance
...
the X86 asmparser to produce ranges in the one case that was annoying me, for example:
test.s:10:15: error: invalid operand for instruction
movl 0(%rax), 0(%edx)
^~~~~~~
It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use
ranges where appropriate if someone is interested.
llvm-svn: 142106
2011-10-16 04:47:35 +00:00
Owen Anderson
4a49dee221
Disable code/data region symbols on ELF targets, where different mapping symbols are used for ARM/Thumb mode code. This should only be re-enabled once we have a solution to properly distinguish these.
...
llvm-svn: 141984
2011-10-14 20:28:57 +00:00
Kevin Enderby
e7c0c499b8
Finish supporting cpp #file/line comments in assembler for error messages. So
...
for cpp pre-processed assembly we give correct filename and line numbers when
reporting errors in assembly files when using clang and -integrated-as on .s
files. rdar://8998895
llvm-svn: 141814
2011-10-12 21:38:39 +00:00
Nick Lewycky
f895efaa45
Hoist vector.size() computation out of the loop. No functionality change.
...
llvm-svn: 141807
2011-10-12 20:20:48 +00:00
Nick Lewycky
29e7b315ac
Also create a shndx even if there are no symbols. This lets us test
...
.symtab_shndx reading and writing together, and finally we have a testcase for
r141440.
llvm-svn: 141641
2011-10-11 03:54:50 +00:00
Owen Anderson
bed5504f5f
MCAtom extending methods need to extend the range of the atom as well.
...
llvm-svn: 141557
2011-10-10 18:09:38 +00:00
Nick Lewycky
133a16871f
Don't emit the symbol table entry for the .symtab_shndx section either.
...
llvm-svn: 141440
2011-10-07 23:29:53 +00:00
Nick Lewycky
c6ac5f7388
Remove extraneous curlies. No functionality change.
...
llvm-svn: 141439
2011-10-07 23:28:32 +00:00
Nick Lewycky
8b02d36a23
Don't emit a shstrtabindex in the reserved range. Spotted by inspection and
...
patch by Cary Coutant!
llvm-svn: 141413
2011-10-07 20:58:24 +00:00
Nick Lewycky
4eb1143038
Clarify/fix typo. No functionality change.
...
llvm-svn: 141412
2011-10-07 20:56:23 +00:00
Owen Anderson
0ca562ec4c
Teach the MC to output code/data region marker labels in MachO and ELF modes. These are used by disassemblers to provide better disassembly, particularly on targets like ARM Thumb that like to intermingle data in the TEXT segment.
...
llvm-svn: 141135
2011-10-04 23:26:17 +00:00
Kevin Enderby
5dcda64338
Adding back support for printing operands symbolically to ARM's new disassembler
...
using llvm's public 'C' disassembler API now including annotations.
Hooked this up to Darwin's otool(1) so it can again print things like branch
targets for example this:
blx _puts
instead of this:
blx #-36
and includes support for annotations for branches to symbol stubs like:
bl 0x40 @ symbol stub for: _puts
and annotations for pc relative loads like this:
ldr r3, #8 @ literal pool for: Hello, world!
Also again can print the expression encoded in the Mach-O relocation entries for
things like this:
movt r0, :upper16:((_foo-_bar)+1234)
llvm-svn: 141129
2011-10-04 22:44:48 +00:00
Akira Hatanaka
e67a10d54d
Add definition of MipsELFObjectWriter.
...
Patch by Reed Kotler at Mips Technologies.
llvm-svn: 140891
2011-09-30 21:55:40 +00:00
Benjamin Kramer
f550fa9173
Sort CMakeLists.txt.
...
llvm-svn: 140465
2011-09-24 22:06:35 +00:00
Eli Friedman
64a4bf1788
PR10989: Don't print .hidden on Windows.
...
llvm-svn: 140356
2011-09-23 00:13:02 +00:00
Owen Anderson
adea3f0c01
Add new files to CMake.
...
llvm-svn: 140352
2011-09-22 23:20:48 +00:00
Benjamin Kramer
fbf0fba9f4
Update CMake build.
...
llvm-svn: 140347
2011-09-22 22:38:34 +00:00
Owen Anderson
6cca67fc4a
Start stubbing out MCModule and MCAtom, which provide an API for accessing the rich disassembly of a complete object or executable.
...
These are very much a work in progress, and not really useful yet.
llvm-svn: 140345
2011-09-22 22:32:22 +00:00
Owen Anderson
69fa8ffeef
In the disassembler C API, be careful not to confuse the comment streamer that the disassembler outputs annotations on with the streamer that the InstPrinter will print them on.
...
llvm-svn: 140217
2011-09-21 00:25:23 +00:00