module GHC.Cmm.CallConv (
ParamLocation(..),
assignArgumentsPos,
assignStack,
realArgRegsCover
) where
import GHC.Prelude
import GHC.Cmm.Expr
import GHC.Runtime.Heap.Layout
import GHC.Cmm (Convention(..))
import GHC.Cmm.Ppr ()
import GHC.Driver.Session
import GHC.Platform
import GHC.Utils.Outputable
data ParamLocation
= RegisterParam GlobalReg
| StackParam ByteOff
instance Outputable ParamLocation where
ppr :: ParamLocation -> SDoc
ppr (RegisterParam GlobalReg
g) = GlobalReg -> SDoc
forall a. Outputable a => a -> SDoc
ppr GlobalReg
g
ppr (StackParam ByteOff
p) = ByteOff -> SDoc
forall a. Outputable a => a -> SDoc
ppr ByteOff
p
assignArgumentsPos :: DynFlags
-> ByteOff
-> Convention
-> (a -> CmmType)
-> [a]
-> (
ByteOff
, [(a, ParamLocation)]
)
assignArgumentsPos :: DynFlags
-> ByteOff
-> Convention
-> (a -> CmmType)
-> [a]
-> (ByteOff, [(a, ParamLocation)])
assignArgumentsPos DynFlags
dflags ByteOff
off Convention
conv a -> CmmType
arg_ty [a]
reps = (ByteOff
stk_off, [(a, ParamLocation)]
assignments)
where
platform :: Platform
platform = DynFlags -> Platform
targetPlatform DynFlags
dflags
regs :: AvailRegs
regs = case ([a]
reps, Convention
conv) of
([a]
_, Convention
NativeNodeCall) -> DynFlags -> AvailRegs
getRegsWithNode DynFlags
dflags
([a]
_, Convention
NativeDirectCall) -> DynFlags -> AvailRegs
getRegsWithoutNode DynFlags
dflags
([a
_], Convention
NativeReturn) -> DynFlags -> AvailRegs
allRegs DynFlags
dflags
([a]
_, Convention
NativeReturn) -> DynFlags -> AvailRegs
getRegsWithNode DynFlags
dflags
([a]
_, Convention
GC) -> DynFlags -> AvailRegs
allRegs DynFlags
dflags
([a]
_, Convention
Slow) -> AvailRegs
nodeOnly
([(a, ParamLocation)]
reg_assts, [a]
stk_args) = [(a, ParamLocation)]
-> [a] -> AvailRegs -> ([(a, ParamLocation)], [a])
assign_regs [] [a]
reps AvailRegs
regs
(ByteOff
stk_off, [(a, ParamLocation)]
stk_assts) = Platform
-> ByteOff
-> (a -> CmmType)
-> [a]
-> (ByteOff, [(a, ParamLocation)])
forall a.
Platform
-> ByteOff
-> (a -> CmmType)
-> [a]
-> (ByteOff, [(a, ParamLocation)])
assignStack Platform
platform ByteOff
off a -> CmmType
arg_ty [a]
stk_args
assignments :: [(a, ParamLocation)]
assignments = [(a, ParamLocation)]
reg_assts [(a, ParamLocation)]
-> [(a, ParamLocation)] -> [(a, ParamLocation)]
forall a. [a] -> [a] -> [a]
++ [(a, ParamLocation)]
stk_assts
assign_regs :: [(a, ParamLocation)]
-> [a] -> AvailRegs -> ([(a, ParamLocation)], [a])
assign_regs [(a, ParamLocation)]
assts [] AvailRegs
_ = ([(a, ParamLocation)]
assts, [])
assign_regs [(a, ParamLocation)]
assts (a
r:[a]
rs) AvailRegs
regs | CmmType -> Bool
isVecType CmmType
ty = ([(a, ParamLocation)], [a])
vec
| CmmType -> Bool
isFloatType CmmType
ty = ([(a, ParamLocation)], [a])
float
| Bool
otherwise = ([(a, ParamLocation)], [a])
int
where vec :: ([(a, ParamLocation)], [a])
vec = case (Width
w, AvailRegs
regs) of
(Width
W128, ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, ByteOff
s:[ByteOff]
ss))
| Width -> DynFlags -> Bool
passVectorInReg Width
W128 DynFlags
dflags -> (ParamLocation, AvailRegs) -> ([(a, ParamLocation)], [a])
k (GlobalReg -> ParamLocation
RegisterParam (ByteOff -> GlobalReg
XmmReg ByteOff
s), ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss))
(Width
W256, ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, ByteOff
s:[ByteOff]
ss))
| Width -> DynFlags -> Bool
passVectorInReg Width
W256 DynFlags
dflags -> (ParamLocation, AvailRegs) -> ([(a, ParamLocation)], [a])
k (GlobalReg -> ParamLocation
RegisterParam (ByteOff -> GlobalReg
YmmReg ByteOff
s), ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss))
(Width
W512, ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, ByteOff
s:[ByteOff]
ss))
| Width -> DynFlags -> Bool
passVectorInReg Width
W512 DynFlags
dflags -> (ParamLocation, AvailRegs) -> ([(a, ParamLocation)], [a])
k (GlobalReg -> ParamLocation
RegisterParam (ByteOff -> GlobalReg
ZmmReg ByteOff
s), ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss))
(Width, AvailRegs)
_ -> ([(a, ParamLocation)]
assts, (a
ra -> [a] -> [a]
forall a. a -> [a] -> [a]
:[a]
rs))
float :: ([(a, ParamLocation)], [a])
float = case (Width
w, AvailRegs
regs) of
(Width
W32, ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, ByteOff
s:[ByteOff]
ss))
| Bool
passFloatInXmm -> (ParamLocation, AvailRegs) -> ([(a, ParamLocation)], [a])
k (GlobalReg -> ParamLocation
RegisterParam (ByteOff -> GlobalReg
FloatReg ByteOff
s), ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss))
(Width
W32, ([VGcPtr -> GlobalReg]
vs, GlobalReg
f:[GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss))
| Bool -> Bool
not Bool
passFloatInXmm -> (ParamLocation, AvailRegs) -> ([(a, ParamLocation)], [a])
k (GlobalReg -> ParamLocation
RegisterParam GlobalReg
f, ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss))
(Width
W64, ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, ByteOff
s:[ByteOff]
ss))
| Bool
passFloatInXmm -> (ParamLocation, AvailRegs) -> ([(a, ParamLocation)], [a])
k (GlobalReg -> ParamLocation
RegisterParam (ByteOff -> GlobalReg
DoubleReg ByteOff
s), ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss))
(Width
W64, ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, GlobalReg
d:[GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss))
| Bool -> Bool
not Bool
passFloatInXmm -> (ParamLocation, AvailRegs) -> ([(a, ParamLocation)], [a])
k (GlobalReg -> ParamLocation
RegisterParam GlobalReg
d, ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss))
(Width, AvailRegs)
_ -> ([(a, ParamLocation)]
assts, (a
ra -> [a] -> [a]
forall a. a -> [a] -> [a]
:[a]
rs))
int :: ([(a, ParamLocation)], [a])
int = case (Width
w, AvailRegs
regs) of
(Width
W128, AvailRegs
_) -> String -> ([(a, ParamLocation)], [a])
forall a. String -> a
panic String
"W128 unsupported register type"
(Width
_, (VGcPtr -> GlobalReg
v:[VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss)) | Width -> ByteOff
widthInBits Width
w ByteOff -> ByteOff -> Bool
forall a. Ord a => a -> a -> Bool
<= Width -> ByteOff
widthInBits (Platform -> Width
wordWidth Platform
platform)
-> (ParamLocation, AvailRegs) -> ([(a, ParamLocation)], [a])
k (GlobalReg -> ParamLocation
RegisterParam (VGcPtr -> GlobalReg
v VGcPtr
gcp), ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss))
(Width
_, ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, GlobalReg
l:[GlobalReg]
ls, [ByteOff]
ss)) | Width -> ByteOff
widthInBits Width
w ByteOff -> ByteOff -> Bool
forall a. Ord a => a -> a -> Bool
> Width -> ByteOff
widthInBits (Platform -> Width
wordWidth Platform
platform)
-> (ParamLocation, AvailRegs) -> ([(a, ParamLocation)], [a])
k (GlobalReg -> ParamLocation
RegisterParam GlobalReg
l, ([VGcPtr -> GlobalReg]
vs, [GlobalReg]
fs, [GlobalReg]
ds, [GlobalReg]
ls, [ByteOff]
ss))
(Width, AvailRegs)
_ -> ([(a, ParamLocation)]
assts, (a
ra -> [a] -> [a]
forall a. a -> [a] -> [a]
:[a]
rs))
k :: (ParamLocation, AvailRegs) -> ([(a, ParamLocation)], [a])
k (ParamLocation
asst, AvailRegs
regs') = [(a, ParamLocation)]
-> [a] -> AvailRegs -> ([(a, ParamLocation)], [a])
assign_regs ((a
r, ParamLocation
asst) (a, ParamLocation) -> [(a, ParamLocation)] -> [(a, ParamLocation)]
forall a. a -> [a] -> [a]
: [(a, ParamLocation)]
assts) [a]
rs AvailRegs
regs'
ty :: CmmType
ty = a -> CmmType
arg_ty a
r
w :: Width
w = CmmType -> Width
typeWidth CmmType
ty
gcp :: VGcPtr
gcp | CmmType -> Bool
isGcPtrType CmmType
ty = VGcPtr
VGcPtr
| Bool
otherwise = VGcPtr
VNonGcPtr
passFloatInXmm :: Bool
passFloatInXmm = Platform -> Bool
passFloatArgsInXmm Platform
platform
passFloatArgsInXmm :: Platform -> Bool
passFloatArgsInXmm :: Platform -> Bool
passFloatArgsInXmm Platform
platform = case Platform -> Arch
platformArch Platform
platform of
Arch
ArchX86_64 -> Bool
True
Arch
ArchX86 -> Bool
False
Arch
_ -> Bool
False
passVectorInReg :: Width -> DynFlags -> Bool
passVectorInReg :: Width -> DynFlags -> Bool
passVectorInReg Width
_ DynFlags
_ = Bool
True
assignStack :: Platform -> ByteOff -> (a -> CmmType) -> [a]
-> (
ByteOff
, [(a, ParamLocation)]
)
assignStack :: Platform
-> ByteOff
-> (a -> CmmType)
-> [a]
-> (ByteOff, [(a, ParamLocation)])
assignStack Platform
platform ByteOff
offset a -> CmmType
arg_ty [a]
args = ByteOff
-> [(a, ParamLocation)] -> [a] -> (ByteOff, [(a, ParamLocation)])
assign_stk ByteOff
offset [] ([a] -> [a]
forall a. [a] -> [a]
reverse [a]
args)
where
assign_stk :: ByteOff
-> [(a, ParamLocation)] -> [a] -> (ByteOff, [(a, ParamLocation)])
assign_stk ByteOff
offset [(a, ParamLocation)]
assts [] = (ByteOff
offset, [(a, ParamLocation)]
assts)
assign_stk ByteOff
offset [(a, ParamLocation)]
assts (a
r:[a]
rs)
= ByteOff
-> [(a, ParamLocation)] -> [a] -> (ByteOff, [(a, ParamLocation)])
assign_stk ByteOff
off' ((a
r, ByteOff -> ParamLocation
StackParam ByteOff
off') (a, ParamLocation) -> [(a, ParamLocation)] -> [(a, ParamLocation)]
forall a. a -> [a] -> [a]
: [(a, ParamLocation)]
assts) [a]
rs
where w :: Width
w = CmmType -> Width
typeWidth (a -> CmmType
arg_ty a
r)
off' :: ByteOff
off' = ByteOff
offset ByteOff -> ByteOff -> ByteOff
forall a. Num a => a -> a -> a
+ ByteOff
size
size :: ByteOff
size = Platform -> ByteOff -> ByteOff
roundUpToWords Platform
platform (Width -> ByteOff
widthInBytes Width
w)
type AvailRegs = ( [VGcPtr -> GlobalReg]
, [GlobalReg]
, [GlobalReg]
, [GlobalReg]
, [Int]
)
getRegsWithoutNode, getRegsWithNode :: DynFlags -> AvailRegs
getRegsWithoutNode :: DynFlags -> AvailRegs
getRegsWithoutNode DynFlags
dflags =
( ((VGcPtr -> GlobalReg) -> Bool)
-> [VGcPtr -> GlobalReg] -> [VGcPtr -> GlobalReg]
forall a. (a -> Bool) -> [a] -> [a]
filter (\VGcPtr -> GlobalReg
r -> VGcPtr -> GlobalReg
r VGcPtr
VGcPtr GlobalReg -> GlobalReg -> Bool
forall a. Eq a => a -> a -> Bool
/= GlobalReg
node) (DynFlags -> [VGcPtr -> GlobalReg]
realVanillaRegs DynFlags
dflags)
, DynFlags -> [GlobalReg]
realFloatRegs DynFlags
dflags
, DynFlags -> [GlobalReg]
realDoubleRegs DynFlags
dflags
, DynFlags -> [GlobalReg]
realLongRegs DynFlags
dflags
, DynFlags -> [ByteOff]
realXmmRegNos DynFlags
dflags)
getRegsWithNode :: DynFlags -> AvailRegs
getRegsWithNode DynFlags
dflags =
( if [VGcPtr -> GlobalReg] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null (DynFlags -> [VGcPtr -> GlobalReg]
realVanillaRegs DynFlags
dflags)
then [ByteOff -> VGcPtr -> GlobalReg
VanillaReg ByteOff
1]
else DynFlags -> [VGcPtr -> GlobalReg]
realVanillaRegs DynFlags
dflags
, DynFlags -> [GlobalReg]
realFloatRegs DynFlags
dflags
, DynFlags -> [GlobalReg]
realDoubleRegs DynFlags
dflags
, DynFlags -> [GlobalReg]
realLongRegs DynFlags
dflags
, DynFlags -> [ByteOff]
realXmmRegNos DynFlags
dflags)
allFloatRegs, allDoubleRegs, allLongRegs :: DynFlags -> [GlobalReg]
allVanillaRegs :: DynFlags -> [VGcPtr -> GlobalReg]
allXmmRegs :: DynFlags -> [Int]
allVanillaRegs :: DynFlags -> [VGcPtr -> GlobalReg]
allVanillaRegs DynFlags
dflags = (ByteOff -> VGcPtr -> GlobalReg)
-> [ByteOff] -> [VGcPtr -> GlobalReg]
forall a b. (a -> b) -> [a] -> [b]
map ByteOff -> VGcPtr -> GlobalReg
VanillaReg ([ByteOff] -> [VGcPtr -> GlobalReg])
-> [ByteOff] -> [VGcPtr -> GlobalReg]
forall a b. (a -> b) -> a -> b
$ ByteOff -> [ByteOff]
regList (DynFlags -> ByteOff
mAX_Vanilla_REG DynFlags
dflags)
allFloatRegs :: DynFlags -> [GlobalReg]
allFloatRegs DynFlags
dflags = (ByteOff -> GlobalReg) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> [a] -> [b]
map ByteOff -> GlobalReg
FloatReg ([ByteOff] -> [GlobalReg]) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> a -> b
$ ByteOff -> [ByteOff]
regList (DynFlags -> ByteOff
mAX_Float_REG DynFlags
dflags)
allDoubleRegs :: DynFlags -> [GlobalReg]
allDoubleRegs DynFlags
dflags = (ByteOff -> GlobalReg) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> [a] -> [b]
map ByteOff -> GlobalReg
DoubleReg ([ByteOff] -> [GlobalReg]) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> a -> b
$ ByteOff -> [ByteOff]
regList (DynFlags -> ByteOff
mAX_Double_REG DynFlags
dflags)
allLongRegs :: DynFlags -> [GlobalReg]
allLongRegs DynFlags
dflags = (ByteOff -> GlobalReg) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> [a] -> [b]
map ByteOff -> GlobalReg
LongReg ([ByteOff] -> [GlobalReg]) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> a -> b
$ ByteOff -> [ByteOff]
regList (DynFlags -> ByteOff
mAX_Long_REG DynFlags
dflags)
allXmmRegs :: DynFlags -> [ByteOff]
allXmmRegs DynFlags
dflags = ByteOff -> [ByteOff]
regList (DynFlags -> ByteOff
mAX_XMM_REG DynFlags
dflags)
realFloatRegs, realDoubleRegs, realLongRegs :: DynFlags -> [GlobalReg]
realVanillaRegs :: DynFlags -> [VGcPtr -> GlobalReg]
realXmmRegNos :: DynFlags -> [Int]
realVanillaRegs :: DynFlags -> [VGcPtr -> GlobalReg]
realVanillaRegs DynFlags
dflags = (ByteOff -> VGcPtr -> GlobalReg)
-> [ByteOff] -> [VGcPtr -> GlobalReg]
forall a b. (a -> b) -> [a] -> [b]
map ByteOff -> VGcPtr -> GlobalReg
VanillaReg ([ByteOff] -> [VGcPtr -> GlobalReg])
-> [ByteOff] -> [VGcPtr -> GlobalReg]
forall a b. (a -> b) -> a -> b
$ ByteOff -> [ByteOff]
regList (DynFlags -> ByteOff
mAX_Real_Vanilla_REG DynFlags
dflags)
realFloatRegs :: DynFlags -> [GlobalReg]
realFloatRegs DynFlags
dflags = (ByteOff -> GlobalReg) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> [a] -> [b]
map ByteOff -> GlobalReg
FloatReg ([ByteOff] -> [GlobalReg]) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> a -> b
$ ByteOff -> [ByteOff]
regList (DynFlags -> ByteOff
mAX_Real_Float_REG DynFlags
dflags)
realDoubleRegs :: DynFlags -> [GlobalReg]
realDoubleRegs DynFlags
dflags = (ByteOff -> GlobalReg) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> [a] -> [b]
map ByteOff -> GlobalReg
DoubleReg ([ByteOff] -> [GlobalReg]) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> a -> b
$ ByteOff -> [ByteOff]
regList (DynFlags -> ByteOff
mAX_Real_Double_REG DynFlags
dflags)
realLongRegs :: DynFlags -> [GlobalReg]
realLongRegs DynFlags
dflags = (ByteOff -> GlobalReg) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> [a] -> [b]
map ByteOff -> GlobalReg
LongReg ([ByteOff] -> [GlobalReg]) -> [ByteOff] -> [GlobalReg]
forall a b. (a -> b) -> a -> b
$ ByteOff -> [ByteOff]
regList (DynFlags -> ByteOff
mAX_Real_Long_REG DynFlags
dflags)
realXmmRegNos :: DynFlags -> [ByteOff]
realXmmRegNos DynFlags
dflags
| DynFlags -> Bool
isSse2Enabled DynFlags
dflags = ByteOff -> [ByteOff]
regList (DynFlags -> ByteOff
mAX_Real_XMM_REG DynFlags
dflags)
| Bool
otherwise = []
regList :: Int -> [Int]
regList :: ByteOff -> [ByteOff]
regList ByteOff
n = [ByteOff
1 .. ByteOff
n]
allRegs :: DynFlags -> AvailRegs
allRegs :: DynFlags -> AvailRegs
allRegs DynFlags
dflags = (DynFlags -> [VGcPtr -> GlobalReg]
allVanillaRegs DynFlags
dflags,
DynFlags -> [GlobalReg]
allFloatRegs DynFlags
dflags,
DynFlags -> [GlobalReg]
allDoubleRegs DynFlags
dflags,
DynFlags -> [GlobalReg]
allLongRegs DynFlags
dflags,
DynFlags -> [ByteOff]
allXmmRegs DynFlags
dflags)
nodeOnly :: AvailRegs
nodeOnly :: AvailRegs
nodeOnly = ([ByteOff -> VGcPtr -> GlobalReg
VanillaReg ByteOff
1], [], [], [], [])
realArgRegsCover :: DynFlags -> [GlobalReg]
realArgRegsCover :: DynFlags -> [GlobalReg]
realArgRegsCover DynFlags
dflags
| Platform -> Bool
passFloatArgsInXmm (DynFlags -> Platform
targetPlatform DynFlags
dflags)
= ((VGcPtr -> GlobalReg) -> GlobalReg)
-> [VGcPtr -> GlobalReg] -> [GlobalReg]
forall a b. (a -> b) -> [a] -> [b]
map ((VGcPtr -> GlobalReg) -> VGcPtr -> GlobalReg
forall a b. (a -> b) -> a -> b
$VGcPtr
VGcPtr) (DynFlags -> [VGcPtr -> GlobalReg]
realVanillaRegs DynFlags
dflags) [GlobalReg] -> [GlobalReg] -> [GlobalReg]
forall a. [a] -> [a] -> [a]
++
DynFlags -> [GlobalReg]
realLongRegs DynFlags
dflags [GlobalReg] -> [GlobalReg] -> [GlobalReg]
forall a. [a] -> [a] -> [a]
++
DynFlags -> [GlobalReg]
realDoubleRegs DynFlags
dflags
| Bool
otherwise
= ((VGcPtr -> GlobalReg) -> GlobalReg)
-> [VGcPtr -> GlobalReg] -> [GlobalReg]
forall a b. (a -> b) -> [a] -> [b]
map ((VGcPtr -> GlobalReg) -> VGcPtr -> GlobalReg
forall a b. (a -> b) -> a -> b
$VGcPtr
VGcPtr) (DynFlags -> [VGcPtr -> GlobalReg]
realVanillaRegs DynFlags
dflags) [GlobalReg] -> [GlobalReg] -> [GlobalReg]
forall a. [a] -> [a] -> [a]
++
DynFlags -> [GlobalReg]
realFloatRegs DynFlags
dflags [GlobalReg] -> [GlobalReg] -> [GlobalReg]
forall a. [a] -> [a] -> [a]
++
DynFlags -> [GlobalReg]
realDoubleRegs DynFlags
dflags [GlobalReg] -> [GlobalReg] -> [GlobalReg]
forall a. [a] -> [a] -> [a]
++
DynFlags -> [GlobalReg]
realLongRegs DynFlags
dflags