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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 6993057: Version 3.4.2 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/api.cc ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after
2659 __ b(ne, &return_heap_number); 2659 __ b(ne, &return_heap_number);
2660 __ bind(&not_zero); 2660 __ bind(&not_zero);
2661 2661
2662 // Tag the result and return. 2662 // Tag the result and return.
2663 __ SmiTag(r0, scratch1); 2663 __ SmiTag(r0, scratch1);
2664 __ Ret(); 2664 __ Ret();
2665 } else { 2665 } else {
2666 // DIV just falls through to allocating a heap number. 2666 // DIV just falls through to allocating a heap number.
2667 } 2667 }
2668 2668
2669 __ bind(&return_heap_number);
2670 // Return a heap number, or fall through to type transition or runtime
2671 // call if we can't.
2669 if (result_type_ >= (op_ == Token::DIV) ? BinaryOpIC::HEAP_NUMBER 2672 if (result_type_ >= (op_ == Token::DIV) ? BinaryOpIC::HEAP_NUMBER
2670 : BinaryOpIC::INT32) { 2673 : BinaryOpIC::INT32) {
2671 __ bind(&return_heap_number);
2672 // We are using vfp registers so r5 is available. 2674 // We are using vfp registers so r5 is available.
2673 heap_number_result = r5; 2675 heap_number_result = r5;
2674 GenerateHeapResultAllocation(masm, 2676 GenerateHeapResultAllocation(masm,
2675 heap_number_result, 2677 heap_number_result,
2676 heap_number_map, 2678 heap_number_map,
2677 scratch1, 2679 scratch1,
2678 scratch2, 2680 scratch2,
2679 &call_runtime); 2681 &call_runtime);
2680 __ sub(r0, heap_number_result, Operand(kHeapObjectTag)); 2682 __ sub(r0, heap_number_result, Operand(kHeapObjectTag));
2681 __ vstr(d5, r0, HeapNumber::kValueOffset); 2683 __ vstr(d5, r0, HeapNumber::kValueOffset);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2835 __ TailCallStub(&stub); 2837 __ TailCallStub(&stub);
2836 } 2838 }
2837 2839
2838 break; 2840 break;
2839 } 2841 }
2840 2842
2841 default: 2843 default:
2842 UNREACHABLE(); 2844 UNREACHABLE();
2843 } 2845 }
2844 2846
2845 if (transition.is_linked()) { 2847 // We never expect DIV to yield an integer result, so we always generate
2848 // type transition code for DIV operations expecting an integer result: the
2849 // code will fall through to this type transition.
2850 if (transition.is_linked() ||
2851 ((op_ == Token::DIV) && (result_type_ <= BinaryOpIC::INT32))) {
2846 __ bind(&transition); 2852 __ bind(&transition);
2847 GenerateTypeTransition(masm); 2853 GenerateTypeTransition(masm);
2848 } 2854 }
2849 2855
2850 __ bind(&call_runtime); 2856 __ bind(&call_runtime);
2851 GenerateCallRuntime(masm); 2857 GenerateCallRuntime(masm);
2852 } 2858 }
2853 2859
2854 2860
2855 void BinaryOpStub::GenerateOddballStub(MacroAssembler* masm) { 2861 void BinaryOpStub::GenerateOddballStub(MacroAssembler* masm) {
(...skipping 3554 matching lines...) Expand 10 before | Expand all | Expand 10 after
6410 __ mov(result, Operand(0)); 6416 __ mov(result, Operand(0));
6411 __ Ret(); 6417 __ Ret();
6412 } 6418 }
6413 6419
6414 6420
6415 #undef __ 6421 #undef __
6416 6422
6417 } } // namespace v8::internal 6423 } } // namespace v8::internal
6418 6424
6419 #endif // V8_TARGET_ARCH_ARM 6425 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698