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

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

Issue 2878043: Port inlined in-object property stores to ARM. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 5 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
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 bool positive = offset >= 0; 438 bool positive = offset >= 0;
439 if (!positive) offset = -offset; 439 if (!positive) offset = -offset;
440 ASSERT(is_uint12(offset)); 440 ASSERT(is_uint12(offset));
441 // Set bit indicating whether the offset should be added. 441 // Set bit indicating whether the offset should be added.
442 instr = (instr & ~B23) | (positive ? B23 : 0); 442 instr = (instr & ~B23) | (positive ? B23 : 0);
443 // Set the actual offset. 443 // Set the actual offset.
444 return (instr & ~Off12Mask) | offset; 444 return (instr & ~Off12Mask) | offset;
445 } 445 }
446 446
447 447
448 bool Assembler::IsStrRegisterImmediate(Instr instr) {
Rodolph Perfetta 2010/07/21 14:51:15 Should the name indicate this only returns true fo
Mads Ager (chromium) 2010/07/22 07:29:54 We could do that. I chose this name because it mat
449 return (instr & (B27 | B26 | B25 | B22 | B20)) == B26;
450 }
451
452
453 Instr Assembler::SetStrRegisterImmediateOffset(Instr instr, int offset) {
454 ASSERT(IsStrRegisterImmediate(instr));
455 bool positive = offset >= 0;
456 if (!positive) offset = -offset;
457 ASSERT(is_uint12(offset));
458 // Set bit indicating whether the offset should be added.
459 instr = (instr & ~B23) | (positive ? B23 : 0);
460 // Set the actual offset.
461 return (instr & ~Off12Mask) | offset;
462 }
463
464
465 bool Assembler::IsAddRegisterImmediate(Instr instr) {
466 return (instr & (B27 | B26 | B25 | B24 | B23 | B22 | B21)) == (B25 | B23);
467 }
468
469
470 Instr Assembler::SetAddRegisterImmediateOffset(Instr instr, int offset) {
471 ASSERT(IsAddRegisterImmediate(instr));
472 ASSERT(offset >= 0);
473 ASSERT(is_uint12(offset));
474 // Set the offset.
475 return (instr & ~Off12Mask) | offset;
476 }
477
478
448 Register Assembler::GetRd(Instr instr) { 479 Register Assembler::GetRd(Instr instr) {
449 Register reg; 480 Register reg;
450 reg.code_ = ((instr & kRdMask) >> kRdShift); 481 reg.code_ = ((instr & kRdMask) >> kRdShift);
451 return reg; 482 return reg;
452 } 483 }
453 484
454 485
455 bool Assembler::IsPush(Instr instr) { 486 bool Assembler::IsPush(Instr instr) {
456 return ((instr & ~kRdMask) == kPushRegPattern); 487 return ((instr & ~kRdMask) == kPushRegPattern);
457 } 488 }
(...skipping 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after
2539 2570
2540 // Since a constant pool was just emitted, move the check offset forward by 2571 // Since a constant pool was just emitted, move the check offset forward by
2541 // the standard interval. 2572 // the standard interval.
2542 next_buffer_check_ = pc_offset() + kCheckConstInterval; 2573 next_buffer_check_ = pc_offset() + kCheckConstInterval;
2543 } 2574 }
2544 2575
2545 2576
2546 } } // namespace v8::internal 2577 } } // namespace v8::internal
2547 2578
2548 #endif // V8_TARGET_ARCH_ARM 2579 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/codegen-arm.h » ('j') | src/arm/codegen-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698