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

Side by Side Diff: src/x87/lithium-codegen-x87.cc

Issue 1004083002: [turbofan] Use builtin inlining mechanism for Math.abs and Math.sqrt. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/runtime/runtime-maths.cc ('k') | test/unittests/compiler/js-builtin-reducer-unittest.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 4086 matching lines...) Expand 10 before | Expand all | Expand 10 after
4097 __ bind(&done); 4097 __ bind(&done);
4098 X87LoadForUsage(input); 4098 X87LoadForUsage(input);
4099 __ fstp_d(FieldOperand(temp_result, HeapNumber::kValueOffset)); 4099 __ fstp_d(FieldOperand(temp_result, HeapNumber::kValueOffset));
4100 4100
4101 { 4101 {
4102 // Preserve the value of all registers. 4102 // Preserve the value of all registers.
4103 PushSafepointRegistersScope scope(this); 4103 PushSafepointRegistersScope scope(this);
4104 4104
4105 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 4105 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
4106 __ push(temp_result); 4106 __ push(temp_result);
4107 __ CallRuntimeSaveDoubles(Runtime::kMathSqrtRT); 4107 __ CallRuntimeSaveDoubles(Runtime::kMathSqrt);
4108 RecordSafepointWithRegisters(instr->pointer_map(), 1, 4108 RecordSafepointWithRegisters(instr->pointer_map(), 1,
4109 Safepoint::kNoLazyDeopt); 4109 Safepoint::kNoLazyDeopt);
4110 __ StoreToSafepointRegisterSlot(temp_result, eax); 4110 __ StoreToSafepointRegisterSlot(temp_result, eax);
4111 } 4111 }
4112 X87PrepareToWrite(result_reg); 4112 X87PrepareToWrite(result_reg);
4113 // return value of MathExpRT is Smi or Heap Number. 4113 // return value of MathExpRT is Smi or Heap Number.
4114 __ JumpIfSmi(temp_result, &smi); 4114 __ JumpIfSmi(temp_result, &smi);
4115 // Heap number(double) 4115 // Heap number(double)
4116 __ fld_d(FieldOperand(temp_result, HeapNumber::kValueOffset)); 4116 __ fld_d(FieldOperand(temp_result, HeapNumber::kValueOffset));
4117 __ jmp(&finish); 4117 __ jmp(&finish);
(...skipping 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after
6387 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6387 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6388 RecordSafepoint(Safepoint::kNoLazyDeopt); 6388 RecordSafepoint(Safepoint::kNoLazyDeopt);
6389 } 6389 }
6390 6390
6391 6391
6392 #undef __ 6392 #undef __
6393 6393
6394 } } // namespace v8::internal 6394 } } // namespace v8::internal
6395 6395
6396 #endif // V8_TARGET_ARCH_X87 6396 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698