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

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

Issue 1687005: Fix BinaryOpIC implementation on ARM.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 6450 matching lines...) Expand 10 before | Expand all | Expand 10 after
6461 __ vcvt_f64_s32(d7, s15); 6461 __ vcvt_f64_s32(d7, s15);
6462 } else { 6462 } else {
6463 // Write Smi from r0 to r3 and r2 in double format. 6463 // Write Smi from r0 to r3 and r2 in double format.
6464 __ mov(r7, Operand(r0)); 6464 __ mov(r7, Operand(r0));
6465 ConvertToDoubleStub stub3(r3, r2, r7, r6); 6465 ConvertToDoubleStub stub3(r3, r2, r7, r6);
6466 __ push(lr); 6466 __ push(lr);
6467 __ Call(stub3.GetCode(), RelocInfo::CODE_TARGET); 6467 __ Call(stub3.GetCode(), RelocInfo::CODE_TARGET);
6468 __ pop(lr); 6468 __ pop(lr);
6469 } 6469 }
6470 6470
6471 // HEAP_NUMBERS stub is slower than GENERIC on a pair of smis.
6472 // r0 is known to be a smi. If r1 is also a smi then switch to GENERIC.
6473 Label r1_is_not_smi;
6474 if (runtime_operands_type_ == BinaryOpIC::HEAP_NUMBERS) {
6475 __ tst(r1, Operand(kSmiTagMask));
6476 __ b(ne, &r1_is_not_smi);
6477 GenerateTypeTransition(masm);
6478 __ jmp(&r1_is_smi);
6479 }
6480
6471 __ bind(&finished_loading_r0); 6481 __ bind(&finished_loading_r0);
6472 6482
6473 // Move r1 to a double in r0-r1. 6483 // Move r1 to a double in r0-r1.
6474 __ tst(r1, Operand(kSmiTagMask)); 6484 __ tst(r1, Operand(kSmiTagMask));
6475 __ b(eq, &r1_is_smi); // It's a Smi so don't check it's a heap number. 6485 __ b(eq, &r1_is_smi); // It's a Smi so don't check it's a heap number.
6486 __ bind(&r1_is_not_smi);
6476 __ CompareObjectType(r1, r4, r4, HEAP_NUMBER_TYPE); 6487 __ CompareObjectType(r1, r4, r4, HEAP_NUMBER_TYPE);
6477 __ b(ne, &slow); 6488 __ b(ne, &slow);
6478 if (mode_ == OVERWRITE_LEFT) { 6489 if (mode_ == OVERWRITE_LEFT) {
6479 __ mov(r5, Operand(r1)); // Overwrite this heap number. 6490 __ mov(r5, Operand(r1)); // Overwrite this heap number.
6480 } 6491 }
6481 if (use_fp_registers) { 6492 if (use_fp_registers) {
6482 CpuFeatures::Scope scope(VFP3); 6493 CpuFeatures::Scope scope(VFP3);
6483 // Load the double from tagged HeapNumber r1 to d6. 6494 // Load the double from tagged HeapNumber r1 to d6.
6484 __ sub(r7, r1, Operand(kHeapObjectTag)); 6495 __ sub(r7, r1, Operand(kHeapObjectTag));
6485 __ vldr(d6, r7, HeapNumber::kValueOffset); 6496 __ vldr(d6, r7, HeapNumber::kValueOffset);
(...skipping 2840 matching lines...) Expand 10 before | Expand all | Expand 10 after
9326 9337
9327 // Just jump to runtime to add the two strings. 9338 // Just jump to runtime to add the two strings.
9328 __ bind(&string_add_runtime); 9339 __ bind(&string_add_runtime);
9329 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); 9340 __ TailCallRuntime(Runtime::kStringAdd, 2, 1);
9330 } 9341 }
9331 9342
9332 9343
9333 #undef __ 9344 #undef __
9334 9345
9335 } } // namespace v8::internal 9346 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698