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

Side by Side Diff: src/mips64/constants-mips64.cc

Issue 1195793002: MIPS: Implemented PC-relative instructions for R6. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/mips64/constants-mips64.h ('k') | src/mips64/disasm-mips64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/mips64/constants-mips64.h" 9 #include "src/mips64/constants-mips64.h"
10 10
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 case J: 134 case J:
135 case JAL: 135 case JAL:
136 case BEQ: 136 case BEQ:
137 case BNE: 137 case BNE:
138 case BLEZ: 138 case BLEZ:
139 case BGTZ: 139 case BGTZ:
140 case BEQL: 140 case BEQL:
141 case BNEL: 141 case BNEL:
142 case BLEZL: 142 case BLEZL:
143 case BGTZL: 143 case BGTZL:
144 case BC:
145 case BALC:
144 return true; 146 return true;
145 case REGIMM: 147 case REGIMM:
146 switch (RtFieldRaw()) { 148 switch (RtFieldRaw()) {
147 case BLTZ: 149 case BLTZ:
148 case BGEZ: 150 case BGEZ:
149 case BLTZAL: 151 case BLTZAL:
150 case BGEZAL: 152 case BGEZAL:
151 return true; 153 return true;
152 default: 154 default:
153 return false; 155 return false;
(...skipping 12 matching lines...) Expand all
166 return false; 168 return false;
167 } 169 }
168 } 170 }
169 171
170 172
171 bool Instruction::IsLinkingInstruction() const { 173 bool Instruction::IsLinkingInstruction() const {
172 const int op = OpcodeFieldRaw(); 174 const int op = OpcodeFieldRaw();
173 switch (op) { 175 switch (op) {
174 case JAL: 176 case JAL:
175 return true; 177 return true;
178 case POP76:
179 if (RsFieldRawNoAssert() == JIALC)
180 return true; // JIALC
181 else
182 return false; // BNEZC
176 case REGIMM: 183 case REGIMM:
177 switch (RtFieldRaw()) { 184 switch (RtFieldRaw()) {
178 case BGEZAL: 185 case BGEZAL:
179 case BLTZAL: 186 case BLTZAL:
180 return true; 187 return true;
181 default: 188 default:
182 return false; 189 return false;
183 } 190 }
184 case SPECIAL: 191 case SPECIAL:
185 switch (FunctionFieldRaw()) { 192 switch (FunctionFieldRaw()) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 return kRegisterType; 290 return kRegisterType;
284 default: 291 default:
285 return kUnsupported; 292 return kUnsupported;
286 } 293 }
287 break; 294 break;
288 case SPECIAL3: 295 case SPECIAL3:
289 switch (FunctionFieldRaw()) { 296 switch (FunctionFieldRaw()) {
290 case INS: 297 case INS:
291 case EXT: 298 case EXT:
292 case DEXT: 299 case DEXT:
293 case BITSWAP:
294 case DBITSWAP:
295 return kRegisterType; 300 return kRegisterType;
301 case BSHFL: {
302 int sa = SaFieldRaw() >> kSaShift;
303 switch (sa) {
304 case BITSWAP:
305 return kRegisterType;
306 case WSBH:
307 case SEB:
308 case SEH:
309 return kUnsupported;
310 }
311 sa >>= kBp2Bits;
312 switch (sa) {
313 case ALIGN:
314 return kRegisterType;
315 default:
316 return kUnsupported;
317 }
318 }
319 case DBSHFL: {
320 int sa = SaFieldRaw() >> kSaShift;
321 switch (sa) {
322 case DBITSWAP:
323 return kRegisterType;
324 case DSBH:
325 case DSHD:
326 return kUnsupported;
327 }
328 sa = SaFieldRaw() >> kSaShift;
329 sa >>= kBp3Bits;
330 switch (sa) {
331 case DALIGN:
332 return kRegisterType;
333 default:
334 return kUnsupported;
335 }
336 }
296 default: 337 default:
297 return kUnsupported; 338 return kUnsupported;
298 } 339 }
299 break; 340 break;
300 case COP1: // Coprocessor instructions. 341 case COP1: // Coprocessor instructions.
301 switch (RsFieldRawNoAssert()) { 342 switch (RsFieldRawNoAssert()) {
302 case BC1: // Branch on coprocessor condition. 343 case BC1: // Branch on coprocessor condition.
303 case BC1EQZ: 344 case BC1EQZ:
304 case BC1NEZ: 345 case BC1NEZ:
305 return kImmediateType; 346 return kImmediateType;
(...skipping 16 matching lines...) Expand all
322 case SLTI: 363 case SLTI:
323 case SLTIU: 364 case SLTIU:
324 case ANDI: 365 case ANDI:
325 case ORI: 366 case ORI:
326 case XORI: 367 case XORI:
327 case LUI: 368 case LUI:
328 case BEQL: 369 case BEQL:
329 case BNEL: 370 case BNEL:
330 case BLEZL: 371 case BLEZL:
331 case BGTZL: 372 case BGTZL:
332 case BEQZC: 373 case POP66:
333 case BNEZC: 374 case POP76:
334 case LB: 375 case LB:
335 case LH: 376 case LH:
336 case LWL: 377 case LWL:
337 case LW: 378 case LW:
338 case LWU: 379 case LWU:
339 case LD: 380 case LD:
340 case LBU: 381 case LBU:
341 case LHU: 382 case LHU:
342 case LWR: 383 case LWR:
343 case SB: 384 case SB:
344 case SH: 385 case SH:
345 case SWL: 386 case SWL:
346 case SW: 387 case SW:
347 case SD: 388 case SD:
348 case SWR: 389 case SWR:
349 case LWC1: 390 case LWC1:
350 case LDC1: 391 case LDC1:
351 case SWC1: 392 case SWC1:
352 case SDC1: 393 case SDC1:
394 case PCREL:
395 case BC:
396 case BALC:
353 return kImmediateType; 397 return kImmediateType;
354 // 26 bits immediate type instructions. e.g.: j imm26. 398 // 26 bits immediate type instructions. e.g.: j imm26.
355 case J: 399 case J:
356 case JAL: 400 case JAL:
357 return kJumpType; 401 return kJumpType;
358 default: 402 default:
359 return kUnsupported; 403 return kUnsupported;
360 } 404 }
361 return kUnsupported; 405 return kUnsupported;
362 } 406 }
363 407
364 408
365 } // namespace internal 409 } // namespace internal
366 } // namespace v8 410 } // namespace v8
367 411
368 #endif // V8_TARGET_ARCH_MIPS64 412 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/constants-mips64.h ('k') | src/mips64/disasm-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698