Skip to content
GitLab
Menu
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
1fb91a52
Commit
1fb91a52
authored
Jun 29, 2005
by
simonmar
Browse files
[project @ 2005-06-29 08:47:21 by simonmar]
Make it compile on Alpha.
parent
9c1b774a
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/typecheck/TcForeign.lhs
View file @
1fb91a52
...
...
@@ -29,8 +29,8 @@ import ForeignCall ( CCallConv(..) )
import ErrUtils ( Message )
import Id ( Id, mkLocalId, mkExportedLocalId )
#if alpha_TARGET_ARCH
import PrimRep ( getPrimRepSize, isFloatingRep )
import Type ( typePrimRep )
import SMRep ( argMachRep, primRepToCgRep, primRepHint )
#endif
import OccName ( mkForeignExportOcc )
import Name ( Name, NamedThing(..), mkExternalName )
...
...
@@ -52,7 +52,7 @@ import SrcLoc ( Located(..), srcSpanStart )
import Bag ( consBag )
#if alpha_TARGET_ARCH
import MachOp ( machRepByteWidth )
import MachOp ( machRepByteWidth
, MachHint(FloatHint)
)
#endif
\end{code}
...
...
@@ -185,10 +185,10 @@ The check is needed for both via-C and native-code routes
checkFEDArgs arg_tys
= check (integral_args <= 32) err
where
integral_args = sum [ machRepByteWidth rep
|
(rep,hint)
<- map type
MachRep
Rep arg_tys,
hint
/= FloatHint ]
err = ptext SLIT("On Alpha, I can only handle
4
non-floating-point arguments to foreign export dynamic")
integral_args = sum [
(
machRepByteWidth
. argMachRep . primRepToCgRep) prim_
rep
|
prim_rep
<- map type
Prim
Rep arg_tys,
primRepHint prim_rep
/= FloatHint ]
err = ptext SLIT("On Alpha, I can only handle
32 bytes of
non-floating-point arguments to foreign export dynamic")
#else
checkFEDArgs arg_tys = returnM ()
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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