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

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

Issue 1545013002: Add assembler test. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 11 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/assembler-mips64.cc ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_MIPS_CONSTANTS_H_ 5 #ifndef V8_MIPS_CONSTANTS_H_
6 #define V8_MIPS_CONSTANTS_H_ 6 #define V8_MIPS_CONSTANTS_H_
7 7
8 #include "src/base/logging.h" 8 #include "src/base/logging.h"
9 #include "src/base/macros.h" 9 #include "src/base/macros.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 const int kOpcodeShift = 26; 230 const int kOpcodeShift = 26;
231 const int kOpcodeBits = 6; 231 const int kOpcodeBits = 6;
232 const int kRsShift = 21; 232 const int kRsShift = 21;
233 const int kRsBits = 5; 233 const int kRsBits = 5;
234 const int kRtShift = 16; 234 const int kRtShift = 16;
235 const int kRtBits = 5; 235 const int kRtBits = 5;
236 const int kRdShift = 11; 236 const int kRdShift = 11;
237 const int kRdBits = 5; 237 const int kRdBits = 5;
238 const int kSaShift = 6; 238 const int kSaShift = 6;
239 const int kSaBits = 5; 239 const int kSaBits = 5;
240 const int kLsaSaBits = 2;
240 const int kFunctionShift = 0; 241 const int kFunctionShift = 0;
241 const int kFunctionBits = 6; 242 const int kFunctionBits = 6;
242 const int kLuiShift = 16; 243 const int kLuiShift = 16;
243 const int kBp2Shift = 6; 244 const int kBp2Shift = 6;
244 const int kBp2Bits = 2; 245 const int kBp2Bits = 2;
245 const int kBp3Shift = 6; 246 const int kBp3Shift = 6;
246 const int kBp3Bits = 3; 247 const int kBp3Bits = 3;
247 248
248 const int kImm16Shift = 0; 249 const int kImm16Shift = 0;
249 const int kImm16Bits = 16; 250 const int kImm16Bits = 16;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 COP1X = ((1 << 4) + 3) << kOpcodeShift 380 COP1X = ((1 << 4) + 3) << kOpcodeShift
380 }; 381 };
381 382
382 enum SecondaryField { 383 enum SecondaryField {
383 // SPECIAL Encoding of Function Field. 384 // SPECIAL Encoding of Function Field.
384 SLL = ((0 << 3) + 0), 385 SLL = ((0 << 3) + 0),
385 MOVCI = ((0 << 3) + 1), 386 MOVCI = ((0 << 3) + 1),
386 SRL = ((0 << 3) + 2), 387 SRL = ((0 << 3) + 2),
387 SRA = ((0 << 3) + 3), 388 SRA = ((0 << 3) + 3),
388 SLLV = ((0 << 3) + 4), 389 SLLV = ((0 << 3) + 4),
390 LSA = ((0 << 3) + 5),
389 SRLV = ((0 << 3) + 6), 391 SRLV = ((0 << 3) + 6),
390 SRAV = ((0 << 3) + 7), 392 SRAV = ((0 << 3) + 7),
391 393
392 JR = ((1 << 3) + 0), 394 JR = ((1 << 3) + 0),
393 JALR = ((1 << 3) + 1), 395 JALR = ((1 << 3) + 1),
394 MOVZ = ((1 << 3) + 2), 396 MOVZ = ((1 << 3) + 2),
395 MOVN = ((1 << 3) + 3), 397 MOVN = ((1 << 3) + 3),
396 BREAK = ((1 << 3) + 5), 398 BREAK = ((1 << 3) + 5),
397 399
398 MFHI = ((2 << 3) + 0), 400 MFHI = ((2 << 3) + 0),
399 CLZ_R6 = ((2 << 3) + 0), 401 CLZ_R6 = ((2 << 3) + 0),
400 CLO_R6 = ((2 << 3) + 1), 402 CLO_R6 = ((2 << 3) + 1),
401 MFLO = ((2 << 3) + 2), 403 MFLO = ((2 << 3) + 2),
402 DCLZ_R6 = ((2 << 3) + 2), 404 DCLZ_R6 = ((2 << 3) + 2),
403 DCLO_R6 = ((2 << 3) + 3), 405 DCLO_R6 = ((2 << 3) + 3),
404 DSLLV = ((2 << 3) + 4), 406 DSLLV = ((2 << 3) + 4),
407 DLSA = ((2 << 3) + 5),
405 DSRLV = ((2 << 3) + 6), 408 DSRLV = ((2 << 3) + 6),
406 DSRAV = ((2 << 3) + 7), 409 DSRAV = ((2 << 3) + 7),
407 410
408 MULT = ((3 << 3) + 0), 411 MULT = ((3 << 3) + 0),
409 MULTU = ((3 << 3) + 1), 412 MULTU = ((3 << 3) + 1),
410 DIV = ((3 << 3) + 2), 413 DIV = ((3 << 3) + 2),
411 DIVU = ((3 << 3) + 3), 414 DIVU = ((3 << 3) + 3),
412 DMULT = ((3 << 3) + 4), 415 DMULT = ((3 << 3) + 4),
413 DMULTU = ((3 << 3) + 5), 416 DMULTU = ((3 << 3) + 5),
414 DDIV = ((3 << 3) + 6), 417 DDIV = ((3 << 3) + 6),
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 static const uint64_t kFunctionFieldRegisterTypeMask = 948 static const uint64_t kFunctionFieldRegisterTypeMask =
946 FunctionFieldToBitNumber(JR) | FunctionFieldToBitNumber(JALR) | 949 FunctionFieldToBitNumber(JR) | FunctionFieldToBitNumber(JALR) |
947 FunctionFieldToBitNumber(BREAK) | FunctionFieldToBitNumber(SLL) | 950 FunctionFieldToBitNumber(BREAK) | FunctionFieldToBitNumber(SLL) |
948 FunctionFieldToBitNumber(DSLL) | FunctionFieldToBitNumber(DSLL32) | 951 FunctionFieldToBitNumber(DSLL) | FunctionFieldToBitNumber(DSLL32) |
949 FunctionFieldToBitNumber(SRL) | FunctionFieldToBitNumber(DSRL) | 952 FunctionFieldToBitNumber(SRL) | FunctionFieldToBitNumber(DSRL) |
950 FunctionFieldToBitNumber(DSRL32) | FunctionFieldToBitNumber(SRA) | 953 FunctionFieldToBitNumber(DSRL32) | FunctionFieldToBitNumber(SRA) |
951 FunctionFieldToBitNumber(DSRA) | FunctionFieldToBitNumber(DSRA32) | 954 FunctionFieldToBitNumber(DSRA) | FunctionFieldToBitNumber(DSRA32) |
952 FunctionFieldToBitNumber(SLLV) | FunctionFieldToBitNumber(DSLLV) | 955 FunctionFieldToBitNumber(SLLV) | FunctionFieldToBitNumber(DSLLV) |
953 FunctionFieldToBitNumber(SRLV) | FunctionFieldToBitNumber(DSRLV) | 956 FunctionFieldToBitNumber(SRLV) | FunctionFieldToBitNumber(DSRLV) |
954 FunctionFieldToBitNumber(SRAV) | FunctionFieldToBitNumber(DSRAV) | 957 FunctionFieldToBitNumber(SRAV) | FunctionFieldToBitNumber(DSRAV) |
958 FunctionFieldToBitNumber(LSA) | FunctionFieldToBitNumber(DLSA) |
955 FunctionFieldToBitNumber(MFHI) | FunctionFieldToBitNumber(MFLO) | 959 FunctionFieldToBitNumber(MFHI) | FunctionFieldToBitNumber(MFLO) |
956 FunctionFieldToBitNumber(MULT) | FunctionFieldToBitNumber(DMULT) | 960 FunctionFieldToBitNumber(MULT) | FunctionFieldToBitNumber(DMULT) |
957 FunctionFieldToBitNumber(MULTU) | FunctionFieldToBitNumber(DMULTU) | 961 FunctionFieldToBitNumber(MULTU) | FunctionFieldToBitNumber(DMULTU) |
958 FunctionFieldToBitNumber(DIV) | FunctionFieldToBitNumber(DDIV) | 962 FunctionFieldToBitNumber(DIV) | FunctionFieldToBitNumber(DDIV) |
959 FunctionFieldToBitNumber(DIVU) | FunctionFieldToBitNumber(DDIVU) | 963 FunctionFieldToBitNumber(DIVU) | FunctionFieldToBitNumber(DDIVU) |
960 FunctionFieldToBitNumber(ADD) | FunctionFieldToBitNumber(DADD) | 964 FunctionFieldToBitNumber(ADD) | FunctionFieldToBitNumber(DADD) |
961 FunctionFieldToBitNumber(ADDU) | FunctionFieldToBitNumber(DADDU) | 965 FunctionFieldToBitNumber(ADDU) | FunctionFieldToBitNumber(DADDU) |
962 FunctionFieldToBitNumber(SUB) | FunctionFieldToBitNumber(DSUB) | 966 FunctionFieldToBitNumber(SUB) | FunctionFieldToBitNumber(DSUB) |
963 FunctionFieldToBitNumber(SUBU) | FunctionFieldToBitNumber(DSUBU) | 967 FunctionFieldToBitNumber(SUBU) | FunctionFieldToBitNumber(DSUBU) |
964 FunctionFieldToBitNumber(AND) | FunctionFieldToBitNumber(OR) | 968 FunctionFieldToBitNumber(AND) | FunctionFieldToBitNumber(OR) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 inline int RdValue() const { 1001 inline int RdValue() const {
998 DCHECK(InstructionType() == kRegisterType); 1002 DCHECK(InstructionType() == kRegisterType);
999 return Bits(kRdShift + kRdBits - 1, kRdShift); 1003 return Bits(kRdShift + kRdBits - 1, kRdShift);
1000 } 1004 }
1001 1005
1002 inline int SaValue() const { 1006 inline int SaValue() const {
1003 DCHECK(InstructionType() == kRegisterType); 1007 DCHECK(InstructionType() == kRegisterType);
1004 return Bits(kSaShift + kSaBits - 1, kSaShift); 1008 return Bits(kSaShift + kSaBits - 1, kSaShift);
1005 } 1009 }
1006 1010
1011 inline int LsaSaValue() const {
1012 DCHECK(InstructionType() == kRegisterType);
1013 return Bits(kSaShift + kLsaSaBits - 1, kSaShift);
1014 }
1015
1007 inline int FunctionValue() const { 1016 inline int FunctionValue() const {
1008 DCHECK(InstructionType() == kRegisterType || 1017 DCHECK(InstructionType() == kRegisterType ||
1009 InstructionType() == kImmediateType); 1018 InstructionType() == kImmediateType);
1010 return Bits(kFunctionShift + kFunctionBits - 1, kFunctionShift); 1019 return Bits(kFunctionShift + kFunctionBits - 1, kFunctionShift);
1011 } 1020 }
1012 1021
1013 inline int FdValue() const { 1022 inline int FdValue() const {
1014 return Bits(kFdShift + kFdBits - 1, kFdShift); 1023 return Bits(kFdShift + kFdBits - 1, kFdShift);
1015 } 1024 }
1016 1025
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 } 1274 }
1266 return kUnsupported; 1275 return kUnsupported;
1267 } 1276 }
1268 1277
1269 #undef OpcodeToBitNumber 1278 #undef OpcodeToBitNumber
1270 #undef FunctionFieldToBitNumber 1279 #undef FunctionFieldToBitNumber
1271 } // namespace internal 1280 } // namespace internal
1272 } // namespace v8 1281 } // namespace v8
1273 1282
1274 #endif // #ifndef V8_MIPS_CONSTANTS_H_ 1283 #endif // #ifndef V8_MIPS_CONSTANTS_H_
OLDNEW
« no previous file with comments | « src/mips64/assembler-mips64.cc ('k') | src/mips64/disasm-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698