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

Unified Diff: src/crankshaft/x87/lithium-x87.cc

Issue 2105613002: X87: [builtins] Introduce proper Float64Cos and Float64Sin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/x87/lithium-x87.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-x87.cc
diff --git a/src/crankshaft/x87/lithium-x87.cc b/src/crankshaft/x87/lithium-x87.cc
index 2748e2e3e5417a6ed0f69d990b17c896ecdd40f8..c3875bd14ead836ab4642594b6ff0f2e78a64b0a 100644
--- a/src/crankshaft/x87/lithium-x87.cc
+++ b/src/crankshaft/x87/lithium-x87.cc
@@ -1110,15 +1110,28 @@ LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
switch (instr->op()) {
- case kMathFloor: return DoMathFloor(instr);
- case kMathRound: return DoMathRound(instr);
- case kMathFround: return DoMathFround(instr);
- case kMathAbs: return DoMathAbs(instr);
- case kMathLog: return DoMathLog(instr);
- case kMathExp: return DoMathExp(instr);
- case kMathSqrt: return DoMathSqrt(instr);
- case kMathPowHalf: return DoMathPowHalf(instr);
- case kMathClz32: return DoMathClz32(instr);
+ case kMathCos:
+ return DoMathCos(instr);
+ case kMathFloor:
+ return DoMathFloor(instr);
+ case kMathRound:
+ return DoMathRound(instr);
+ case kMathFround:
+ return DoMathFround(instr);
+ case kMathAbs:
+ return DoMathAbs(instr);
+ case kMathLog:
+ return DoMathLog(instr);
+ case kMathExp:
+ return DoMathExp(instr);
+ case kMathSqrt:
+ return DoMathSqrt(instr);
+ case kMathPowHalf:
+ return DoMathPowHalf(instr);
+ case kMathClz32:
+ return DoMathClz32(instr);
+ case kMathSin:
+ return DoMathSin(instr);
default:
UNREACHABLE();
return NULL;
@@ -1173,6 +1186,19 @@ LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) {
return DefineAsRegister(result);
}
+LInstruction* LChunkBuilder::DoMathCos(HUnaryMathOperation* instr) {
+ DCHECK(instr->representation().IsDouble());
+ DCHECK(instr->value()->representation().IsDouble());
+ LOperand* input = UseRegisterAtStart(instr->value());
+ return MarkAsCall(DefineSameAsFirst(new (zone()) LMathCos(input)), instr);
+}
+
+LInstruction* LChunkBuilder::DoMathSin(HUnaryMathOperation* instr) {
+ DCHECK(instr->representation().IsDouble());
+ DCHECK(instr->value()->representation().IsDouble());
+ LOperand* input = UseRegisterAtStart(instr->value());
+ return MarkAsCall(DefineSameAsFirst(new (zone()) LMathSin(input)), instr);
+}
LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) {
DCHECK(instr->representation().IsDouble());
« no previous file with comments | « src/crankshaft/x87/lithium-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698