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

Unified Diff: runtime/vm/intrinsifier_ia32.cc

Issue 75203003: Remove intrinsified version of fsin, fcos. The optimized code calls into runtime, which may use dif… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_ia32.cc
===================================================================
--- runtime/vm/intrinsifier_ia32.cc (revision 30364)
+++ runtime/vm/intrinsifier_ia32.cc (working copy)
@@ -1326,60 +1326,6 @@
}
-enum TrigonometricFunctions {
- kSine,
- kCosine,
-};
-
-
-static void EmitTrigonometric(Assembler* assembler,
- TrigonometricFunctions kind) {
- Label fall_through, is_smi, double_op;
- TestLastArgumentIsDouble(assembler, &is_smi, &fall_through);
- // Argument is double and is in EAX.
- __ fldl(FieldAddress(EAX, Double::value_offset()));
- __ Bind(&double_op);
- switch (kind) {
- case kSine: __ fsin(); break;
- case kCosine: __ fcos(); break;
- default:
- UNREACHABLE();
- }
- const Class& double_class = Class::Handle(
- Isolate::Current()->object_store()->double_class());
- Label alloc_failed;
- __ TryAllocate(double_class,
- &alloc_failed,
- Assembler::kNearJump,
- EAX); // Result register.
- __ fstpl(FieldAddress(EAX, Double::value_offset()));
- __ ret();
-
- __ Bind(&is_smi); // smi -> double.
- __ SmiUntag(EAX);
- __ pushl(EAX);
- __ filds(Address(ESP, 0));
- __ popl(EAX);
- __ jmp(&double_op);
-
- __ Bind(&alloc_failed);
- __ ffree(0);
- __ fincstp();
-
- __ Bind(&fall_through);
-}
-
-
-void Intrinsifier::Math_sin(Assembler* assembler) {
- EmitTrigonometric(assembler, kSine);
-}
-
-
-void Intrinsifier::Math_cos(Assembler* assembler) {
- EmitTrigonometric(assembler, kCosine);
-}
-
-
// var state = ((_A * (_state[kSTATE_LO])) + _state[kSTATE_HI]) & _MASK_64;
// _state[kSTATE_LO] = state & _MASK_32;
// _state[kSTATE_HI] = state >> 32;
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698