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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 212763008: Clean up runtime functions for Maths. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 // and may not have contained the exponent value in the first place when the 1007 // and may not have contained the exponent value in the first place when the
1008 // exponent is a smi. We reset it with exponent value before bailing out. 1008 // exponent is a smi. We reset it with exponent value before bailing out.
1009 __ j(not_equal, &done); 1009 __ j(not_equal, &done);
1010 __ Cvtsi2sd(double_exponent, exponent); 1010 __ Cvtsi2sd(double_exponent, exponent);
1011 1011
1012 // Returning or bailing out. 1012 // Returning or bailing out.
1013 Counters* counters = masm->isolate()->counters(); 1013 Counters* counters = masm->isolate()->counters();
1014 if (exponent_type_ == ON_STACK) { 1014 if (exponent_type_ == ON_STACK) {
1015 // The arguments are still on the stack. 1015 // The arguments are still on the stack.
1016 __ bind(&call_runtime); 1016 __ bind(&call_runtime);
1017 __ TailCallRuntime(Runtime::kMath_pow_cfunction, 2, 1); 1017 __ TailCallRuntime(Runtime::kHiddenMathPow, 2, 1);
1018 1018
1019 // The stub is called from non-optimized code, which expects the result 1019 // The stub is called from non-optimized code, which expects the result
1020 // as heap number in exponent. 1020 // as heap number in exponent.
1021 __ bind(&done); 1021 __ bind(&done);
1022 __ AllocateHeapNumber(eax, scratch, base, &call_runtime); 1022 __ AllocateHeapNumber(eax, scratch, base, &call_runtime);
1023 __ movsd(FieldOperand(eax, HeapNumber::kValueOffset), double_result); 1023 __ movsd(FieldOperand(eax, HeapNumber::kValueOffset), double_result);
1024 __ IncrementCounter(counters->math_pow(), 1); 1024 __ IncrementCounter(counters->math_pow(), 1);
1025 __ ret(2 * kPointerSize); 1025 __ ret(2 * kPointerSize);
1026 } else { 1026 } else {
1027 __ bind(&call_runtime); 1027 __ bind(&call_runtime);
(...skipping 4334 matching lines...) Expand 10 before | Expand all | Expand 10 after
5362 Operand(ebp, 7 * kPointerSize), 5362 Operand(ebp, 7 * kPointerSize),
5363 NULL); 5363 NULL);
5364 } 5364 }
5365 5365
5366 5366
5367 #undef __ 5367 #undef __
5368 5368
5369 } } // namespace v8::internal 5369 } } // namespace v8::internal
5370 5370
5371 #endif // V8_TARGET_ARCH_IA32 5371 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698