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

Side by Side Diff: src/arm/codegen-arm.cc

Issue 300004: X64 Win64: Reimplement fmod so that it works. (Closed)
Patch Set: And it lints. Created 11 years, 2 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 3387 matching lines...) Expand 10 before | Expand all | Expand 10 after
3398 frame_->CallRuntime(Runtime::kMath_sin, 1); 3398 frame_->CallRuntime(Runtime::kMath_sin, 1);
3399 break; 3399 break;
3400 case COS: 3400 case COS:
3401 frame_->CallRuntime(Runtime::kMath_cos, 1); 3401 frame_->CallRuntime(Runtime::kMath_cos, 1);
3402 break; 3402 break;
3403 } 3403 }
3404 frame_->EmitPush(r0); 3404 frame_->EmitPush(r0);
3405 } 3405 }
3406 3406
3407 3407
3408 void CodeGenerator::GenerateNumberMod(ZoneList<Expression*>* args) {
3409 // Simply call the runtime function. Arguments must be numbers.
3410 ASSERT(args->length() == 2);
3411 VirtualFrame::SpilledScope spilled_scope;
3412 LoadAndSpill(args->at(0));
3413 LoadAndSpill(args->at(1));
3414 Result answer = frame_->CallRuntime(Runtime::kNumberMod, 2);
3415 frame_->Push(&answer);
3416 }
3417
3418
3408 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) { 3419 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) {
3409 VirtualFrame::SpilledScope spilled_scope; 3420 VirtualFrame::SpilledScope spilled_scope;
3410 ASSERT(args->length() == 2); 3421 ASSERT(args->length() == 2);
3411 3422
3412 // Load the two objects into registers and perform the comparison. 3423 // Load the two objects into registers and perform the comparison.
3413 LoadAndSpill(args->at(0)); 3424 LoadAndSpill(args->at(0));
3414 LoadAndSpill(args->at(1)); 3425 LoadAndSpill(args->at(1));
3415 frame_->EmitPop(r0); 3426 frame_->EmitPop(r0);
3416 frame_->EmitPop(r1); 3427 frame_->EmitPop(r1);
3417 __ cmp(r0, Operand(r1)); 3428 __ cmp(r0, Operand(r1));
(...skipping 2847 matching lines...) Expand 10 before | Expand all | Expand 10 after
6265 int CompareStub::MinorKey() { 6276 int CompareStub::MinorKey() {
6266 // Encode the two parameters in a unique 16 bit value. 6277 // Encode the two parameters in a unique 16 bit value.
6267 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); 6278 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15));
6268 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); 6279 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0);
6269 } 6280 }
6270 6281
6271 6282
6272 #undef __ 6283 #undef __
6273 6284
6274 } } // namespace v8::internal 6285 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698