...or provide fallback routines
you can run a little startup init routine - detect SSE support level - and fill in addresses of PROC's
i am working on something along that line at the moment
these define TYPE's for up to 6 dword parms - you can extend it easily
_FUNC00 TYPEDEF PROTO
_FUNC04 TYPEDEF PROTO :DWORD
_FUNC08 TYPEDEF PROTO :DWORD,:DWORD
_FUNC12 TYPEDEF PROTO :DWORD,:DWORD,:DWORD
_FUNC16 TYPEDEF PROTO :DWORD,:DWORD,:DWORD,:DWORD
_FUNC20 TYPEDEF PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
_FUNC24 TYPEDEF PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
_PFUNC00 TYPEDEF Ptr _FUNC00
_PFUNC04 TYPEDEF Ptr _FUNC04
_PFUNC08 TYPEDEF Ptr _FUNC08
_PFUNC12 TYPEDEF Ptr _FUNC12
_PFUNC16 TYPEDEF Ptr _FUNC16
_PFUNC20 TYPEDEF Ptr _FUNC20
_PFUNC24 TYPEDEF Ptr _FUNC24
then, i am using a structure with function pointers in it
_FUNC STRUCT
lpfnFunc1 _PFUNC04 ? ;this function has 1 dword arg
lpfnFunc2 _PFUNC12 ? ;this function has 3 dword args
_FUNC STRUCT
and, in the .DATA? section...
_Func _FUNC <>
so, you set _Func.lpfnFunc1 and _Func.lpfnFunc2 to point at appropriate routines for the supported SSE level
then.....
INVOKE _Func.lpfnFunc1,arg1
INVOKE _Func.lpfnFunc2,arg1,arg2,arg3
;or
push edi
mov edi,offset _Func
INVOKE [edi]._FUNC.lpfnFunc1,arg1
INVOKE [edi]._FUNC.lpfnFunc2,arg1,arg2,arg3
pop edi
another way to go would be to put all the routines for each support level into a DLL
then, at init, load the DLL that is appropriate for the machine
the routines can then all have the same names