Commit 1bee2d8a authored by whesse@chromium.org's avatar whesse@chromium.org

X64: Implement sin and cos.

Review URL: http://codereview.chromium.org/149200

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6cf6824c
......@@ -3361,7 +3361,21 @@ void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) {
void CodeGenerator::GenerateFastMathOp(MathOp op, ZoneList<Expression*>* args) {
UNIMPLEMENTED();
// TODO(X64): Use inline floating point in the fast case.
ASSERT(args->length() == 1);
// Load number.
Load(args->at(0));
Result answer;
switch (op) {
case SIN:
answer = frame_->CallRuntime(Runtime::kMath_sin, 1);
break;
case COS:
answer = frame_->CallRuntime(Runtime::kMath_cos, 1);
break;
}
frame_->Push(&answer);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment