summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/X86
Commit message (Collapse)AuthorAgeFilesLines
...
* YAMLIO: Allow scalars to dictate quotation rulesDavid Majnemer2014-04-101-1/+1
| | | | | | | Introduce ScalarTraits::mustQuote which determines whether or not a StringRef needs quoting before it is acceptable to output. llvm-svn: 205955
* Revert "YAMLIO: Encode ambiguous hex strings explicitly"Filipe Cabecinhas2014-04-091-1/+1
| | | | | | | | This reverts commit r205839. It broke several tests in lld. llvm-svn: 205857
* YAMLIO: Encode ambiguous hex strings explicitlyDavid Majnemer2014-04-091-1/+1
| | | | | | | | | | YAMLIO would turn a BinaryRef into the string 0000000004000000. However, the leading zero causes parsers to interpret it as being an octal number instead of a hexadecimal one. Instead, escape such strings as needed. llvm-svn: 205839
* Implement getRelocationAddress for MachO and ET_REL elf files.Rafael Espindola2014-04-031-0/+20
| | | | | | With that, fix the symbolizer to work with any ELF file. llvm-svn: 205588
* Fix "llvm-objdump -d -r" to show relocations inline for ELF filesMark Seaborn2014-01-251-0/+35
| | | | | | | | | | | | | | | | | | | This fixes a regression introduced by r182908, which broke llvm-objdump's ability to display relocations inline in a disassembly dump for ELF object files. That change removed a SectionRelocMap from Object/ELF.h, which we recreate in llvm-objdump.cpp. I discovered this regression via an out-of-tree test (test/NaCl/X86/pnacl-hides-sandbox-x86-64.ll) which used llvm-objdump. Note that the "Unknown" string in the test output on i386 isn't quite right, but this appears to be a pre-existing bug. Differential Revision: http://llvm-reviews.chandlerc.com/D2559 llvm-svn: 200090
* Create an atom with just the data that failed to disassemble.Rafael Espindola2013-10-161-2/+12
| | | | | | Patch by Stephen Checkoway. llvm-svn: 192827
* MC CFG: Remap enough for data too, analoguous to r188873.Ahmed Bougacha2013-08-211-0/+48
| | | | llvm-svn: 188925
* Add testcase for r188873: MCTextAtom boundaries.Ahmed Bougacha2013-08-211-0/+39
| | | | | | | Check that they are correctly computed if the last instruction is larger than 1 byte. llvm-svn: 188923
* Add basic YAML MC CFG testcase.Ahmed Bougacha2013-08-211-0/+86
| | | | | | Drive-by llvm-objdump cleanup (don't hardcode ToolName). llvm-svn: 188904
* MC: ObjectSymbolizer can now recognize external function stubs.Ahmed Bougacha2013-08-211-0/+18
| | | | | | | Only implemented in the Mach-O ObjectSymbolizer. The testcase sadly introduces a new binary. llvm-svn: 188879
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-161-2/+0
| | | | | | | | | | | | | | | | | - Instead of setting the suffixes in a bunch of places, just set one master list in the top-level config. We now only modify the suffix list in a few suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py). - Aside from removing the need for a bunch of lit.local.cfg files, this enables 4 tests that were inadvertently being skipped (one in Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been XFAILED). - This commit also fixes a bunch of config files to use config.root instead of older copy-pasted code. llvm-svn: 188513
* Revert "Put r184469 disassembler test back on X86"Sean Silva2013-06-211-46/+0
| | | | | | | | | This reverts commit r184602. In an upcoming commit, I will just remove the disassembler part of the test; it was mostly just a "nifty" thing marking a milestone but it doesn't test anything that isn't tested elsewhere. llvm-svn: 184606
* Put r184469 disassembler test back on X86Renato Golin2013-06-211-0/+46
| | | | llvm-svn: 184602
* Move the test for the data in code into the ARM directory as it is an ARMKevin Enderby2013-06-061-7/+0
| | | | | | | | binary that is used for the test. Caught by Jim Grosbach! rdar://11791371 llvm-svn: 183442
* Teach llvm-objdump with the -macho parser how to use the data in code tableKevin Enderby2013-06-061-0/+7
| | | | | | | | | | | | | | | from the LC_DATA_IN_CODE load command. And when disassembling print the data in code formatted for the kind of data it and not disassemble those bytes. I added the format specific functionality to the derived class MachOObjectFile since these tables only appears in Mach-O object files. This is my first attempt to modify the libObject stuff so if folks have better suggestions how to fit this in or suggestions on the implementation please let me know. rdar://11791371 llvm-svn: 183424
* Add MCSymbolizer for symbolic/annotated disassembly.Ahmed Bougacha2013-05-241-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a basic first step towards symbolization of disassembled instructions. This used to be done using externally provided (C API) callbacks. This patch introduces: - the MCSymbolizer class, that mimics the same functions that were used in the X86 and ARM disassemblers to symbolize immediate operands and to annotate loads based off PC (for things like c string literals). - the MCExternalSymbolizer class, which implements the old C API. - the MCRelocationInfo class, which provides a way for targets to translate relocations (either object::RelocationRef, or disassembler C API VariantKinds) to MCExprs. - the MCObjectSymbolizer class, which does symbolization using what it finds in an object::ObjectFile. This makes simple symbolization (with no fancy relocation stuff) work for all object formats! - x86-64 Mach-O and ELF MCRelocationInfos. - A basic ARM Mach-O MCRelocationInfo, that provides just enough to support the C API VariantKinds. Most of what works in otool (the only user of the old symbolization API that I know of) for x86-64 symbolic disassembly (-tvV) works, namely: - symbol references: call _foo; jmp 15 <_foo+50> - relocations: call _foo-_bar; call _foo-4 - __cf?string: leaq 193(%rip), %rax ## literal pool for "hello" Stub support is the main missing part (because libObject doesn't know, among other things, about mach-o indirect symbols). As for the MCSymbolizer API, instead of relying on the disassemblers to call the tryAdding* methods, maybe this could be done automagically using InstrInfo? For instance, even though PC-relative LEAs are used to get the address of string literals in a typical Mach-O file, a MOV would be used in an ELF file. And right now, the explicit symbolization only recognizes PC-relative LEAs. InstrInfo should have already have most of what is needed to know what to symbolize, so this can definitely be improved. I'd also like to remove object::RelocationRef::getValueString (it seems only used by relocation printing in objdump), as simply printing the created MCExpr is definitely enough (and cleaner than string concats). llvm-svn: 182625
* Object: Fix Mach-O relocation printing.Ahmed Bougacha2013-05-141-0/+35
| | | | | | | | | There were two problems that made llvm-objdump -r crash: - for non-scattered relocations, the symbol/section index is actually in the (aptly named) symbolnum field. - sections are 1-indexed. llvm-svn: 181843
* Teach MachO which sections contain codeTim Northover2012-12-171-0/+3
| | | | llvm-svn: 170349
* Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnuEli Bendersky2012-03-251-8/+1
| | | | | | | | | | | | | | * Removed test/lib/llvm.exp - it is no longer needed * Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files left in the test suite so this code is no longer required. test/lit.cfg is now much shorter and clearer * Removed a lot of duplicate code in lit.local.cfg files that need access to the root configuration, by adding a "root" attribute to the TestingConfig object. This attribute is dynamically computed to provide the same information as was previously provided by the custom getRoot functions. * Documented the config.root attribute in docs/CommandGuide/lit.pod llvm-svn: 153408
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-162-5/+13
| | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. llvm-svn: 150664
* Move x86-specific tests into X86 folder.Eli Friedman2011-11-013-0/+91
llvm-svn: 143424
OpenPOWER on IntegriCloud