OLD | NEW |
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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 RecordRelocInfo(j.rmode_, j.imm32_); | 663 RecordRelocInfo(j.rmode_, j.imm32_); |
664 } | 664 } |
665 // We need always the same number of instructions as we may need to patch | 665 // We need always the same number of instructions as we may need to patch |
666 // this code to load another value which may need 2 instructions to load. | 666 // this code to load another value which may need 2 instructions to load. |
667 lui(rd, (j.imm32_ & kHiMask) >> kLuiShift); | 667 lui(rd, (j.imm32_ & kHiMask) >> kLuiShift); |
668 ori(rd, rd, (j.imm32_ & kImm16Mask)); | 668 ori(rd, rd, (j.imm32_ & kImm16Mask)); |
669 } | 669 } |
670 } | 670 } |
671 | 671 |
672 | 672 |
673 // Exception-generating instructions and debugging support. | |
674 void MacroAssembler::stop(const char* msg) { | |
675 // TO_UPGRADE: Just a break for now. Maybe we could upgrade it. | |
676 // We use the 0x54321 value to be able to find it easily when reading memory. | |
677 break_(0x54321); | |
678 } | |
679 | |
680 | |
681 void MacroAssembler::MultiPush(RegList regs) { | 673 void MacroAssembler::MultiPush(RegList regs) { |
682 int16_t NumSaved = 0; | 674 int16_t NumSaved = 0; |
683 int16_t NumToPush = NumberOfBitsSet(regs); | 675 int16_t NumToPush = NumberOfBitsSet(regs); |
684 | 676 |
685 addiu(sp, sp, -4 * NumToPush); | 677 addiu(sp, sp, -4 * NumToPush); |
686 for (int16_t i = kNumRegisters; i > 0; i--) { | 678 for (int16_t i = kNumRegisters; i > 0; i--) { |
687 if ((regs & (1 << i)) != 0) { | 679 if ((regs & (1 << i)) != 0) { |
688 sw(ToRegister(i), MemOperand(sp, 4 * (NumToPush - ++NumSaved))); | 680 sw(ToRegister(i), MemOperand(sp, 4 * (NumToPush - ++NumSaved))); |
689 } | 681 } |
690 } | 682 } |
(...skipping 3356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4047 opcode == BGTZL); | 4039 opcode == BGTZL); |
4048 opcode = (cond == eq) ? BEQ : BNE; | 4040 opcode = (cond == eq) ? BEQ : BNE; |
4049 instr = (instr & ~kOpcodeMask) | opcode; | 4041 instr = (instr & ~kOpcodeMask) | opcode; |
4050 masm_.emit(instr); | 4042 masm_.emit(instr); |
4051 } | 4043 } |
4052 | 4044 |
4053 | 4045 |
4054 } } // namespace v8::internal | 4046 } } // namespace v8::internal |
4055 | 4047 |
4056 #endif // V8_TARGET_ARCH_MIPS | 4048 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |