summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCInstrInfo.td
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-05-17 14:14:12 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-05-17 14:14:12 +0000
commit4456a8ec76bba1148f64bb2707e18b980eda291e (patch)
tree329b91ac01b5bd3ce27154ebca08f2778a58570c /lib/Target/PowerPC/PPCInstrInfo.td
parente152eac63efa836cbb109d79e4307516fa16f1a6 (diff)
downloadllvm-4456a8ec76bba1148f64bb2707e18b980eda291e.tar.gz
llvm-4456a8ec76bba1148f64bb2707e18b980eda291e.tar.bz2
llvm-4456a8ec76bba1148f64bb2707e18b980eda291e.tar.xz
[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
Diffstat (limited to 'lib/Target/PowerPC/PPCInstrInfo.td')
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.td4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td
index e87fa8f342..16a102f6a2 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/lib/Target/PowerPC/PPCInstrInfo.td
@@ -458,12 +458,12 @@ def aaddr : Operand<iPTR> {
}
def symbolHi: Operand<i32> {
let PrintMethod = "printSymbolHi";
- let EncoderMethod = "getHA16Encoding";
+ let EncoderMethod = "getS16ImmEncoding";
let ParserMatchClass = PPCS16ImmAsmOperand;
}
def symbolLo: Operand<i32> {
let PrintMethod = "printSymbolLo";
- let EncoderMethod = "getLO16Encoding";
+ let EncoderMethod = "getS16ImmEncoding";
let ParserMatchClass = PPCS16ImmAsmOperand;
}
def PPCCRBitMaskOperand : AsmOperandClass {