Go to file
Richard Sandiford 1fb5883d77 [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
clang Fix clang-format bug in unwrapped-line merging. 2013-05-14 09:30:02 +00:00
clang-tools-extra cpp11-migrate: Fix crash in AddOverride due to template instantiations 2013-05-10 14:04:58 +00:00
compiler-rt [tsan] fix gcc build with -Wall 2013-05-14 08:26:55 +00:00
debuginfo-tests Remove IR scenario tests. 2013-03-15 20:52:10 +00:00
libclc Update the copyright coredits -- Happy new year 2013! 2013-01-01 10:00:19 +00:00
libcxx Fixing the MSan/compiler-rt build 2013-05-13 21:53:44 +00:00
libcxxabi Add capability to demangle invocation functions for ObjC blocks. 2013-04-10 19:44:03 +00:00
lld [lld][LayoutPass] Fix a bug that caused buildbot to fail on some platforms. 2013-05-14 01:51:56 +00:00
lldb A few more small tweaks to arm core file handling. 2013-05-14 04:50:47 +00:00
llvm [SystemZ] Rework handling of constant PC-relative operands 2013-05-14 09:47:26 +00:00
polly Sort includes 2013-05-07 08:11:54 +00:00