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

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

Issue 660244: Support for MIPS architecture. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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/mips/macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 415 }
416 addiu(sp, sp, 4 * NumSaved); 416 addiu(sp, sp, 4 * NumSaved);
417 } 417 }
418 418
419 419
420 // Emulated condtional branches do not emit a nop in the branch delay slot. 420 // Emulated condtional branches do not emit a nop in the branch delay slot.
421 421
422 // Trashes the at register if no scratch register is provided. 422 // Trashes the at register if no scratch register is provided.
423 void MacroAssembler::Branch(Condition cond, int16_t offset, Register rs, 423 void MacroAssembler::Branch(Condition cond, int16_t offset, Register rs,
424 const Operand& rt, Register scratch) { 424 const Operand& rt, Register scratch) {
425 Register r2; 425 Register r2 = no_reg;
426 if (rt.is_reg()) { 426 if (rt.is_reg()) {
427 // We don't want any other register but scratch clobbered. 427 // We don't want any other register but scratch clobbered.
428 ASSERT(!scratch.is(rs) && !scratch.is(rt.rm_)); 428 ASSERT(!scratch.is(rs) && !scratch.is(rt.rm_));
429 r2 = rt.rm_; 429 r2 = rt.rm_;
430 } else if (cond != cc_always) { 430 } else if (cond != cc_always) {
431 // We don't want any other register but scratch clobbered. 431 // We don't want any other register but scratch clobbered.
432 ASSERT(!scratch.is(rs)); 432 ASSERT(!scratch.is(rs));
433 r2 = scratch; 433 r2 = scratch;
434 li(r2, rt); 434 li(r2, rt);
435 } 435 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 break; 482 break;
483 483
484 default: 484 default:
485 UNREACHABLE(); 485 UNREACHABLE();
486 } 486 }
487 } 487 }
488 488
489 489
490 void MacroAssembler::Branch(Condition cond, Label* L, Register rs, 490 void MacroAssembler::Branch(Condition cond, Label* L, Register rs,
491 const Operand& rt, Register scratch) { 491 const Operand& rt, Register scratch) {
492 Register r2; 492 Register r2 = no_reg;
493 if (rt.is_reg()) { 493 if (rt.is_reg()) {
494 r2 = rt.rm_; 494 r2 = rt.rm_;
495 } else if (cond != cc_always) { 495 } else if (cond != cc_always) {
496 r2 = scratch; 496 r2 = scratch;
497 li(r2, rt); 497 li(r2, rt);
498 } 498 }
499 499
500 // We use branch_offset as an argument for the branch instructions to be sure 500 // We use branch_offset as an argument for the branch instructions to be sure
501 // it is called just before generating the branch instruction, as needed. 501 // it is called just before generating the branch instruction, as needed.
502 502
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 } 552 }
553 } 553 }
554 554
555 555
556 // Trashes the at register if no scratch register is provided. 556 // Trashes the at register if no scratch register is provided.
557 // We need to use a bgezal or bltzal, but they can't be used directly with the 557 // We need to use a bgezal or bltzal, but they can't be used directly with the
558 // slt instructions. We could use sub or add instead but we would miss overflow 558 // slt instructions. We could use sub or add instead but we would miss overflow
559 // cases, so we keep slt and add an intermediate third instruction. 559 // cases, so we keep slt and add an intermediate third instruction.
560 void MacroAssembler::BranchAndLink(Condition cond, int16_t offset, Register rs, 560 void MacroAssembler::BranchAndLink(Condition cond, int16_t offset, Register rs,
561 const Operand& rt, Register scratch) { 561 const Operand& rt, Register scratch) {
562 Register r2; 562 Register r2 = no_reg;
563 if (rt.is_reg()) { 563 if (rt.is_reg()) {
564 r2 = rt.rm_; 564 r2 = rt.rm_;
565 } else if (cond != cc_always) { 565 } else if (cond != cc_always) {
566 r2 = scratch; 566 r2 = scratch;
567 li(r2, rt); 567 li(r2, rt);
568 } 568 }
569 569
570 switch (cond) { 570 switch (cond) {
571 case cc_always: 571 case cc_always:
572 bal(offset); 572 bal(offset);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 break; 627 break;
628 628
629 default: 629 default:
630 UNREACHABLE(); 630 UNREACHABLE();
631 } 631 }
632 } 632 }
633 633
634 634
635 void MacroAssembler::BranchAndLink(Condition cond, Label* L, Register rs, 635 void MacroAssembler::BranchAndLink(Condition cond, Label* L, Register rs,
636 const Operand& rt, Register scratch) { 636 const Operand& rt, Register scratch) {
637 Register r2; 637 Register r2 = no_reg;
638 if (rt.is_reg()) { 638 if (rt.is_reg()) {
639 r2 = rt.rm_; 639 r2 = rt.rm_;
640 } else if (cond != cc_always) { 640 } else if (cond != cc_always) {
641 r2 = scratch; 641 r2 = scratch;
642 li(r2, rt); 642 li(r2, rt);
643 } 643 }
644 644
645 switch (cond) { 645 switch (cond) {
646 case cc_always: 646 case cc_always:
647 bal(shifted_branch_offset(L, false)); 647 bal(shifted_branch_offset(L, false));
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 void MacroAssembler::Drop(int count, Condition cond) { 780 void MacroAssembler::Drop(int count, Condition cond) {
781 UNIMPLEMENTED_MIPS(); 781 UNIMPLEMENTED_MIPS();
782 } 782 }
783 783
784 784
785 void MacroAssembler::Call(Label* target) { 785 void MacroAssembler::Call(Label* target) {
786 UNIMPLEMENTED_MIPS(); 786 UNIMPLEMENTED_MIPS();
787 } 787 }
788 788
789 789
790 #ifdef ENABLE_DEBUGGER_SUPPORT
791 // ---------------------------------------------------------------------------
792 // Debugger Support
793
794 void MacroAssembler::DebugBreak() {
795 UNIMPLEMENTED_MIPS();
796 }
797 #endif
798
799
790 // --------------------------------------------------------------------------- 800 // ---------------------------------------------------------------------------
791 // Exception handling 801 // Exception handling
792 802
793 void MacroAssembler::PushTryHandler(CodeLocation try_location, 803 void MacroAssembler::PushTryHandler(CodeLocation try_location,
794 HandlerType type) { 804 HandlerType type) {
795 UNIMPLEMENTED_MIPS(); 805 UNIMPLEMENTED_MIPS();
796 } 806 }
797 807
798 808
799 void MacroAssembler::PopTryHandler() { 809 void MacroAssembler::PopTryHandler() {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 UNIMPLEMENTED_MIPS(); 903 UNIMPLEMENTED_MIPS();
894 } 904 }
895 905
896 906
897 void MacroAssembler::Abort(const char* msg) { 907 void MacroAssembler::Abort(const char* msg) {
898 UNIMPLEMENTED_MIPS(); 908 UNIMPLEMENTED_MIPS();
899 } 909 }
900 910
901 } } // namespace v8::internal 911 } } // namespace v8::internal
902 912
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698