PowerPC NCG: support conditional branches outside +-32KB
authorwolfgang.thaller@gmx.net <unknown>
Wed, 13 Dec 2006 13:38:08 +0000 (13:38 +0000)
committerwolfgang.thaller@gmx.net <unknown>
Wed, 13 Dec 2006 13:38:08 +0000 (13:38 +0000)
commite4c8d2b11b4be71885532cb14434511b6c47866c
treeee8388a3d4b516444f867d8c4fb826a9264db394
parent4307b489da14ddd13c85fe837c5f27bf991c312e
PowerPC NCG: support conditional branches outside +-32KB

Work around the PowerPC architecture's +-32KB limitation for conditional
branches by conditionally skipping an unconditional branch instead
(unconditional branches have a +-32MB range).

This requires an extra pass over the basic blocks for each CmmTop after
block sequencing, to determine which branches are "far".

Fixes ticket #709, "Fixup too large" error with -fasm on PowerPC
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/MachInstrs.hs
compiler/nativeGen/PprMach.hs
compiler/nativeGen/RegAllocInfo.hs