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)
Tracking
()
RESOLVED
FIXED
People
(Reporter: m_kato, Assigned: m_kato)
References
Details
(Whiteboard: [ts])
Attachments
(1 file)
1.27 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
Although bug 506430 is landed, this is for x86 only. We should enable it for x86_64 (x86_64 supports SSE2 as default!)
Assignee | ||
Comment 1•15 years ago
|
||
in testing...
Blocks: 506430
Whiteboard: [ts]
Does OSX actually specify -msse2 by default?
Assignee | ||
Comment 3•15 years ago
|
||
(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?
Assignee | ||
Comment 5•15 years ago
|
||
(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.
Assignee | ||
Updated•15 years ago
|
Attachment #398600 -
Flags: review?(vladimir)
Attachment #398600 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 6•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 7•15 years ago
|
||
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?
Comment 9•15 years ago
|
||
I am on Linux, but SSE2 is enabled (or should be). I'll try and look into this further and report back.
Comment 10•15 years ago
|
||
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.
Assignee | ||
Comment 13•15 years ago
|
||
(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?
Updated•4 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•