OLD | NEW |
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 // On MIPS all instructions are 32 bits. | 151 // On MIPS all instructions are 32 bits. |
152 typedef int32_t Instr; | 152 typedef int32_t Instr; |
153 | 153 |
154 // Special Software Interrupt codes when used in the presence of the MIPS | 154 // Special Software Interrupt codes when used in the presence of the MIPS |
155 // simulator. | 155 // simulator. |
156 enum SoftwareInterruptCodes { | 156 enum SoftwareInterruptCodes { |
157 // Transition to C code. | 157 // Transition to C code. |
158 call_rt_redirected = 0xfffff | 158 call_rt_redirected = 0xfffff |
159 }; | 159 }; |
160 | 160 |
| 161 // On MIPS Simulator breakpoints can have different codes: |
| 162 // - Breaks between 0 and kMaxWatchpointCode are treated as simple watchpoints, |
| 163 // the simulator will run through them and print the registers. |
| 164 // - Breaks between kMaxWatchpointCode and kMaxStopCode are treated as stop() |
| 165 // instructions (see Assembler::stop()). |
| 166 // - Breaks larger than kMaxStopCode are simple breaks, dropping you into the |
| 167 // debugger. |
| 168 static const uint32_t kMaxWatchpointCode = 31; |
| 169 static const uint32_t kMaxStopCode = 127; |
| 170 STATIC_ASSERT(kMaxWatchpointCode < kMaxStopCode); |
| 171 |
| 172 |
161 // ----- Fields offset and length. | 173 // ----- Fields offset and length. |
162 static const int kOpcodeShift = 26; | 174 static const int kOpcodeShift = 26; |
163 static const int kOpcodeBits = 6; | 175 static const int kOpcodeBits = 6; |
164 static const int kRsShift = 21; | 176 static const int kRsShift = 21; |
165 static const int kRsBits = 5; | 177 static const int kRsBits = 5; |
166 static const int kRtShift = 16; | 178 static const int kRtShift = 16; |
167 static const int kRtBits = 5; | 179 static const int kRtBits = 5; |
168 static const int kRdShift = 11; | 180 static const int kRdShift = 11; |
169 static const int kRdBits = 5; | 181 static const int kRdBits = 5; |
170 static const int kSaShift = 6; | 182 static const int kSaShift = 6; |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 | 742 |
731 static const int kDoubleAlignmentBits = 3; | 743 static const int kDoubleAlignmentBits = 3; |
732 static const int kDoubleAlignment = (1 << kDoubleAlignmentBits); | 744 static const int kDoubleAlignment = (1 << kDoubleAlignmentBits); |
733 static const int kDoubleAlignmentMask = kDoubleAlignment - 1; | 745 static const int kDoubleAlignmentMask = kDoubleAlignment - 1; |
734 | 746 |
735 | 747 |
736 } } // namespace v8::internal | 748 } } // namespace v8::internal |
737 | 749 |
738 #endif // #ifndef V8_MIPS_CONSTANTS_H_ | 750 #endif // #ifndef V8_MIPS_CONSTANTS_H_ |
739 | 751 |
OLD | NEW |