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

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

Issue 6588047: Version 3.1.7... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 9 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/arm/code-stubs-arm.h ('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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 1289
1290 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) 1290 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
1291 // tagged as a small integer. 1291 // tagged as a small integer.
1292 __ InvokeBuiltin(native, JUMP_JS); 1292 __ InvokeBuiltin(native, JUMP_JS);
1293 } 1293 }
1294 1294
1295 1295
1296 // This stub does not handle the inlined cases (Smis, Booleans, undefined). 1296 // This stub does not handle the inlined cases (Smis, Booleans, undefined).
1297 // The stub returns zero for false, and a non-zero value for true. 1297 // The stub returns zero for false, and a non-zero value for true.
1298 void ToBooleanStub::Generate(MacroAssembler* masm) { 1298 void ToBooleanStub::Generate(MacroAssembler* masm) {
1299 // This stub uses VFP3 instructions.
1300 ASSERT(CpuFeatures::IsEnabled(VFP3));
1301
1299 Label false_result; 1302 Label false_result;
1300 Label not_heap_number; 1303 Label not_heap_number;
1301 Register scratch = r9.is(tos_) ? r7 : r9; 1304 Register scratch = r9.is(tos_) ? r7 : r9;
1302 1305
1303 __ LoadRoot(ip, Heap::kNullValueRootIndex); 1306 __ LoadRoot(ip, Heap::kNullValueRootIndex);
1304 __ cmp(tos_, ip); 1307 __ cmp(tos_, ip);
1305 __ b(eq, &false_result); 1308 __ b(eq, &false_result);
1306 1309
1307 // HeapNumber => false iff +0, -0, or NaN. 1310 // HeapNumber => false iff +0, -0, or NaN.
1308 __ ldr(scratch, FieldMemOperand(tos_, HeapObject::kMapOffset)); 1311 __ ldr(scratch, FieldMemOperand(tos_, HeapObject::kMapOffset));
(...skipping 4641 matching lines...) Expand 10 before | Expand all | Expand 10 after
5950 __ Jump(r2); 5953 __ Jump(r2);
5951 } 5954 }
5952 5955
5953 5956
5954 void DirectCEntryStub::Generate(MacroAssembler* masm) { 5957 void DirectCEntryStub::Generate(MacroAssembler* masm) {
5955 __ ldr(pc, MemOperand(sp, 0)); 5958 __ ldr(pc, MemOperand(sp, 0));
5956 } 5959 }
5957 5960
5958 5961
5959 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, 5962 void DirectCEntryStub::GenerateCall(MacroAssembler* masm,
5960 ApiFunction *function) { 5963 ExternalReference function) {
5961 __ mov(lr, Operand(reinterpret_cast<intptr_t>(GetCode().location()), 5964 __ mov(lr, Operand(reinterpret_cast<intptr_t>(GetCode().location()),
5962 RelocInfo::CODE_TARGET)); 5965 RelocInfo::CODE_TARGET));
5963 __ mov(r2, 5966 __ mov(r2, Operand(function));
5964 Operand(ExternalReference(function, ExternalReference::DIRECT_CALL)));
5965 // Push return address (accessible to GC through exit frame pc). 5967 // Push return address (accessible to GC through exit frame pc).
5966 __ str(pc, MemOperand(sp, 0)); 5968 __ str(pc, MemOperand(sp, 0));
5967 __ Jump(r2); // Call the api function. 5969 __ Jump(r2); // Call the api function.
5968 } 5970 }
5969 5971
5970 5972
5971 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, 5973 void DirectCEntryStub::GenerateCall(MacroAssembler* masm,
5972 Register target) { 5974 Register target) {
5973 __ mov(lr, Operand(reinterpret_cast<intptr_t>(GetCode().location()), 5975 __ mov(lr, Operand(reinterpret_cast<intptr_t>(GetCode().location()),
5974 RelocInfo::CODE_TARGET)); 5976 RelocInfo::CODE_TARGET));
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
6128 __ strb(untagged_value, MemOperand(external_pointer, untagged_key)); 6130 __ strb(untagged_value, MemOperand(external_pointer, untagged_key));
6129 __ Ret(); 6131 __ Ret();
6130 } 6132 }
6131 6133
6132 6134
6133 #undef __ 6135 #undef __
6134 6136
6135 } } // namespace v8::internal 6137 } } // namespace v8::internal
6136 6138
6137 #endif // V8_TARGET_ARCH_ARM 6139 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698