Skip to content

Define __SSE__ when compiling with -msse

The hashable package needs to know if GHC was invoked with -msse4.1 so it can call out to faster C code in that case. I'd like to propose that GHC provides the following defines when running the preprocessor:

## If SSE is turned on at all:
#define __SSE__ 1

## Only with -msse2 and up:
#define __SSE2__ 1

## Only with -msse4.1 and up:
#define __SSE4_1__ 1

This behavior is consistent with GCC.

Note that on some platforms SSE2 might be enabled by default and so should the defines.

Trac metadata
Trac field Value
Version 7.6.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information