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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 6272019: ARM: Change BranchOnSmi/BranchOnNotSmi to JumpIfSmi/JumpIfNotSmi (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 11 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/macro-assembler-arm.h ('k') | src/arm/stub-cache-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 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 cmp(type_reg, Operand(type)); 1378 cmp(type_reg, Operand(type));
1379 } 1379 }
1380 1380
1381 1381
1382 void MacroAssembler::CheckMap(Register obj, 1382 void MacroAssembler::CheckMap(Register obj,
1383 Register scratch, 1383 Register scratch,
1384 Handle<Map> map, 1384 Handle<Map> map,
1385 Label* fail, 1385 Label* fail,
1386 bool is_heap_object) { 1386 bool is_heap_object) {
1387 if (!is_heap_object) { 1387 if (!is_heap_object) {
1388 BranchOnSmi(obj, fail); 1388 JumpIfSmi(obj, fail);
1389 } 1389 }
1390 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); 1390 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
1391 mov(ip, Operand(map)); 1391 mov(ip, Operand(map));
1392 cmp(scratch, ip); 1392 cmp(scratch, ip);
1393 b(ne, fail); 1393 b(ne, fail);
1394 } 1394 }
1395 1395
1396 1396
1397 void MacroAssembler::CheckMap(Register obj, 1397 void MacroAssembler::CheckMap(Register obj,
1398 Register scratch, 1398 Register scratch,
1399 Heap::RootListIndex index, 1399 Heap::RootListIndex index,
1400 Label* fail, 1400 Label* fail,
1401 bool is_heap_object) { 1401 bool is_heap_object) {
1402 if (!is_heap_object) { 1402 if (!is_heap_object) {
1403 BranchOnSmi(obj, fail); 1403 JumpIfSmi(obj, fail);
1404 } 1404 }
1405 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); 1405 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
1406 LoadRoot(ip, index); 1406 LoadRoot(ip, index);
1407 cmp(scratch, ip); 1407 cmp(scratch, ip);
1408 b(ne, fail); 1408 b(ne, fail);
1409 } 1409 }
1410 1410
1411 1411
1412 void MacroAssembler::TryGetFunctionPrototype(Register function, 1412 void MacroAssembler::TryGetFunctionPrototype(Register function,
1413 Register result, 1413 Register result,
1414 Register scratch, 1414 Register scratch,
1415 Label* miss) { 1415 Label* miss) {
1416 // Check that the receiver isn't a smi. 1416 // Check that the receiver isn't a smi.
1417 BranchOnSmi(function, miss); 1417 JumpIfSmi(function, miss);
1418 1418
1419 // Check that the function really is a function. Load map into result reg. 1419 // Check that the function really is a function. Load map into result reg.
1420 CompareObjectType(function, result, scratch, JS_FUNCTION_TYPE); 1420 CompareObjectType(function, result, scratch, JS_FUNCTION_TYPE);
1421 b(ne, miss); 1421 b(ne, miss);
1422 1422
1423 // Make sure that the function has an instance prototype. 1423 // Make sure that the function has an instance prototype.
1424 Label non_instance; 1424 Label non_instance;
1425 ldrb(scratch, FieldMemOperand(result, Map::kBitFieldOffset)); 1425 ldrb(scratch, FieldMemOperand(result, Map::kBitFieldOffset));
1426 tst(scratch, Operand(1 << Map::kHasNonInstancePrototype)); 1426 tst(scratch, Operand(1 << Map::kHasNonInstancePrototype));
1427 b(ne, &non_instance); 1427 b(ne, &non_instance);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 DwVfpRegister result, 1506 DwVfpRegister result,
1507 Register scratch1, 1507 Register scratch1,
1508 Register scratch2, 1508 Register scratch2,
1509 Register heap_number_map, 1509 Register heap_number_map,
1510 SwVfpRegister scratch3, 1510 SwVfpRegister scratch3,
1511 Label* not_number, 1511 Label* not_number,
1512 ObjectToDoubleFlags flags) { 1512 ObjectToDoubleFlags flags) {
1513 Label done; 1513 Label done;
1514 if ((flags & OBJECT_NOT_SMI) == 0) { 1514 if ((flags & OBJECT_NOT_SMI) == 0) {
1515 Label not_smi; 1515 Label not_smi;
1516 BranchOnNotSmi(object, &not_smi); 1516 JumpIfNotSmi(object, &not_smi);
1517 // Remove smi tag and convert to double. 1517 // Remove smi tag and convert to double.
1518 mov(scratch1, Operand(object, ASR, kSmiTagSize)); 1518 mov(scratch1, Operand(object, ASR, kSmiTagSize));
1519 vmov(scratch3, scratch1); 1519 vmov(scratch3, scratch1);
1520 vcvt_f64_s32(result, scratch3); 1520 vcvt_f64_s32(result, scratch3);
1521 b(&done); 1521 b(&done);
1522 bind(&not_smi); 1522 bind(&not_smi);
1523 } 1523 }
1524 // Check for heap number and load double value from it. 1524 // Check for heap number and load double value from it.
1525 ldr(scratch1, FieldMemOperand(object, HeapObject::kMapOffset)); 1525 ldr(scratch1, FieldMemOperand(object, HeapObject::kMapOffset));
1526 sub(scratch2, object, Operand(kHeapObjectTag)); 1526 sub(scratch2, object, Operand(kHeapObjectTag));
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
2256 2256
2257 void CodePatcher::Emit(Address addr) { 2257 void CodePatcher::Emit(Address addr) {
2258 masm()->emit(reinterpret_cast<Instr>(addr)); 2258 masm()->emit(reinterpret_cast<Instr>(addr));
2259 } 2259 }
2260 #endif // ENABLE_DEBUGGER_SUPPORT 2260 #endif // ENABLE_DEBUGGER_SUPPORT
2261 2261
2262 2262
2263 } } // namespace v8::internal 2263 } } // namespace v8::internal
2264 2264
2265 #endif // V8_TARGET_ARCH_ARM 2265 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698