llvm-6502/lib
Ulrich Weigand b1cf8de85a [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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181891 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15 15:01:46 +00:00
..
Analysis Use only explicit bool conversion operators 2013-05-15 07:36:59 +00:00
Archive
AsmParser Add ArrayRef constructor from None, and do the cleanups that this constructor enables 2013-05-05 00:40:33 +00:00
Bitcode Micro-optimization: don't shift an entire bitcode record over to get the code. 2013-05-10 22:17:10 +00:00
CodeGen Use only explicit bool conversion operators 2013-05-15 07:36:59 +00:00
DebugInfo libDebugInfo depends on libObject nowadays. 2013-05-09 13:48:26 +00:00
ExecutionEngine SectionMemoryManager shouldn't be a JITMemoryManager. Previously, the 2013-05-14 19:29:00 +00:00
IR Speed up Value::isUsedInBasicBlock() for long use lists. 2013-05-14 23:45:56 +00:00
IRReader
Linker Fix a performance bug in the Linker. 2013-05-04 05:05:18 +00:00
MC Fix two typo 2013-05-14 23:36:24 +00:00
Object Object: Fix Mach-O relocation printing. 2013-05-14 22:41:29 +00:00
Option
Support Fix build on Windows 2013-05-15 09:00:30 +00:00
TableGen
Target [PowerPC] Correctly handle fixups of other than 4 byte size 2013-05-15 15:01:46 +00:00
Transforms LoopVectorize: Fix comments 2013-05-15 02:02:45 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile