Bug 14602 - JSC/WTF: fastMalloc doesn't use bsr under VC
Summary: JSC/WTF: fastMalloc doesn't use bsr under VC
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows XP
: P4 Trivial
Assignee: Nobody
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2007-07-13 04:08 PDT by 808caaa4.8ce9.9cd6c799e9f6
Modified: 2012-09-06 12:50 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 808caaa4.8ce9.9cd6c799e9f6 2007-07-13 04:08:35 PDT
With VC, fastMalloc.cpp doesn't use inline assembly for LgFloor().

#if defined(_MSC_VER) && !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_IX86)
static inline int LgFloor(size_t n) {
	__asm xor eax,eax
	__asm not eax
	__asm bsr eax,n
}
#endif


p.s.
In WebKit.dll, do_malloc() and do_free() expands as ALWAYS_INLINE everywhere and costs binary sizes.
Is this intended?
Comment 1 David Kilzer (:ddkilzer) 2007-07-14 15:22:52 PDT
<rdar://problem/5335830>
Comment 2 Maciej Stachowiak 2007-07-16 19:40:41 PDT
Yes, we don't have all the inline assembly implemented for Windows yet. It could be a small performance boost once done.
Comment 3 Maciej Stachowiak 2007-08-30 02:52:35 PDT
Why are the xor and the not needed in the inline assembly here? They don't seem to be needed in the gcc version. 
Comment 4 Robert Blaut 2008-02-20 03:32:19 PST
P5 is not used for WebKit bugs. [http://webkit.org/quality/bugpriorities.html]
Comment 5 Gavin Barraclough 2012-09-06 12:50:49 PDT
I don't think this method has shown up under recent profiling, and this bug has sat idle for 5 years.  I don't think this is a change we intend to make.  Please reopen if you intend to work on this bug.