1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Go to file
Vedant Kumar 89ece8e139 [llvm-mc] Ignore opcode size prefix in 64-bit CALL disassembly
This is a fix for disassembling unusual instruction sequences in 64-bit
mode w.r.t the CALL rel16 instruction. It might be desirable to move the
check somewhere else, but it essentially mimics the special case
handling with JCXZ in 16-bit mode.

The current behavior accepts the opcode size prefix and causes the
call's immediate to stop disassembling after 2 bytes. When debugging
sequences of instructions with this pattern, the disassembler output
becomes extremely unreliable and essentially useless (if you jump midway
into what lldb thinks is a unified instruction, you'll lose %rip). So we
ignore the prefix and consume all 4 bytes when disassembling a 64-bit
mode binary.

Note: in Vol. 2A 3-99 the Intel spec states that CALL rel16 is N.S. N.S.
is defined as:

    Indicates an instruction syntax that requires an address override
    prefix in 64-bit mode and is not supported. Using an address
    override prefix in 64-bit mode may result in model-specific
    execution behavior. (Vol. 2A 3-7)

Since 0x66 is an operand override prefix we should be OK (although we
may want to warn about 0x67 prefixes to 0xe8). On the CPUs I tested
with, they all ignore the 0x66 prefix in 64-bit mode.

Patch by Matthew Barney!

Differential Revision: http://reviews.llvm.org/D9573

llvm-svn: 246038
2015-08-26 16:20:29 +00:00
autoconf Add an exposed variable for which c++ compiler we're using for our 2015-08-17 22:46:26 +00:00
bindings [PM/AA] Remove the last relics of the separate IPA library from LLVM, 2015-08-18 17:51:53 +00:00
cmake [cmake] Pass /manifest:no to the linker when asan is enabled 2015-08-25 16:06:40 +00:00
docs Big Kaleidoscope tutorial update. 2015-08-26 03:07:41 +00:00
examples Kaleidoscope: Update libdeps corresponding to r246002. 2015-08-26 08:05:55 +00:00
include [SROA] Rip out all support for SSAUpdater in SROA. 2015-08-26 09:09:29 +00:00
lib [llvm-mc] Ignore opcode size prefix in 64-bit CALL disassembly 2015-08-26 16:20:29 +00:00
projects build: make libunwind a proper project 2015-04-25 01:47:39 +00:00
resources In MSVC builds embed a VERSIONINFO resource in our exe and DLL files. 2015-06-12 15:58:29 +00:00
test [llvm-mc] Ignore opcode size prefix in 64-bit CALL disassembly 2015-08-26 16:20:29 +00:00
tools [llvm-objdump] Use the new MinVersion API introduced in r245938. NFC. 2015-08-26 12:26:11 +00:00
unittests AsmParser: Save and restore the parsing state for types using SlotMapping. 2015-08-21 21:32:39 +00:00
utils [lit] Speculatively fix PR24554 by manually closing the process handle 2015-08-25 16:07:06 +00:00
.arcconfig Updated phabricator server. 2014-04-07 03:57:04 +00:00
.clang-format Test commit. 2014-03-02 13:08:46 +00:00
.clang-tidy Enable display of compiler diagnostics in clang-tidy by default. 2014-10-29 17:29:38 +00:00
.gitignore Minor updates to gitignore so that symlinks are ignored in the projects dir. 2015-07-07 20:24:58 +00:00
CMakeLists.txt [lit] Don't disable the lit progress bar by default with MSVC 2015-08-11 21:24:59 +00:00
CODE_OWNERS.TXT Add myself as the InstCombine owner. 2015-08-12 22:30:45 +00:00
configure Add an exposed variable for which c++ compiler we're using for our 2015-08-17 22:46:26 +00:00
CREDITS.TXT [WebAssembly] Initial WebAssembly backend 2015-06-29 23:51:55 +00:00
LICENSE.TXT Update for a new year. 2015-03-12 01:25:29 +00:00
llvm.spec.in [Sparc] Implement i64 load/store support for 32-bit sparc. 2015-08-10 19:11:39 +00:00
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile [configure/make] Propagate names of build host tools when making BuildTools 2014-03-25 21:45:41 +00:00
Makefile.common
Makefile.config.in We're actually -Wmissing-field-initializers clean thanks to the cmake 2015-08-07 16:44:47 +00:00
Makefile.rules We're actually -Wmissing-field-initializers clean thanks to the cmake 2015-08-07 16:44:47 +00:00
README.txt Revert test commit at revision 233535. 2015-03-30 12:39:03 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.