Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
9e460664
Commit
9e460664
authored
Apr 08, 2013
by
Gabor Greif
💬
Browse files
There can be several blocks in a PPC/ELF cmm proc
add FETCHPC to all of them (this fixes
#7814
).
parent
a4433030
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/nativeGen/PIC.hs
View file @
9e460664
...
...
@@ -710,16 +710,23 @@ initializePicBase_ppc ArchPPC os picReg
(
PPC
.
ImmCLbl
gotOffLabel
)
(
PPC
.
ImmCLbl
mkPicBaseLabel
)
BasicBlock
bID
insns
=
head
blocks
blocks'
=
case
blocks
of
[]
->
[]
(
b
:
bs
)
->
fetchPC
b
:
map
maybeFetchPC
bs
b'
=
BasicBlock
bID
(
PPC
.
FETCHPC
picReg
:
PPC
.
LD
PPC
.
archWordSize
tmp
(
PPC
.
AddrRegImm
picReg
offsetToOffset
)
:
PPC
.
ADD
picReg
picReg
(
PPC
.
RIReg
tmp
)
:
insns
)
maybeFetchPC
b
@
(
BasicBlock
bID
_
)
|
bID
`
mapMember
`
info
=
fetchPC
b
|
otherwise
=
b
fetchPC
(
BasicBlock
bID
insns
)
=
BasicBlock
bID
(
PPC
.
FETCHPC
picReg
:
PPC
.
LD
PPC
.
archWordSize
tmp
(
PPC
.
AddrRegImm
picReg
offsetToOffset
)
:
PPC
.
ADD
picReg
picReg
(
PPC
.
RIReg
tmp
)
:
insns
)
return
(
CmmProc
info
lab
live
(
ListGraph
blocks'
)
:
gotOffset
:
statics
)
return
(
CmmProc
info
lab
live
(
ListGraph
(
b'
:
tail
blocks
))
:
gotOffset
:
statics
)
initializePicBase_ppc
ArchPPC
OSDarwin
picReg
(
CmmProc
info
lab
live
(
ListGraph
blocks
)
:
statics
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment