Closed Bug 514624 Opened 15 years ago Closed 15 years ago

UTF8 to Unicode conversion of SSE2 optimization for x86_64 platform

Categories

(Core :: XPCOM, defect)

x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: m_kato, Assigned: m_kato)

References

Details

(Whiteboard: [ts])

Attachments

(1 file)

Although bug 506430 is landed, this is for x86 only. We should enable it for x86_64 (x86_64 supports SSE2 as default!)
Attached patch patch v1Splinter Review
in testing...
Does OSX actually specify -msse2 by default?
(In reply to comment #2) > Does OSX actually specify -msse2 by default? Yes. In http://developer.apple.com/hardwaredrivers/ve/sse.html SSE2 is enabled using the GCC compiler flag -msse2. SSE2 is enabled by default on gcc-4.0. If SSE2 is enabled, the C preprocessor symbol __SSE2__ is defined.
Hmm. So I've been wondering about that for a while. Here's gcc -v (gcc 4.0.1): /usr/libexec/gcc/i686-apple-darwin9/4.0.1/cc1 -quiet -v -D__DYNAMIC__ f.c -fPIC -quiet -dumpbase f.c -mmacosx-version-min=10.5.8 -mtune=generic -march=apple -auxbase f -O2 -version -o /var/folders/5M/5MNK73rKEWemghU5EyInjU+++TI/-Tmp-//ccbbwavM.s and gcc -dumpspecs | grep sse does't show anything. So I guess they're enabling sse via the 'apple' arch?
(In reply to comment #4) > Hmm. So I've been wondering about that for a while. Here's gcc -v (gcc > 4.0.1): > > /usr/libexec/gcc/i686-apple-darwin9/4.0.1/cc1 -quiet -v -D__DYNAMIC__ f.c > -fPIC -quiet -dumpbase f.c -mmacosx-version-min=10.5.8 -mtune=generic > -march=apple -auxbase f -O2 -version -o > /var/folders/5M/5MNK73rKEWemghU5EyInjU+++TI/-Tmp-//ccbbwavM.s > > and gcc -dumpspecs | grep sse does't show anything. So I guess they're > enabling sse via the 'apple' arch? Maybe, you are right. But, I don't know gcc source code that apple modifies. Since apple hardware is Core Duo or later, I think sse2 is turned by default on their gcc. Also, if __SSE2__ isn't defined, gcc cannot compile built-in functions for SSE2. emmintrin.h on gcc (even if apple version) expects that __SSE2__ is defined.
Attachment #398600 - Flags: review?(vladimir)
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
It seems this change enabled this code on Intel Atom, where it segfaults on the line 'out2 = _mm_unpackhi_epi8(in, zeroes);' SSE2 is supported on Atom, should this work or is it relying on other features too?
Hmm, I'm running these builds fine on an Atom, though on Windows -- are you on Linux? If so, are you on a kernel that has SSE2 support disabled or something?
I am on Linux, but SSE2 is enabled (or should be). I'll try and look into this further and report back.
A little bit of extra info (though I've still not looked into this properly yet), we're using the -m flags "-m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse". That -march part doesn't look right to me...
I -think- arch=core2 is valid for Atom... it's the same ISA, no? We should probably move this to a new bug.
(In reply to comment #11) > I -think- arch=core2 is valid for Atom... it's the same ISA, no? We should > probably move this to a new bug. Yeah Intel's literature says they have the same ISA.
(In reply to comment #10) > A little bit of extra info (though I've still not looked into this properly > yet), we're using the -m flags "-m32 -march=core2 -msse3 -mtune=generic > -mfpmath=sse". That -march part doesn't look right to me... Chris, What's version of gcc?
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: