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

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

Issue 169733003: A64: Remove early_exit unused mechanism in CompareMap. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/a64/macro-assembler-a64.h ('k') | 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 3362 matching lines...) Expand 10 before | Expand all | Expand 10 after
3373 void MacroAssembler::CompareInstanceType(Register map, 3373 void MacroAssembler::CompareInstanceType(Register map,
3374 Register type_reg, 3374 Register type_reg,
3375 InstanceType type) { 3375 InstanceType type) {
3376 Ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); 3376 Ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
3377 Cmp(type_reg, type); 3377 Cmp(type_reg, type);
3378 } 3378 }
3379 3379
3380 3380
3381 void MacroAssembler::CompareMap(Register obj, 3381 void MacroAssembler::CompareMap(Register obj,
3382 Register scratch, 3382 Register scratch,
3383 Handle<Map> map, 3383 Handle<Map> map) {
3384 Label* early_success) {
3385 // TODO(jbramley): The early_success label isn't used. Remove it.
3386 Ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); 3384 Ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
3387 CompareMap(scratch, map, early_success); 3385 CompareMap(scratch, map);
3388 } 3386 }
3389 3387
3390 3388
3391 void MacroAssembler::CompareMap(Register obj_map, 3389 void MacroAssembler::CompareMap(Register obj_map,
3392 Handle<Map> map, 3390 Handle<Map> map) {
3393 Label* early_success) {
3394 // TODO(jbramley): The early_success label isn't used. Remove it.
3395 Cmp(obj_map, Operand(map)); 3391 Cmp(obj_map, Operand(map));
3396 } 3392 }
3397 3393
3398 3394
3399 void MacroAssembler::CheckMap(Register obj, 3395 void MacroAssembler::CheckMap(Register obj,
3400 Register scratch, 3396 Register scratch,
3401 Handle<Map> map, 3397 Handle<Map> map,
3402 Label* fail, 3398 Label* fail,
3403 SmiCheckType smi_check_type) { 3399 SmiCheckType smi_check_type) {
3404 if (smi_check_type == DO_SMI_CHECK) { 3400 if (smi_check_type == DO_SMI_CHECK) {
3405 JumpIfSmi(obj, fail); 3401 JumpIfSmi(obj, fail);
3406 } 3402 }
3407 3403
3408 Label success; 3404 CompareMap(obj, scratch, map);
3409 CompareMap(obj, scratch, map, &success);
3410 B(ne, fail); 3405 B(ne, fail);
3411 Bind(&success);
3412 } 3406 }
3413 3407
3414 3408
3415 void MacroAssembler::CheckMap(Register obj, 3409 void MacroAssembler::CheckMap(Register obj,
3416 Register scratch, 3410 Register scratch,
3417 Heap::RootListIndex index, 3411 Heap::RootListIndex index,
3418 Label* fail, 3412 Label* fail,
3419 SmiCheckType smi_check_type) { 3413 SmiCheckType smi_check_type) {
3420 if (smi_check_type == DO_SMI_CHECK) { 3414 if (smi_check_type == DO_SMI_CHECK) {
3421 JumpIfSmi(obj, fail); 3415 JumpIfSmi(obj, fail);
3422 } 3416 }
3423 Ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); 3417 Ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
3424 JumpIfNotRoot(scratch, index, fail); 3418 JumpIfNotRoot(scratch, index, fail);
3425 } 3419 }
3426 3420
3427 3421
3428 void MacroAssembler::CheckMap(Register obj_map, 3422 void MacroAssembler::CheckMap(Register obj_map,
3429 Handle<Map> map, 3423 Handle<Map> map,
3430 Label* fail, 3424 Label* fail,
3431 SmiCheckType smi_check_type) { 3425 SmiCheckType smi_check_type) {
3432 if (smi_check_type == DO_SMI_CHECK) { 3426 if (smi_check_type == DO_SMI_CHECK) {
3433 JumpIfSmi(obj_map, fail); 3427 JumpIfSmi(obj_map, fail);
3434 } 3428 }
3435 Label success; 3429
3436 CompareMap(obj_map, map, &success); 3430 CompareMap(obj_map, map);
3437 B(ne, fail); 3431 B(ne, fail);
3438 Bind(&success);
3439 } 3432 }
3440 3433
3441 3434
3442 void MacroAssembler::DispatchMap(Register obj, 3435 void MacroAssembler::DispatchMap(Register obj,
3443 Register scratch, 3436 Register scratch,
3444 Handle<Map> map, 3437 Handle<Map> map,
3445 Handle<Code> success, 3438 Handle<Code> success,
3446 SmiCheckType smi_check_type) { 3439 SmiCheckType smi_check_type) {
3447 Label fail; 3440 Label fail;
3448 if (smi_check_type == DO_SMI_CHECK) { 3441 if (smi_check_type == DO_SMI_CHECK) {
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
4913 } 4906 }
4914 } 4907 }
4915 4908
4916 4909
4917 #undef __ 4910 #undef __
4918 4911
4919 4912
4920 } } // namespace v8::internal 4913 } } // namespace v8::internal
4921 4914
4922 #endif // V8_TARGET_ARCH_A64 4915 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/macro-assembler-a64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698