Commit 67029f20 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

PPC: Fix loads of PIC data with > 16 bit offsets (#7830).

Loads should now handle up to 32 bit offsets.
parent af6746fb
...@@ -728,9 +728,10 @@ initializePicBase_ppc ArchPPC os picReg ...@@ -728,9 +728,10 @@ initializePicBase_ppc ArchPPC os picReg
fetchPC (BasicBlock bID insns) = fetchPC (BasicBlock bID insns) =
BasicBlock bID (PPC.FETCHPC picReg BasicBlock bID (PPC.FETCHPC picReg
: PPC.ADDIS tmp picReg (PPC.HI offsetToOffset)
: PPC.LD PPC.archWordSize tmp : PPC.LD PPC.archWordSize tmp
(PPC.AddrRegImm picReg offsetToOffset) (PPC.AddrRegImm tmp (PPC.LO offsetToOffset))
: PPC.ADD picReg picReg (PPC.RIReg tmp) : PPC.ADD picReg picReg (PPC.RIReg picReg)
: insns) : insns)
return (CmmProc info lab live (ListGraph blocks') : gotOffset : statics) return (CmmProc info lab live (ListGraph blocks') : gotOffset : statics)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment