Commit 253a5b75 authored by gmainland's avatar gmainland

Rename SSE -> XMM for consistency.

We were using SSE is some places and XMM in others. Better to keep a consistent
naming scheme.
parent 0daee297
......@@ -70,10 +70,10 @@ assignArgumentsPos dflags off conv arg_ty reps = (stk_off, assignments)
float = case (w, regs) of
(W32, (vs, fs, ds, ls, s:ss)) -> k (RegisterParam (FloatReg s), (vs, fs, ds, ls, ss))
(W32, (vs, f:fs, ds, ls, ss))
| not hasSseRegs -> k (RegisterParam f, (vs, fs, ds, ls, ss))
| not hasXmmRegs -> k (RegisterParam f, (vs, fs, ds, ls, ss))
(W64, (vs, fs, ds, ls, s:ss)) -> k (RegisterParam (DoubleReg s), (vs, fs, ds, ls, ss))
(W64, (vs, fs, d:ds, ls, ss))
| not hasSseRegs -> k (RegisterParam d, (vs, fs, ds, ls, ss))
| not hasXmmRegs -> k (RegisterParam d, (vs, fs, ds, ls, ss))
(W80, _) -> panic "F80 unsupported register type"
_ -> (assts, (r:rs))
int = case (w, regs) of
......@@ -88,7 +88,7 @@ assignArgumentsPos dflags off conv arg_ty reps = (stk_off, assignments)
w = typeWidth ty
gcp | isGcPtrType ty = VGcPtr
| otherwise = VNonGcPtr
hasSseRegs = mAX_Real_SSE_REG dflags /= 0
hasXmmRegs = mAX_Real_XMM_REG dflags /= 0
assignStack :: DynFlags -> ByteOff -> (a -> CmmType) -> [a]
......@@ -113,7 +113,7 @@ type AvailRegs = ( [VGcPtr -> GlobalReg] -- available vanilla regs.
, [GlobalReg] -- floats
, [GlobalReg] -- doubles
, [GlobalReg] -- longs (int64 and word64)
, [Int] -- SSE (floats and doubles)
, [Int] -- XMM (floats and doubles)
)
-- Vanilla registers can contain pointers, Ints, Chars.
......@@ -128,7 +128,7 @@ getRegsWithoutNode dflags =
, realFloatRegs dflags
, realDoubleRegs dflags
, realLongRegs dflags
, sseRegNos dflags)
, xmmRegNos dflags)
-- getRegsWithNode uses R1/node even if it isn't a register
getRegsWithNode dflags =
......@@ -138,17 +138,17 @@ getRegsWithNode dflags =
, realFloatRegs dflags
, realDoubleRegs dflags
, realLongRegs dflags
, sseRegNos dflags)
, xmmRegNos dflags)
allFloatRegs, allDoubleRegs, allLongRegs :: DynFlags -> [GlobalReg]
allVanillaRegs :: DynFlags -> [VGcPtr -> GlobalReg]
allSseRegs :: DynFlags -> [Int]
allXmmRegs :: DynFlags -> [Int]
allVanillaRegs dflags = map VanillaReg $ regList (mAX_Vanilla_REG dflags)
allFloatRegs dflags = map FloatReg $ regList (mAX_Float_REG dflags)
allDoubleRegs dflags = map DoubleReg $ regList (mAX_Double_REG dflags)
allLongRegs dflags = map LongReg $ regList (mAX_Long_REG dflags)
allSseRegs dflags = regList (mAX_SSE_REG dflags)
allXmmRegs dflags = regList (mAX_XMM_REG dflags)
realFloatRegs, realDoubleRegs, realLongRegs :: DynFlags -> [GlobalReg]
realVanillaRegs :: DynFlags -> [VGcPtr -> GlobalReg]
......@@ -158,8 +158,8 @@ realFloatRegs dflags = map FloatReg $ regList (mAX_Real_Float_REG dflags)
realDoubleRegs dflags = map DoubleReg $ regList (mAX_Real_Double_REG dflags)
realLongRegs dflags = map LongReg $ regList (mAX_Real_Long_REG dflags)
sseRegNos :: DynFlags -> [Int]
sseRegNos dflags =regList (mAX_SSE_REG dflags)
xmmRegNos :: DynFlags -> [Int]
xmmRegNos dflags =regList (mAX_XMM_REG dflags)
regList :: Int -> [Int]
regList n = [1 .. n]
......@@ -169,7 +169,7 @@ allRegs dflags = (allVanillaRegs dflags,
allFloatRegs dflags,
allDoubleRegs dflags,
allLongRegs dflags,
allSseRegs dflags)
allXmmRegs dflags)
nodeOnly :: AvailRegs
nodeOnly = ([VanillaReg 1], [], [], [], [])
......@@ -187,7 +187,7 @@ globalArgRegs dflags = map ($ VGcPtr) (allVanillaRegs dflags) ++
-- only use this functionality in hand-written C-- code in the RTS.
realArgRegsCover :: DynFlags -> [GlobalReg]
realArgRegsCover dflags
| hasSseRegs = map ($VGcPtr) (realVanillaRegs dflags) ++
| hasXmmRegs = map ($VGcPtr) (realVanillaRegs dflags) ++
realDoubleRegs dflags ++
realLongRegs dflags
| otherwise = map ($VGcPtr) (realVanillaRegs dflags) ++
......@@ -195,4 +195,4 @@ realArgRegsCover dflags
realDoubleRegs dflags ++
realLongRegs dflags
where
hasSseRegs = mAX_Real_SSE_REG dflags /= 0
hasXmmRegs = mAX_Real_XMM_REG dflags /= 0
......@@ -381,7 +381,7 @@ activeStgRegs = [
#ifdef REG_SpLim
,SpLim
#endif
#if MAX_REAL_SSE_REG != 0
#if MAX_REAL_XMM_REG != 0
#ifdef REG_F1
,FloatReg 1
#endif
......@@ -436,7 +436,7 @@ activeStgRegs = [
#ifdef REG_XMM6
,XmmReg 6
#endif
#else /* MAX_REAL_SSE_REG == 0 */
#else /* MAX_REAL_XMM_REG == 0 */
#ifdef REG_F1
,FloatReg 1
#endif
......@@ -473,7 +473,7 @@ activeStgRegs = [
#ifdef REG_D6
,DoubleReg 6
#endif
#endif /* MAX_REAL_SSE_REG == 0 */
#endif /* MAX_REAL_XMM_REG == 0 */
]
haveRegBase :: Bool
......@@ -587,7 +587,7 @@ globalRegMaybe (DoubleReg 6) =
Just (RealRegSingle REG_D6)
# endif
# endif
#if MAX_REAL_SSE_REG != 0
#if MAX_REAL_XMM_REG != 0
globalRegMaybe (XmmReg 1) = Just (RealRegSingle REG_XMM1)
globalRegMaybe (XmmReg 2) = Just (RealRegSingle REG_XMM2)
globalRegMaybe (XmmReg 3) = Just (RealRegSingle REG_XMM3)
......
......@@ -84,7 +84,7 @@
#define MAX_FLOAT_REG 6
#define MAX_DOUBLE_REG 6
#define MAX_LONG_REG 1
#define MAX_SSE_REG 6
#define MAX_XMM_REG 6
/* -----------------------------------------------------------------------------
Semi-Tagging constants
......
......@@ -107,7 +107,7 @@
#define MAX_REAL_FLOAT_REG 0
#define MAX_REAL_DOUBLE_REG 0
#define MAX_REAL_LONG_REG 0
#define MAX_REAL_SSE_REG 0
#define MAX_REAL_XMM_REG 0
/* -----------------------------------------------------------------------------
The x86-64 register mapping
......@@ -212,7 +212,7 @@
#define MAX_REAL_FLOAT_REG 6
#define MAX_REAL_DOUBLE_REG 6
#define MAX_REAL_LONG_REG 0
#define MAX_REAL_SSE_REG 6
#define MAX_REAL_XMM_REG 6
/* -----------------------------------------------------------------------------
The PowerPC register mapping
......@@ -565,21 +565,21 @@
# endif
#endif
#ifndef MAX_REAL_SSE_REG
# if defined(REG_SSE6)
# define MAX_REAL_SSE_REG 6
# elif defined(REG_SSE5)
# define MAX_REAL_SSE_REG 5
# elif defined(REG_SSE4)
# define MAX_REAL_SSE_REG 4
# elif defined(REG_SSE3)
# define MAX_REAL_SSE_REG 3
# elif defined(REG_SSE2)
# define MAX_REAL_SSE_REG 2
# elif defined(REG_SSE1)
# define MAX_REAL_SSE_REG 1
#ifndef MAX_REAL_XMM_REG
# if defined(REG_XMM6)
# define MAX_REAL_XMM_REG 6
# elif defined(REG_XMM5)
# define MAX_REAL_XMM_REG 5
# elif defined(REG_XMM4)
# define MAX_REAL_XMM_REG 4
# elif defined(REG_XMM3)
# define MAX_REAL_XMM_REG 3
# elif defined(REG_XMM2)
# define MAX_REAL_XMM_REG 2
# elif defined(REG_XMM1)
# define MAX_REAL_XMM_REG 1
# else
# define MAX_REAL_SSE_REG 0
# define MAX_REAL_XMM_REG 0
# endif
#endif
......
......@@ -576,11 +576,11 @@ wanteds = concat
,constantWord Haskell "MAX_Float_REG" "MAX_FLOAT_REG"
,constantWord Haskell "MAX_Double_REG" "MAX_DOUBLE_REG"
,constantWord Haskell "MAX_Long_REG" "MAX_LONG_REG"
,constantWord Haskell "MAX_SSE_REG" "MAX_SSE_REG"
,constantWord Haskell "MAX_XMM_REG" "MAX_XMM_REG"
,constantWord Haskell "MAX_Real_Vanilla_REG" "MAX_REAL_VANILLA_REG"
,constantWord Haskell "MAX_Real_Float_REG" "MAX_REAL_FLOAT_REG"
,constantWord Haskell "MAX_Real_Double_REG" "MAX_REAL_DOUBLE_REG"
,constantWord Haskell "MAX_Real_SSE_REG" "MAX_REAL_SSE_REG"
,constantWord Haskell "MAX_Real_XMM_REG" "MAX_REAL_XMM_REG"
,constantWord Haskell "MAX_Real_Long_REG" "MAX_REAL_LONG_REG"
-- This tells the native code generator the size of the spill
......
Markdown is supported
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