Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 27197013: Tweak Math.log on ia32/x64 (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: addressed comments Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/deoptimizer-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3292 matching lines...) Expand 10 before | Expand all | Expand 10 after
3303 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)). 3303 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)).
3304 // This is implemented on both SSE2 and FPU. 3304 // This is implemented on both SSE2 and FPU.
3305 if (CpuFeatures::IsSupported(SSE2)) { 3305 if (CpuFeatures::IsSupported(SSE2)) {
3306 CpuFeatureScope fscope(masm(), SSE2); 3306 CpuFeatureScope fscope(masm(), SSE2);
3307 __ mov(ebx, Immediate(0x49800000)); // 1.0 x 2^20 as single. 3307 __ mov(ebx, Immediate(0x49800000)); // 1.0 x 2^20 as single.
3308 __ movd(xmm1, ebx); 3308 __ movd(xmm1, ebx);
3309 __ movd(xmm0, eax); 3309 __ movd(xmm0, eax);
3310 __ cvtss2sd(xmm1, xmm1); 3310 __ cvtss2sd(xmm1, xmm1);
3311 __ xorps(xmm0, xmm1); 3311 __ xorps(xmm0, xmm1);
3312 __ subsd(xmm0, xmm1); 3312 __ subsd(xmm0, xmm1);
3313 __ movdbl(FieldOperand(edi, HeapNumber::kValueOffset), xmm0); 3313 __ movsd(FieldOperand(edi, HeapNumber::kValueOffset), xmm0);
3314 } else { 3314 } else {
3315 // 0x4130000000000000 is 1.0 x 2^20 as a double. 3315 // 0x4130000000000000 is 1.0 x 2^20 as a double.
3316 __ mov(FieldOperand(edi, HeapNumber::kExponentOffset), 3316 __ mov(FieldOperand(edi, HeapNumber::kExponentOffset),
3317 Immediate(0x41300000)); 3317 Immediate(0x41300000));
3318 __ mov(FieldOperand(edi, HeapNumber::kMantissaOffset), eax); 3318 __ mov(FieldOperand(edi, HeapNumber::kMantissaOffset), eax);
3319 __ fld_d(FieldOperand(edi, HeapNumber::kValueOffset)); 3319 __ fld_d(FieldOperand(edi, HeapNumber::kValueOffset));
3320 __ mov(FieldOperand(edi, HeapNumber::kMantissaOffset), Immediate(0)); 3320 __ mov(FieldOperand(edi, HeapNumber::kMantissaOffset), Immediate(0));
3321 __ fld_d(FieldOperand(edi, HeapNumber::kValueOffset)); 3321 __ fld_d(FieldOperand(edi, HeapNumber::kValueOffset));
3322 __ fsubp(1); 3322 __ fsubp(1);
3323 __ fstp_d(FieldOperand(edi, HeapNumber::kValueOffset)); 3323 __ fstp_d(FieldOperand(edi, HeapNumber::kValueOffset));
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after
4960 4960
4961 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4961 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4962 Assembler::target_address_at(call_target_address)); 4962 Assembler::target_address_at(call_target_address));
4963 return OSR_AFTER_STACK_CHECK; 4963 return OSR_AFTER_STACK_CHECK;
4964 } 4964 }
4965 4965
4966 4966
4967 } } // namespace v8::internal 4967 } } // namespace v8::internal
4968 4968
4969 #endif // V8_TARGET_ARCH_IA32 4969 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/deoptimizer-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698