1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
llvm-mirror/lib
Richard Sandiford 4850b2341b [SystemZ] Rework handling of constant PC-relative operands
The GNU assembler treats things like:

        brasl   %r14, 100

in the same way as:

        brasl   %r14, .+100

rather than as a branch to absolute address 100.  We implemented this in
LLVM by creating an immediate operand rather than the usual expr operand,
and by handling immediate operands specially in the code emitter.
This was undesirable for (at least) three reasons:

- the specialness of immediate operands was exposed to the backend MC code,
  rather than being limited to the assembler parser.

- in disassembly, an immediate operand really is an absolute address.
  (Note that this means reassembling printed disassembly can't recreate
  the original code.)

- it would interfere with any assembly manipulation that we might
  try in future.  E.g. operations like branch shortening can change
  the relative position of instructions, but any code that updates
  sym+offset addresses wouldn't update an immediate "100" operand
  in the same way as an explicit ".+100" operand.

This patch changes the implementation so that the assembler creates
a "." label for immediate PC-relative operands, so that the operand
to the MCInst is always the absolute address.  The patch also adds
some error checking of the offset.

llvm-svn: 181773
2013-05-14 09:47:26 +00:00
..
Analysis Fix unchecked uses of DominatorTree in MemoryDependenceAnalysis. 2013-05-06 02:07:24 +00:00
Archive Fix auto_ptr is deprecated warnings 2013-02-26 21:20:35 +00:00
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 StackColoring: don't clear an instruction's mem operand if the underlying 2013-05-14 01:42:44 +00:00
DebugInfo libDebugInfo depends on libObject nowadays. 2013-05-09 13:48:26 +00:00
ExecutionEngine Remove dead code. 2013-05-10 23:34:51 +00:00
IR PR14492: Debug Info: Support for values of non-integer non-type template parameters. 2013-05-10 21:52:07 +00:00
IRReader Measure time that IR parsing took as part of the -time-passes measurement. 2013-04-03 15:33:45 +00:00
Linker Fix a performance bug in the Linker. 2013-05-04 05:05:18 +00:00
MC Remove the MachineMove class. 2013-05-13 01:16:13 +00:00
Object Change getRelocationAdditionalInfo to be ELF only. 2013-05-09 03:39:05 +00:00
Option
Support Fix a bug that APFloat::fusedMultiplyAdd() mistakenly evaluate "14.5f * -14.5f + 225.0f" to 225.0f. 2013-05-13 18:03:12 +00:00
TableGen Allow TableGen DAG arguments to be just a name. 2013-03-24 19:36:51 +00:00
Target [SystemZ] Rework handling of constant PC-relative operands 2013-05-14 09:47:26 +00:00
Transforms Removed trailing whitespace. 2013-05-14 06:40:10 +00:00
CMakeLists.txt Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00
LLVMBuild.txt Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00
Makefile Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00