| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 const int kNumberOfCalleeSavedRegisters = 11; | 58 const int kNumberOfCalleeSavedRegisters = 11; |
| 59 const int kFirstCalleeSavedRegisterIndex = 19; | 59 const int kFirstCalleeSavedRegisterIndex = 19; |
| 60 // Callee saved FP registers are d8-d15. | 60 // Callee saved FP registers are d8-d15. |
| 61 const int kNumberOfCalleeSavedFPRegisters = 8; | 61 const int kNumberOfCalleeSavedFPRegisters = 8; |
| 62 const int kFirstCalleeSavedFPRegisterIndex = 8; | 62 const int kFirstCalleeSavedFPRegisterIndex = 8; |
| 63 // Callee saved registers with no specific purpose in JS are x19-x25. | 63 // Callee saved registers with no specific purpose in JS are x19-x25. |
| 64 const unsigned kJSCalleeSavedRegList = 0x03f80000; | 64 const unsigned kJSCalleeSavedRegList = 0x03f80000; |
| 65 // TODO(all): k<Y>RegSize should probably be k<Y>RegSizeInBits. | 65 // TODO(all): k<Y>RegSize should probably be k<Y>RegSizeInBits. |
| 66 const unsigned kWRegSize = 32; | 66 const unsigned kWRegSize = 32; |
| 67 const unsigned kWRegSizeLog2 = 5; | 67 const unsigned kWRegSizeLog2 = 5; |
| 68 const unsigned kWRegSizeInBytes = kWRegSize / 8; | 68 const unsigned kWRegSizeInBytes = kWRegSize >> 3; |
| 69 const unsigned kWRegSizeInBytesLog2 = kWRegSizeLog2 - 3; | 69 const unsigned kWRegSizeInBytesLog2 = kWRegSizeLog2 - 3; |
| 70 const unsigned kXRegSize = 64; | 70 const unsigned kXRegSize = 64; |
| 71 const unsigned kXRegSizeLog2 = 6; | 71 const unsigned kXRegSizeLog2 = 6; |
| 72 const unsigned kXRegSizeInBytes = kXRegSize / 8; | 72 const unsigned kXRegSizeInBytes = kXRegSize >> 3; |
| 73 const unsigned kXRegSizeInBytesLog2 = kXRegSizeLog2 - 3; | 73 const unsigned kXRegSizeInBytesLog2 = kXRegSizeLog2 - 3; |
| 74 const unsigned kSRegSize = 32; | 74 const unsigned kSRegSize = 32; |
| 75 const unsigned kSRegSizeLog2 = 5; | 75 const unsigned kSRegSizeLog2 = 5; |
| 76 const unsigned kSRegSizeInBytes = kSRegSize / 8; | 76 const unsigned kSRegSizeInBytes = kSRegSize >> 3; |
| 77 const unsigned kSRegSizeInBytesLog2 = kSRegSizeLog2 - 3; | 77 const unsigned kSRegSizeInBytesLog2 = kSRegSizeLog2 - 3; |
| 78 const unsigned kDRegSize = 64; | 78 const unsigned kDRegSize = 64; |
| 79 const unsigned kDRegSizeLog2 = 6; | 79 const unsigned kDRegSizeLog2 = 6; |
| 80 const unsigned kDRegSizeInBytes = kDRegSize / 8; | 80 const unsigned kDRegSizeInBytes = kDRegSize >> 3; |
| 81 const unsigned kDRegSizeInBytesLog2 = kDRegSizeLog2 - 3; | 81 const unsigned kDRegSizeInBytesLog2 = kDRegSizeLog2 - 3; |
| 82 const int64_t kWRegMask = 0x00000000ffffffffL; | 82 const int64_t kWRegMask = 0x00000000ffffffffL; |
| 83 const int64_t kXRegMask = 0xffffffffffffffffL; | 83 const int64_t kXRegMask = 0xffffffffffffffffL; |
| 84 const int64_t kSRegMask = 0x00000000ffffffffL; | 84 const int64_t kSRegMask = 0x00000000ffffffffL; |
| 85 const int64_t kDRegMask = 0xffffffffffffffffL; | 85 const int64_t kDRegMask = 0xffffffffffffffffL; |
| 86 // TODO(all) check if the expression below works on all compilers or if it | 86 // TODO(all) check if the expression below works on all compilers or if it |
| 87 // triggers an overflow error. | 87 // triggers an overflow error. |
| 88 const int64_t kDSignMask = 0x1L << 63; | 88 const int64_t kDSignMask = 0x1L << 63; |
| 89 const int64_t kDSignBit = 63; | 89 const int64_t kDSignBit = 63; |
| 90 const int64_t kXSignMask = 0x1L << 63; | 90 const int64_t kXSignMask = 0x1L << 63; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 101 const int32_t kWMaxInt = 0x7fffffff; | 101 const int32_t kWMaxInt = 0x7fffffff; |
| 102 const int32_t kWMinInt = 0x80000000; | 102 const int32_t kWMinInt = 0x80000000; |
| 103 const unsigned kFramePointerRegCode = 29; | 103 const unsigned kFramePointerRegCode = 29; |
| 104 const unsigned kLinkRegCode = 30; | 104 const unsigned kLinkRegCode = 30; |
| 105 const unsigned kZeroRegCode = 31; | 105 const unsigned kZeroRegCode = 31; |
| 106 const unsigned kJSSPCode = 28; | 106 const unsigned kJSSPCode = 28; |
| 107 const unsigned kSPRegInternalCode = 63; | 107 const unsigned kSPRegInternalCode = 63; |
| 108 const unsigned kRegCodeMask = 0x1f; | 108 const unsigned kRegCodeMask = 0x1f; |
| 109 // Standard machine types defined by AAPCS64. | 109 // Standard machine types defined by AAPCS64. |
| 110 const unsigned kByteSize = 8; | 110 const unsigned kByteSize = 8; |
| 111 const unsigned kByteSizeInBytes = kByteSize / 8; | 111 const unsigned kByteSizeInBytes = kByteSize >> 3; |
| 112 const unsigned kHalfWordSize = 16; | 112 const unsigned kHalfWordSize = 16; |
| 113 const unsigned kHalfWordSizeLog2 = 4; | 113 const unsigned kHalfWordSizeLog2 = 4; |
| 114 const unsigned kHalfWordSizeInBytes = kHalfWordSizeInBytes / 8; | 114 const unsigned kHalfWordSizeInBytes = kHalfWordSize >> 3; |
| 115 const unsigned kHalfWordSizeInBytesLog2 = kHalfWordSizeLog2 - 3; | 115 const unsigned kHalfWordSizeInBytesLog2 = kHalfWordSizeLog2 - 3; |
| 116 const unsigned kWordSize = 32; | 116 const unsigned kWordSize = 32; |
| 117 const unsigned kWordSizeLog2 = 5; | 117 const unsigned kWordSizeLog2 = 5; |
| 118 const unsigned kWordSizeInBytes = kWordSizeInBytes / 8; | 118 const unsigned kWordSizeInBytes = kWordSize >> 3; |
| 119 const unsigned kWordSizeInBytesLog2 = kWordSizeLog2 - 3; | 119 const unsigned kWordSizeInBytesLog2 = kWordSizeLog2 - 3; |
| 120 const unsigned kDoubleWordSize = 64; | 120 const unsigned kDoubleWordSize = 64; |
| 121 const unsigned kDoubleWordSizeInBytes = kDoubleWordSizeInBytes / 8; | 121 const unsigned kDoubleWordSizeInBytes = kDoubleWordSize >> 3; |
| 122 const unsigned kQuadWordSize = 128; | 122 const unsigned kQuadWordSize = 128; |
| 123 const unsigned kQuadWordSizeInBytes = kQuadWordSizeInBytes / 8; | 123 const unsigned kQuadWordSizeInBytes = kQuadWordSize >> 3; |
| 124 // AArch64 floating-point specifics. These match IEEE-754. | 124 // AArch64 floating-point specifics. These match IEEE-754. |
| 125 const unsigned kDoubleMantissaBits = 52; | 125 const unsigned kDoubleMantissaBits = 52; |
| 126 const unsigned kDoubleExponentBits = 11; | 126 const unsigned kDoubleExponentBits = 11; |
| 127 const unsigned kFloatMantissaBits = 23; | 127 const unsigned kFloatMantissaBits = 23; |
| 128 const unsigned kFloatExponentBits = 8; | 128 const unsigned kFloatExponentBits = 8; |
| 129 | 129 |
| 130 #define REGISTER_CODE_LIST(R) \ | 130 #define REGISTER_CODE_LIST(R) \ |
| 131 R(0) R(1) R(2) R(3) R(4) R(5) R(6) R(7) \ | 131 R(0) R(1) R(2) R(3) R(4) R(5) R(6) R(7) \ |
| 132 R(8) R(9) R(10) R(11) R(12) R(13) R(14) R(15) \ | 132 R(8) R(9) R(10) R(11) R(12) R(13) R(14) R(15) \ |
| 133 R(16) R(17) R(18) R(19) R(20) R(21) R(22) R(23) \ | 133 R(16) R(17) R(18) R(19) R(20) R(21) R(22) R(23) \ |
| (...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 }; | 1247 }; |
| 1248 | 1248 |
| 1249 enum UnallocatedOp { | 1249 enum UnallocatedOp { |
| 1250 UnallocatedFixed = 0x00000000, | 1250 UnallocatedFixed = 0x00000000, |
| 1251 UnallocatedFMask = 0x00000000 | 1251 UnallocatedFMask = 0x00000000 |
| 1252 }; | 1252 }; |
| 1253 | 1253 |
| 1254 } } // namespace v8::internal | 1254 } } // namespace v8::internal |
| 1255 | 1255 |
| 1256 #endif // V8_A64_CONSTANTS_A64_H_ | 1256 #endif // V8_A64_CONSTANTS_A64_H_ |
| OLD | NEW |