1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/Target/PowerPC/MCTargetDesc
Ulrich Weigand 08f27cb2c6 [PowerPC] Correctly handle fixups of other than 4 byte size
The PPCAsmBackend::applyFixup routine handles the case where a
fixup can be resolved within the same object file.  However,
this routine is currently hard-coded to assume the size of
any fixup is always exactly 4 bytes.

This is sort-of correct for fixups on instruction text; even
though it only works because several of what really would be
2-byte fixups are presented as 4-byte fixups instead (requiring
another hack in PPCELFObjectWriter::adjustFixupOffset to clean
it up).

However, this assumption breaks down completely for fixups
on data, which legitimately can be of any size (1, 2, 4, or 8).

This patch makes applyFixup aware of fixups of varying sizes,
introducing a new helper routine getFixupKindNumBytes (along
the lines of what the ARM back end does).  Note that in order
to handle fixups of size 8, we also need to fix the return type
of adjustFixupValue to uint64_t to avoid truncation.

Tested on both 64-bit and 32-bit PowerPC, using external and
integrated assembler.

llvm-svn: 181891
2013-05-15 15:01:46 +00:00
..
CMakeLists.txt Fix cmake. 2011-12-22 02:06:17 +00:00
LLVMBuild.txt
Makefile
PPCAsmBackend.cpp [PowerPC] Correctly handle fixups of other than 4 byte size 2013-05-15 15:01:46 +00:00
PPCELFObjectWriter.cpp [PowerPC] Fix regression in generating @ha/@l relocs 2013-05-08 17:50:07 +00:00
PPCFixupKinds.h PowerPC: Simplify handling of fixups. 2013-03-26 10:56:47 +00:00
PPCMCAsmInfo.cpp Fix powerpc test failure - forgot to initialize stack slot size for PPCLinuxMCAsmInfo 2013-01-23 17:12:15 +00:00
PPCMCAsmInfo.h Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC, PTX, Sparc, X86, XCore. 2012-02-18 12:03:15 +00:00
PPCMCCodeEmitter.cpp PPC: Use HWEncoding and TRI->getEncodingValue 2013-03-26 20:08:20 +00:00
PPCMCTargetDesc.cpp Remove the MachineMove class. 2013-05-13 01:16:13 +00:00
PPCMCTargetDesc.h To avoid symbol clash, undefine PPC here. PPC may be predefined on some hosts. 2013-03-17 12:40:42 +00:00
PPCPredicates.cpp Move PPC getSwappedPredicate for reuse 2013-04-20 05:16:26 +00:00
PPCPredicates.h Move PPC getSwappedPredicate for reuse 2013-04-20 05:16:26 +00:00