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

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

Issue 10536130: MIPS: Add negative lookups to polymorphic loads in Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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/mips/macro-assembler-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3455 matching lines...) Expand 10 before | Expand all | Expand 10 after
3466 3466
3467 3467
3468 void MacroAssembler::CompareMapAndBranch(Register obj, 3468 void MacroAssembler::CompareMapAndBranch(Register obj,
3469 Register scratch, 3469 Register scratch,
3470 Handle<Map> map, 3470 Handle<Map> map,
3471 Label* early_success, 3471 Label* early_success,
3472 Condition cond, 3472 Condition cond,
3473 Label* branch_to, 3473 Label* branch_to,
3474 CompareMapMode mode) { 3474 CompareMapMode mode) {
3475 lw(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); 3475 lw(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
3476 CompareMapAndBranch(scratch, map, early_success, cond, branch_to, mode);
3477 }
3478
3479
3480 void MacroAssembler::CompareMapAndBranch(Register obj_map,
3481 Handle<Map> map,
3482 Label* early_success,
3483 Condition cond,
3484 Label* branch_to,
3485 CompareMapMode mode) {
3476 Operand right = Operand(map); 3486 Operand right = Operand(map);
3477 if (mode == ALLOW_ELEMENT_TRANSITION_MAPS) { 3487 if (mode == ALLOW_ELEMENT_TRANSITION_MAPS) {
3478 ElementsKind kind = map->elements_kind(); 3488 ElementsKind kind = map->elements_kind();
3479 if (IsFastElementsKind(kind)) { 3489 if (IsFastElementsKind(kind)) {
3480 bool packed = IsFastPackedElementsKind(kind); 3490 bool packed = IsFastPackedElementsKind(kind);
3481 Map* current_map = *map; 3491 Map* current_map = *map;
3482 while (CanTransitionToMoreGeneralFastElementsKind(kind, packed)) { 3492 while (CanTransitionToMoreGeneralFastElementsKind(kind, packed)) {
3483 kind = GetNextMoreGeneralFastElementsKind(kind, packed); 3493 kind = GetNextMoreGeneralFastElementsKind(kind, packed);
3484 current_map = current_map->LookupElementsTransitionMap(kind); 3494 current_map = current_map->LookupElementsTransitionMap(kind);
3485 if (!current_map) break; 3495 if (!current_map) break;
3486 Branch(early_success, eq, scratch, right); 3496 Branch(early_success, eq, obj_map, right);
3487 right = Operand(Handle<Map>(current_map)); 3497 right = Operand(Handle<Map>(current_map));
3488 } 3498 }
3489 } 3499 }
3490 } 3500 }
3491 3501
3492 Branch(branch_to, cond, scratch, right); 3502 Branch(branch_to, cond, obj_map, right);
3493 } 3503 }
3494 3504
3495 3505
3496 void MacroAssembler::CheckMap(Register obj, 3506 void MacroAssembler::CheckMap(Register obj,
3497 Register scratch, 3507 Register scratch,
3498 Handle<Map> map, 3508 Handle<Map> map,
3499 Label* fail, 3509 Label* fail,
3500 SmiCheckType smi_check_type, 3510 SmiCheckType smi_check_type,
3501 CompareMapMode mode) { 3511 CompareMapMode mode) {
3502 if (smi_check_type == DO_SMI_CHECK) { 3512 if (smi_check_type == DO_SMI_CHECK) {
(...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after
5435 opcode == BGTZL); 5445 opcode == BGTZL);
5436 opcode = (cond == eq) ? BEQ : BNE; 5446 opcode = (cond == eq) ? BEQ : BNE;
5437 instr = (instr & ~kOpcodeMask) | opcode; 5447 instr = (instr & ~kOpcodeMask) | opcode;
5438 masm_.emit(instr); 5448 masm_.emit(instr);
5439 } 5449 }
5440 5450
5441 5451
5442 } } // namespace v8::internal 5452 } } // namespace v8::internal
5443 5453
5444 #endif // V8_TARGET_ARCH_MIPS 5454 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698