summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/Disassembler
Commit message (Collapse)AuthorAgeFilesLines
...
* [Modules] Make Support/Debug.h modular. This requires it to not changeChandler Carruth2014-04-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | behavior based on other files defining DEBUG_TYPE, which means it cannot define DEBUG_TYPE at all. This is actually better IMO as it forces folks to define relevant DEBUG_TYPEs for their files. However, it requires all files that currently use DEBUG(...) to define a DEBUG_TYPE if they don't already. I've updated all such files in LLVM and will do the same for other upstream projects. This still leaves one important change in how LLVM uses the DEBUG_TYPE macro going forward: we need to only define the macro *after* header files have been #include-ed. Previously, this wasn't possible because Debug.h required the macro to be pre-defined. This commit removes that. By defining DEBUG_TYPE after the includes two things are fixed: - Header files that need to provide a DEBUG_TYPE for some inline code can do so by defining the macro before their inline code and undef-ing it afterward so the macro does not escape. - We no longer have rampant ODR violations due to including headers with different DEBUG_TYPE definitions. This may be mostly an academic violation today, but with modules these types of violations are easy to check for and potentially very relevant. Where necessary to suppor headers with DEBUG_TYPE, I have moved the definitions below the includes in this commit. I plan to move the rest of the DEBUG_TYPE macros in LLVM in subsequent commits; this one is big enough. The comments in Debug.h, which were hilariously out of date already, have been updated to reflect the recommended practice going forward. llvm-svn: 206822
* Appease autoconf build since X86Disassembler.c has been disappeared in r206717.NAKAMURA Takumi2014-04-211-0/+2
| | | | | | It can be reverted a few days later, after X86Disassembler.d is updated not to contain "X86Disassembler.c". llvm-svn: 206758
* C++ has a bool type! (And C's had one too, for 15 years...)Richard Smith2014-04-202-38/+33
| | | | llvm-svn: 206723
* More C++ification.Richard Smith2014-04-202-226/+165
| | | | llvm-svn: 206722
* Remove some more C junk from these files.Richard Smith2014-04-202-16/+6
| | | | llvm-svn: 206721
* Don't provide two different definitions of ModRMDecision, OpcodeDecision, ↵Richard Smith2014-04-203-37/+23
| | | | | | and ContextDecision in different source files (depending on #define magic). llvm-svn: 206720
* Don't define llvm::X86Disassembler::InstructionSpecifier in different ways inRichard Smith2014-04-202-12/+8
| | | | | | different source files. llvm-svn: 206719
* Maybe if I touch this file the buildbots will actually rerun configure like ↵Richard Smith2014-04-201-1/+1
| | | | | | they need to... llvm-svn: 206718
* What year is it! This file has no reason to be written in C, and has doubly noRichard Smith2014-04-205-109/+103
| | | | | | | | | | reason to expose a global symbol 'decodeInstruction' nor to pollute the global scope with a bunch of external linkage entities (some of which conflict with others elsewhere in LLVM). This is just the initial transition to C++; more cleanups to follow. llvm-svn: 206717
* [MC] Require an MCContext when constructing an MCDisassembler.Lang Hames2014-04-152-4/+6
| | | | | | | | | | | | | | | | This patch re-introduces the MCContext member that was removed from MCDisassembler in r206063, and requires that an MCContext be passed in at MCDisassembler construction time. (Previously the MCContext member had been initialized in an ad-hoc fashion after construction). The MCCContext member can be used by MCDisassembler sub-classes to construct constant or target-specific MCExprs. This patch updates disassemblers for in-tree targets, and provides the MCRegisterInfo instance that some disassemblers were using through the MCContext (previously those backends were constructing their own MCRegisterInfo instances). llvm-svn: 206241
* [X86] unique_ptr'ify one of X86GenericDisassembler's members.Lang Hames2014-04-132-14/+10
| | | | llvm-svn: 206127
* [X86] Check return value of readSIB in disassembler so errors propagate. In ↵Craig Topper2014-03-201-5/+2
| | | | | | particular this makes a too short instruction with a missing SIB byte fail. llvm-svn: 204305
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-091-5/+3
| | | | | | class. llvm-svn: 203418
* Cleaning up two more pre-Visual C++ 2012 build hacks.Yaron Keren2014-03-061-8/+0
| | | | llvm-svn: 203093
* Remove A6/A7 opcode maps. They can all be handled with a TB map, opcode of ↵Craig Topper2014-02-192-35/+3
| | | | | | 0xa6/0xa7, and adding MRM_C0/MRM_E0 forms. Removes 376K from the disassembler tables. llvm-svn: 201641
* Fix diassembler handling of rex.b when mod=00/01/10 and bbb=101. Mod=00 ↵Craig Topper2014-02-171-4/+3
| | | | | | should ignore the base register entirely. Mod=01/10 should treat this as R13 plus displacment. Fixes PR18860. llvm-svn: 201507
* Avoid C++ comment in C sourcesAlp Toker2014-01-261-1/+1
| | | | | | lib/Target/X86/Disassembler/X86DisassemblerDecoder.c:1361:7: error: C++ style comments are not allowed in ISO C90 llvm-svn: 200153
* Set displacementSize to 1 for instrucitons with mod==0x1. Fixes PR17310. ↵Craig Topper2014-01-251-0/+3
| | | | | | Modified from patch by James Courtier-Dutton. llvm-svn: 200100
* Fix known typosAlp Toker2014-01-241-1/+1
| | | | | | | Sweep the codebase for common typos. Includes some changes to visible function names that were misspelt. llvm-svn: 200018
* X86Disassembler.cpp: Fix @param introduced in r199804. [-Wdocumentation]NAKAMURA Takumi2014-01-231-1/+0
| | | | llvm-svn: 199855
* Remove param doxygen comment for non-existing parameter.Benjamin Kramer2014-01-221-1/+0
| | | | | | Found by -Wdocumentation. llvm-svn: 199814
* [x86] Fix uninitialized variable warning in translate{Src,Dst}IndexDavid Woodhouse2014-01-221-2/+6
| | | | llvm-svn: 199811
* [x86] Allow address-size overrides for STOS[BWLQ] (PR9385)David Woodhouse2014-01-223-1/+29
| | | | llvm-svn: 199804
* [x86] Allow segment and address-size overrides for LODS[BWLQ] (PR9385)David Woodhouse2014-01-223-1/+32
| | | | llvm-svn: 199803
* [x86] Fix disassembly of MOV16ao16 et al.David Woodhouse2014-01-201-2/+0
| | | | | | | | | | The addition of IC_OPSIZE_ADSIZE in r198759 wasn't quite complete. It also turns out to have been unnecessary. The disassembler handles the AdSize prefix for itself, and doesn't care about the difference between (e.g.) MOV8ao8 and MOB8ao8_16 definitions. So just let them coexist and don't worry about it. llvm-svn: 199654
* [x86] Fix 16-bit disassembly of JCXZ/JECXZDavid Woodhouse2014-01-201-0/+19
| | | | llvm-svn: 199653
* [x86] Fix 16-bit handling of OpSize bitDavid Woodhouse2014-01-201-3/+5
| | | | | | | | | | When disassembling in 16-bit mode the meaning of the OpSize bit is inverted. Instructions found in the IC_OPSIZE context will actually *not* have the 0x66 prefix, and instructions in the IC context will have the 0x66 prefix. Make use of the existing special-case handling for the 0x66 prefix being in the wrong place, to cope with this. llvm-svn: 199650
* [x86] Infer disassembler mode from SubtargetInfo feature bitsDavid Woodhouse2014-01-202-16/+24
| | | | | | | | | | | | Aside from cleaning up the code, this also adds support for the -code16 environment and actually enables the MODE_16BIT mode that was previously not accessible. There is no point adding any testing for 16-bit yet though; basically nothing will work because we aren't handling the OpSize prefix correctly for 16-bit mode. llvm-svn: 199649
* VEX_PREFIX_66 doesn't need to set the hasOpSize flag since VEX instructions ↵Craig Topper2014-01-171-11/+0
| | | | | | don't use the size fields it controls. llvm-svn: 199470
* Allow x86 mov instructions to/from memory with absolute address to be ↵Craig Topper2014-01-161-11/+18
| | | | | | encoded and disassembled with a segment override prefix. Fixes PR16962. llvm-svn: 199364
* [x86] Fix MOV8ao8 et al for 16-bit mode, fix up disassembler to understandDavid Woodhouse2014-01-081-0/+2
| | | | | | | | | | It seems there is no separate instruction class for having AdSize *and* OpSize bits set, which is required in order to disambiguate between all these instructions. So add that to the disassembler. Hm, perhaps we do need an AdSize16 bit after all? llvm-svn: 198759
* Remove modifierType/Base from X86 disassembler tables as they are no longer ↵Craig Topper2014-01-011-3/+0
| | | | | | used. Removes ~11.5K from static tables. llvm-svn: 198284
* X86Disassembler.cpp: Prune stray @return on translateFPRegister(). ↵NAKAMURA Takumi2014-01-011-1/+0
| | | | | | [-Wdocumentation] llvm-svn: 198279
* Remove need for MODIFIER_OPCODE in the disassembler tables. AddRegFrms are ↵Craig Topper2014-01-014-52/+10
| | | | | | really more like OrRegFrm so we don't need a difference since we can just mask bits. llvm-svn: 198278
* Second attempt at Removing special form of AddRegFrm used by FP ↵Craig Topper2014-01-013-12/+6
| | | | | | instructions. These instructions can be handled by MRMXr instead. llvm-svn: 198276
* Revert r198238 and add FP disassembler tests. It didn't work and I didn't ↵Craig Topper2013-12-312-1/+5
| | | | | | realized we had no FP disassembler test cases. llvm-svn: 198265
* Remove old comment referring to an argument that no longer exists.Craig Topper2013-12-311-2/+0
| | | | llvm-svn: 198263
* Remove special form of AddRegFrm used by FP instructions. These instructions ↵Craig Topper2013-12-302-5/+1
| | | | | | can be handled by MRMXr instead. llvm-svn: 198238
* AVX-512: decoder for AVX-512, made by Alexey Bader.Elena Demikhovsky2013-12-254-122/+314
| | | | llvm-svn: 198013
* AVX-512: Added legal type MVT::i1 and VK1 register for it.Elena Demikhovsky2013-12-161-0/+1
| | | | | | | | | Added scalar compare VCMPSS, VCMPSD. Implemented LowerSELECT for scalar FP operations. I replaced FSETCCss, FSETCCsd with one node type FSETCCs. Node extract_vector_elt(v16i1/v8i1, idx) returns an element of type i1. llvm-svn: 197384
* Prune redundant dependencies in LLVMBuild.txt.NAKAMURA Takumi2013-12-111-1/+1
| | | | llvm-svn: 196988
* [CMake] Let add_public_tablegen_target responsible to provide dependency to ↵NAKAMURA Takumi2013-11-281-2/+0
| | | | | | | | | CommonTableGen. add_public_tablegen_target adds *CommonTableGen to LLVM_COMMON_DEPENDS. LLVM_COMMON_DEPENDS affects add_llvm_library (and other add_target stuff) within its scope. llvm-svn: 195927
* [CMake] Prune include_directories() in llvm/lib/Target, take #2.NAKAMURA Takumi2013-11-281-2/+0
| | | | | | I forgot to commit them. They were staging in my local repo. llvm-svn: 195924
* X86 Disassembler: remove unused bool typedef-nameDavid Majnemer2013-11-051-2/+0
| | | | llvm-svn: 194062
* AVX-512: added VPCONFLICT instruction and intrinsics,Elena Demikhovsky2013-11-031-1/+49
| | | | | | added EVEX_KZ to tablegen llvm-svn: 193959
* Replace C++ style comment with a C style comment to satisfy some of the ↵Craig Topper2013-10-031-1/+1
| | | | | | build bots. llvm-svn: 191880
* Remove comma from the end of an enum.Craig Topper2013-10-031-1/+1
| | | | llvm-svn: 191877
* Add XOP disassembler support. Fixes PR13933.Craig Topper2013-10-033-39/+174
| | | | llvm-svn: 191874
* Remove 0 as a valid encoding for the m-mmmm field.Craig Topper2013-10-011-2/+0
| | | | llvm-svn: 191732
* Remove unneeded fields from disassembler internal instruction format.Craig Topper2013-10-012-20/+0
| | | | llvm-svn: 191731
OpenPOWER on IntegriCloud