Craig Topper
8702c5b7c0
Change unsigned to a uint16_t in static disassembler tables to reduce the table size.
...
llvm-svn: 163594
2012-09-11 04:19:21 +00:00
Roman Divacky
6792380e7b
Use const properly so that we dont remove const qualifier from region and MII
...
by casting. Found with gcc48.
llvm-svn: 163247
2012-09-05 21:17:34 +00:00
Craig Topper
c30fdbc46c
Add support for converting llvm.fma to fma4 instructions.
...
llvm-svn: 162999
2012-08-31 15:40:30 +00:00
Richard Smith
228e6d4cf3
Fix integer undefined behavior due to signed left shift overflow in LLVM.
...
Reviewed offline by chandlerc.
llvm-svn: 162623
2012-08-24 23:29:28 +00:00
Craig Topper
b8aec08819
Add more indirection to the disassembler tables to reduce amount of space used to store the operand types and encodings. Store only the unique combinations in a separate table and store indices in the instruction table. Saves about 32K of static data.
...
llvm-svn: 161101
2012-08-01 07:39:18 +00:00
Craig Topper
c2efce404e
Make INSTRUCTION_SPECIFIER_FIELDS match X86DisassemblerCommon.h. Also remove trailing whitespace.
...
llvm-svn: 161029
2012-07-31 05:18:26 +00:00
Craig Topper
fb39f97d4c
Tidy up trailing whitespace
...
llvm-svn: 161027
2012-07-31 04:58:05 +00:00
Craig Topper
5f33d90214
Tidy up trailing whitespace
...
llvm-svn: 161026
2012-07-31 04:38:27 +00:00
Kevin Enderby
216ac31971
Fix a bug in the x86 disassembler's symbolic disassembly support for Jcc-Jump
...
if Condition Is Met instuctions that was not correctly determining the target
instruction.
So for a jne rel32 instruction:
% cat x.s
.byte 0x0f, 0x85, 0x09, 0x00, 0x00, 0x00
% as x.s
it was incorrectly deterining the target:
% otool -q -tv a.out
a.out:
(__TEXT,__text) section
0000000000000000 jne 0xd
and with the fix it gets this correct as:
% otool -q -tv a.out
a.out:
(__TEXT,__text) section
0000000000000000 jne 0xf
rdar://11505997
llvm-svn: 160694
2012-07-24 21:40:01 +00:00
Bill Wendling
ea6397f67b
Remove tabs.
...
llvm-svn: 160477
2012-07-19 00:11:40 +00:00
Manman Ren
98a5bf24a9
X86: add more GATHER intrinsics in LLVM
...
Corrected type for index of llvm.x86.avx2.gather.d.pd.256
from 256-bit to 128-bit.
Corrected types for src|dst|mask of llvm.x86.avx2.gather.q.ps.256
from 256-bit to 128-bit.
Support the following intrinsics:
llvm.x86.avx2.gather.d.q, llvm.x86.avx2.gather.q.q
llvm.x86.avx2.gather.d.q.256, llvm.x86.avx2.gather.q.q.256
llvm.x86.avx2.gather.d.d, llvm.x86.avx2.gather.q.d
llvm.x86.avx2.gather.d.d.256, llvm.x86.avx2.gather.q.d.256
llvm-svn: 159402
2012-06-29 00:54:20 +00:00
Manman Ren
a09820414a
X86: add GATHER intrinsics (AVX2) in LLVM
...
Support the following intrinsics:
llvm.x86.avx2.gather.d.pd, llvm.x86.avx2.gather.q.pd
llvm.x86.avx2.gather.d.pd.256, llvm.x86.avx2.gather.q.pd.256
llvm.x86.avx2.gather.d.ps, llvm.x86.avx2.gather.q.ps
llvm.x86.avx2.gather.d.ps.256, llvm.x86.avx2.gather.q.ps.256
Modified Disassembler to handle VSIB addressing mode.
llvm-svn: 159221
2012-06-26 19:47:59 +00:00
Kevin Enderby
ec4bd31206
Fixed the llvm-mv X86 disassembler so the 'C' API gets jumps properly
...
symbolicated. These have and operand type of TYPE_RELv which was not handled
as isBranch in translateImmediate() in X86Disassembler.cpp. rdar://11268426
llvm-svn: 155074
2012-04-18 23:12:11 +00:00
Craig Topper
7629d63bc4
Add support for AVX enhanced comparison predicates. Patch from Kay Tiong Khoo.
...
llvm-svn: 153935
2012-04-03 05:20:24 +00:00
Benjamin Kramer
adfc73d68f
C files in llvm still have to be C89 compliant, remove C++-style comments.
...
llvm-svn: 152495
2012-03-10 15:10:06 +00:00
Kevin Enderby
014e1cde5f
Fix the x86 disassembler to at least print the lock prefix if it is the first
...
prefix. Added a FIXME to remind us this still does not work when it is not the
first prefix.
llvm-svn: 152414
2012-03-09 17:52:49 +00:00
Craig Topper
6dedbae429
Use uint8_t instead of enums to store values in X86 disassembler table. Shaves 150k off the size of X86DisassemblerDecoder.o
...
llvm-svn: 151995
2012-03-04 02:16:41 +00:00
Kevin Enderby
b119c08af3
Added annotations for x86 pc relative loads to llvm's 'C' disassembler.
...
So with darwin's otool(1) an x86_64 hello world .o file will print:
leaq L_.str(%rip), %rax ## literal pool for: Hello world
llvm-svn: 151769
2012-02-29 22:58:34 +00:00
Derek Schuff
56b662ce0f
Make MemoryObject accessor members const again
...
llvm-svn: 151687
2012-02-29 01:09:06 +00:00
Craig Topper
6491c8020e
X86 disassembler support for jcxz, jecxz, and jrcxz. Fixes PR11643. Patch by Kay Tiong Khoo.
...
llvm-svn: 151510
2012-02-27 01:54:29 +00:00
Kevin Enderby
6fbcd8d439
Updated the llvm-mc disassembler C API to support for the X86 target.
...
rdar://10873652
As part of this I updated the llvm-mc disassembler C API to always call the
SymbolLookUp call back even if there is no getOpInfo call back. If there is a
getOpInfo call back that is tried first and then if that gets no information
then the SymbolLookUp is called. I also made the code more robust by
memset(3)'ing to zero the LLVMOpInfo1 struct before then setting
SymbolicOp.Value before for the call to getOpInfo. And also don't use any
values from the LLVMOpInfo1 struct if getOpInfo returns 0. And also don't
use any of the ReferenceType or ReferenceName values from SymbolLookUp if it
returns NULL. rdar://10873563 and rdar://10873683
For the X86 target also fixed bugs so the annotations get printed.
Also fixed a few places in the ARM target that was not producing symbolic
operands for some instructions. rdar://10878166
llvm-svn: 151267
2012-02-23 18:18:17 +00:00
Ahmed Charles
636a3d618c
Remove dead code. Improve llvm_unreachable text. Simplify some control flow.
...
llvm-svn: 150918
2012-02-19 11:37:01 +00:00
Jia Liu
b22310fda6
Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC, PTX, Sparc, X86, XCore.
...
llvm-svn: 150878
2012-02-18 12:03:15 +00:00
Benjamin Kramer
915e3d9568
Don't mix declarations and code.
...
llvm-svn: 150305
2012-02-11 16:01:02 +00:00
Benjamin Kramer
428704eb52
Make the EDis tables const.
...
llvm-svn: 150304
2012-02-11 14:51:07 +00:00
Benjamin Kramer
478e8de8ef
Reuse the enum names from X86Desc in the X86Disassembler.
...
This requires some gymnastics to make it available for C code. Remove the names
from the disassembler tables, making them relocation free.
llvm-svn: 150303
2012-02-11 14:50:54 +00:00
Craig Topper
a0cd970b81
More tweaks to get the size of the X86 disassembler tables down.
...
llvm-svn: 150167
2012-02-09 08:58:07 +00:00
Craig Topper
487e744f66
Flatten some of the arrays in the X86 disassembler tables to reduce space needed to store pointers on 64-bit hosts and reduce relocations needed at startup. Part of PR11953.
...
llvm-svn: 150161
2012-02-09 07:45:30 +00:00
Derek Schuff
8b2dcad4b5
Enable streaming of bitcode
...
This CL delays reading of function bodies from initial parse until
materialization, allowing overlap of compilation with bitcode download.
llvm-svn: 149918
2012-02-06 22:30:29 +00:00
Duncan Sands
ae22c60f90
Persuade GCC that there is nothing worth warning about here (there isn't).
...
llvm-svn: 149834
2012-02-05 14:20:11 +00:00
David Blaikie
edbb58c577
Remove unnecessary default cases in switches that cover all enum values.
...
llvm-svn: 147855
2012-01-10 16:47:17 +00:00
Benjamin Kramer
9c48f26341
Silence warnings of a mysterious compiler that still defaults to C89.
...
llvm-svn: 147553
2012-01-04 22:06:45 +00:00
Benjamin Kramer
47aecca51a
X86Disassembler: Fix undefined behavior found by GCC 4.6
...
llvm-svn: 147404
2012-01-01 17:55:36 +00:00
Craig Topper
2ba766ae84
Add disassembler support for VPERMIL2PD and VPERMIL2PS.
...
llvm-svn: 147368
2011-12-30 06:23:39 +00:00
Craig Topper
b8b1b4c1de
Remove mode specific disassembler classes and just call X86GenericDisassembler constructor with appropriate argument in the creation functions. This removes a few tables that needed to be anchored.
...
llvm-svn: 147046
2011-12-21 08:06:52 +00:00
Craig Topper
f30188418b
Fix typo in a couple comments
...
llvm-svn: 147045
2011-12-21 06:30:53 +00:00
David Blaikie
a379b18173
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
...
llvm-svn: 146960
2011-12-20 02:50:00 +00:00
Daniel Dunbar
27a7489a03
LLVMBuild: Remove trailing newline, which irked me.
...
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Daniel Dunbar
539d0a8a09
build/CMake: Finish removal of add_llvm_library_dependencies.
...
llvm-svn: 145420
2011-11-29 19:25:30 +00:00
Craig Topper
f01f1b5cb9
More AVX2 instructions and their intrinsics.
...
llvm-svn: 143895
2011-11-06 23:04:08 +00:00
Daniel Dunbar
bf9bba47a1
build: Add initial cut at LLVMBuild.txt files.
...
llvm-svn: 143634
2011-11-03 18:53:17 +00:00
Craig Topper
a697852386
Fix disassembling of popcntw. Also remove some code that says it accounts for 64BIT_REXW_XD not existing, but it does exist.
...
llvm-svn: 141642
2011-10-11 04:34:23 +00:00
Craig Topper
b58a9665bd
Change C++ style comments to C style comments in X86 disassembler. Patch from Joe Abbey.
...
llvm-svn: 141162
2011-10-05 03:29:32 +00:00
Craig Topper
f18c896337
Add support in the disassembler for ignoring the L-bit on certain VEX instructions. Mark instructions that have this behavior. Fixes PR10676.
...
llvm-svn: 141065
2011-10-04 06:30:42 +00:00
Craig Topper
0d0be47d03
Treat VEX.vvvv as a 3-bit field outside of 64-bit mode. Prevents access to registers xmm8-xmm15 outside 64-bit mode.
...
llvm-svn: 140997
2011-10-03 08:14:29 +00:00
Craig Topper
31854ba017
Fix VEX disassembling to ignore REX.RXBW bits in 32-bit mode.
...
llvm-svn: 140993
2011-10-03 07:51:09 +00:00
Craig Topper
21c33657d6
Special case disassembler handling of REX.B prefix on NOP instruction to decode as XCHG R8D, EAX instead. Fixes PR10344.
...
llvm-svn: 140971
2011-10-02 16:56:09 +00:00
Craig Topper
88cb33e0d4
Fix disassembler handling of CRC32 which is an odd instruction that uses 0xf2 as an opcode extension and allows the opsize prefix. This necessitated adding IC_XD_OPSIZE and IC_64BIT_XD_OPSIZE contexts. Unfortunately, this increases the size of the disassembler tables. Fixes PR10702.
...
llvm-svn: 140954
2011-10-01 19:54:56 +00:00
Craig Topper
45faba98b4
Fix VEX decoding in i386 mode. Fixes PR11008.
...
llvm-svn: 140515
2011-09-26 05:12:43 +00:00
Benjamin Kramer
e5e189f669
X86Disassembler: if verbose logging is going to nulls(), disable logging completely.
...
Otherwise we'll spend a ridiculous amount of time pretty printing debug output and then discarding it.
llvm-svn: 140276
2011-09-21 21:47:35 +00:00