OSDN Git Service

[PowerPC] Fix hi/lo encoding in old-style code emitter
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 17 May 2013 14:14:12 +0000 (14:14 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 17 May 2013 14:14:12 +0000 (14:14 +0000)
commit4456a8ec76bba1148f64bb2707e18b980eda291e
tree329b91ac01b5bd3ce27154ebca08f2778a58570c
parente152eac63efa836cbb109d79e4307516fa16f1a6
[PowerPC] Fix hi/lo encoding in old-style code emitter

This patch implements the equivalent change to r182091/r182092
in the old-style code emitter.  Instead of having two separate
16-bit immediate encoding routines depending on the instruction,
this patch introduces a single encoder that checks the machine
operand flags to decide whether the low or high half of a
symbol address is required.

Since now both encoders make no further distinction between
"symbolLo" and "symbolHi", the .td operand can now use a
single getS16ImmEncoding method.

Tested by running the old-style JIT tests on 32-bit Linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182097 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
lib/Target/PowerPC/PPCCodeEmitter.cpp
lib/Target/PowerPC/PPCInstr64Bit.td
lib/Target/PowerPC/PPCInstrInfo.td