http://codereview.chromium.org/652041/diff/19/1027 File src/ia32/codegen-ia32.cc (right):
http://codereview.chromium.org/652041/diff/19/1027#newcode8174 src/ia32/codegen-ia32.cc:8174: __ fld_d(FieldOperand(eax, HeapNumber::kValueOffset)); Just an idea: Could you optimize the FPU push/pop away in the fast case (input is a heap number, cache hit)? http://codereview.chromium.org/652041/diff/19/1027#newcode8192 src/ia32/codegen-ia32.cc:8192: __ and_(Operand(ecx), Immediate(TranscendentalCache::kCacheSize - 1)); This assumes that kCacheSize is a power of two. I'd move the ASSERT from below up to here. http://codereview.chromium.org/652041/diff/19/1027#newcode8197 src/ia32/codegen-ia32.cc:8197: ASSERT(IsPowerOf2(TranscendentalCache::kCacheSize)); Move this ASSERT to above. http://codereview.chromium.org/652041/diff/19/1027#newcode8228 src/ia32/codegen-ia32.cc:8228: __ cmp(edx, Operand(ecx, kIntSize)); // NOLINT Isn't this always half the size of a double (32 bits)? (even on x64) http://codereview.chromium.org/652041/diff/19/1027#newcode8232 src/ia32/codegen-ia32.cc:8232: __ fstp(0); Could this pop() of the FPU stack go away? (see my idea comment above) ebx and edx still contain the original double value, if I understand correct? http://codereview.chromium.org/652041/diff/19/1027#newcode8271 src/ia32/codegen-ia32.cc:8271: case TranscendentalCache::COS: { Are there potentially more types of transcendental caches? switch(type_) {...} does not seem necessary here. Maybe just ASSERT(type_ == TranscendentalCache::SIN || type_ == TranscendentalCache::COS) so that we don't pay extra in release mode. http://codereview.chromium.org/652041/diff/19/1027#newcode8320 src/ia32/codegen-ia32.cc:8320: __ fprem(); Is there a reason for not using fprem1()? http://codereview.chromium.org/652041/diff/19/1029 File src/ia32/disasm-ia32.cc (right): http://codereview.chromium.org/652041/diff/19/1029#newcode681 src/ia32/disasm-ia32.cc:681: case 0: mnem = "fld_`d"; break; extra ' http://codereview.chromium.org/652041 -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
