History log of /llvm-project/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp (Results 126 – 150 of 170)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-3.3.1-rc1
# 35fd7923 20-Jun-2013 Kevin Enderby <enderby@apple.com>

Update the X86 disassembler to use xacquire and xrelease when appropriate.

This is a bit tricky as the xacquire and xrelease hints use the same bytes,
0xf2 and 0xf3, as the repne and rep prefixes.

Update the X86 disassembler to use xacquire and xrelease when appropriate.

This is a bit tricky as the xacquire and xrelease hints use the same bytes,
0xf2 and 0xf3, as the repne and rep prefixes.

Fortunately llvm has different llvm MCInst Opcode enums for rep/xrelease
and repne/xacquire. So to make this work a boolean was added the
InternalInstruction struct as part of the Prefix state which is set with the
added logic in readPrefixes() when decoding an instruction to determine
if these prefix bytes are to be disassembled as xacquire or xrelease. Then
we let the matcher pick the normal prefix instructionID and we change the
Opcode after that when it is set into the MCInst being created.

rdar://11019859

llvm-svn: 184490

show more ...


Revision tags: llvmorg-3.3.0, llvmorg-3.3.0-rc3
# ad1084de 24-May-2013 Ahmed Bougacha <ahmed.bougacha@gmail.com>

Add MCSymbolizer for symbolic/annotated disassembly.

This is a basic first step towards symbolization of disassembled
instructions. This used to be done using externally provided (C API)
callbacks.

Add MCSymbolizer for symbolic/annotated disassembly.

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

show more ...


Revision tags: llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1, llvmorg-3.2.0
# e3d32305 19-Dec-2012 Roman Divacky <rdivacky@freebsd.org>

Remove edis - the enhanced disassembler. Fixes PR14654.

llvm-svn: 170578


Revision tags: llvmorg-3.2.0-rc3
# ed0881b2 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com>

Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module

Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

llvm-svn: 169131

show more ...


Revision tags: llvmorg-3.2.0-rc2, llvmorg-3.2.0-rc1
# 6792380e 05-Sep-2012 Roman Divacky <rdivacky@freebsd.org>

Use const properly so that we dont remove const qualifier from region and MII
by casting. Found with gcc48.

llvm-svn: 163247


# c30fdbc4 31-Aug-2012 Craig Topper <craig.topper@gmail.com>

Add support for converting llvm.fma to fma4 instructions.

llvm-svn: 162999


# b8aec088 01-Aug-2012 Craig Topper <craig.topper@gmail.com>

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 th

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

show more ...


# 216ac319 24-Jul-2012 Kevin Enderby <enderby@apple.com>

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 instructio

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

show more ...


# ea6397f6 19-Jul-2012 Bill Wendling <isanbard@gmail.com>

Remove tabs.

llvm-svn: 160477


# 98a5bf24 29-Jun-2012 Manman Ren <mren@apple.com>

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

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

show more ...


# a0982041 26-Jun-2012 Manman Ren <mren@apple.com>

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

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

show more ...


Revision tags: llvmorg-3.1.0, llvmorg-3.1.0-rc3, llvmorg-3.1.0-rc2
# ec4bd312 18-Apr-2012 Kevin Enderby <enderby@apple.com>

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 X86Disassemb

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

show more ...


Revision tags: llvmorg-3.1.0-rc1
# 6dedbae4 04-Mar-2012 Craig Topper <craig.topper@gmail.com>

Use uint8_t instead of enums to store values in X86 disassembler table. Shaves 150k off the size of X86DisassemblerDecoder.o

llvm-svn: 151995


# b119c08a 29-Feb-2012 Kevin Enderby <enderby@apple.com>

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

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

show more ...


# 56b662ce 29-Feb-2012 Derek Schuff <dschuff@google.com>

Make MemoryObject accessor members const again

llvm-svn: 151687


# 6fbcd8d4 23-Feb-2012 Kevin Enderby <enderby@apple.com>

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

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

show more ...


# b22310fd 18-Feb-2012 Jia Liu <proljc@gmail.com>

Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC, PTX, Sparc, X86, XCore.

llvm-svn: 150878


# 428704eb 11-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com>

Make the EDis tables const.

llvm-svn: 150304


# 478e8de8 11-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com>

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.

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

show more ...


# 8b2dcad4 06-Feb-2012 Derek Schuff <dschuff@google.com>

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


# b8b1b4c1 21-Dec-2011 Craig Topper <craig.topper@gmail.com>

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.

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

show more ...


# a379b181 20-Dec-2011 David Blaikie <dblaikie@gmail.com>

Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch

llvm-svn: 146960


Revision tags: llvmorg-3.0.0, llvmorg-3.0.0-rc4, llvmorg-3.0.0-rc3, llvmorg-3.0.0-rc2, llvmorg-3.0.0-rc1
# e5e189f6 21-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com>

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:

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

show more ...


# a0c3b972 15-Sep-2011 Owen Anderson <resistor@mac.com>

Don't attach annotations to MCInst's. Instead, have the disassembler return, and the printer accept, an annotation string which can be passed through if the client cares about annotations.

llvm-svn

Don't attach annotations to MCInst's. Instead, have the disassembler return, and the printer accept, an annotation string which can be passed through if the client cares about annotations.

llvm-svn: 139876

show more ...


# 96e00e5a 14-Sep-2011 Craig Topper <craig.topper@gmail.com>

Make disassembling of VBLEND* print immediate as a XMM/YMM register name. Fixes PR10917.

llvm-svn: 139690


1234567