Encode pc-relative conditional branch offset as pc+(num of bytes / 4). The
authorEvan Cheng <evan.cheng@apple.com>
Fri, 25 Aug 2006 21:54:44 +0000 (21:54 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 25 Aug 2006 21:54:44 +0000 (21:54 +0000)
commitb9ca92661cf145bfb3bd9705e5629fc5f411a42f
tree7c03a75029f32964ac39fd060e4d80e1de5f9d3e
parent05545755676b9ff35d244e55d749a15e28bb228b
Encode pc-relative conditional branch offset as pc+(num of bytes / 4). The
asm printer will print it as offset*4. e.g. bne cr0, $+8.

The PPC code emitter was expecting the offset to be number of instructions, not
number of bytes. This fixes a whole bunch of JIT failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29885 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCAsmPrinter.cpp
lib/Target/PowerPC/PPCBranchSelector.cpp