X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FnativeGen%2FStixMacro.lhs;h=6f4a5d15103e6f3117a8deb49953276affcf6bb3;hb=317a1fd9a021218f7ef4fbd35783186ab7329901;hp=eb49df231c8551a2a1a4c6af461663984e6cdf03;hpb=963cf41182a705b0bb2f6dee66fd17566ae65173;p=ghc-hetmet.git diff --git a/ghc/compiler/nativeGen/StixMacro.lhs b/ghc/compiler/nativeGen/StixMacro.lhs index eb49df2..6f4a5d1 100644 --- a/ghc/compiler/nativeGen/StixMacro.lhs +++ b/ghc/compiler/nativeGen/StixMacro.lhs @@ -10,17 +10,15 @@ module StixMacro ( macroCode, checkCode ) where import {-# SOURCE #-} StixPrim ( amodeToStix ) -import MachMisc import MachRegs -import AbsCSyn ( CStmtMacro(..), MagicId(..), CAddrMode, tagreg, +import AbsCSyn ( CStmtMacro(..), CAddrMode, tagreg, CCheckMacro(..) ) -import Constants ( uF_RET, uF_SU, uF_UPDATEE, uF_SIZE, sEQ_FRAME_SIZE ) -import CallConv ( cCallConv ) +import Constants ( uF_RET, uF_SU, uF_UPDATEE, uF_SIZE ) +import ForeignCall ( CCallConv(..) ) import PrimOp ( PrimOp(..) ) import PrimRep ( PrimRep(..) ) import Stix import UniqSupply ( returnUs, thenUs, UniqSM ) -import Outputable import CLabel ( mkBlackHoleInfoTableLabel, mkIndStaticInfoLabel, mkIndInfoLabel, mkUpdInfoLabel, mkSeqInfoLabel, mkRtsGCEntryLabel, mkStgUpdatePAPLabel ) @@ -74,14 +72,13 @@ adding an indirection. macroCode UPD_CAF args = let [cafptr,bhptr] = map amodeToStix args + new_caf = StCall SLIT("newCAF") CCallConv VoidRep [cafptr] w0 = StInd PtrRep cafptr w1 = StInd PtrRep (StIndex PtrRep cafptr fixedHS) - blocking_queue = StInd PtrRep (StIndex PtrRep bhptr fixedHS) - a1 = StAssign PtrRep w0 ind_static_info - a2 = StAssign PtrRep w1 bhptr - a3 = StCall SLIT("newCAF") cCallConv VoidRep [cafptr] + a1 = StAssign PtrRep w1 bhptr + a2 = StAssign PtrRep w0 ind_static_info in - returnUs (\xs -> a1 : a2 : a3 : xs) + returnUs (\xs -> new_caf : a1 : a2 : xs) \end{code} ----------------------------------------------------------------------------- @@ -183,7 +180,7 @@ macroCode REGISTER_IMPORT [arg] macroCode REGISTER_FOREIGN_EXPORT [arg] = returnUs ( - \xs -> StCall SLIT("getStablePtr") cCallConv VoidRep [amodeToStix arg] + \xs -> StCall SLIT("getStablePtr") CCallConv VoidRep [amodeToStix arg] : xs ) @@ -215,8 +212,8 @@ stg_update_PAP = StCLbl mkStgUpdatePAPLabel updatePAP, stackOverflow :: StixTree -updatePAP = StJump stg_update_PAP -stackOverflow = StCall SLIT("StackOverflow") cCallConv VoidRep [] +updatePAP = StJump NoDestInfo stg_update_PAP +stackOverflow = StCall SLIT("StackOverflow") CCallConv VoidRep [] \end{code} ----------------------------------------------------------------------------- @@ -341,7 +338,7 @@ checkCode macro args assts mkStJump_to_GCentry :: String -> StixTree mkStJump_to_GCentry gcname -- | opt_Static - = StJump (StCLbl (mkRtsGCEntryLabel gcname)) + = StJump NoDestInfo (StCLbl (mkRtsGCEntryLabel gcname)) -- | otherwise -- it's in a different DLL -- = StJump (StInd PtrRep (StLitLbl True sdoc))