| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #define ARM64_DEFINE_FP_STATICS | 9 #define ARM64_DEFINE_FP_STATICS |
| 10 | 10 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 SetInstructionBits(Mask(~mask) | imm); | 312 SetInstructionBits(Mask(~mask) | imm); |
| 313 } | 313 } |
| 314 | 314 |
| 315 | 315 |
| 316 // TODO(jbramley): We can't put this inline in the class because things like | 316 // TODO(jbramley): We can't put this inline in the class because things like |
| 317 // xzr and Register are not defined in that header. Consider adding | 317 // xzr and Register are not defined in that header. Consider adding |
| 318 // instructions-arm64-inl.h to work around this. | 318 // instructions-arm64-inl.h to work around this. |
| 319 bool InstructionSequence::IsInlineData() const { | 319 bool InstructionSequence::IsInlineData() const { |
| 320 // Inline data is encoded as a single movz instruction which writes to xzr | 320 // Inline data is encoded as a single movz instruction which writes to xzr |
| 321 // (x31). | 321 // (x31). |
| 322 return IsMovz() && SixtyFourBits() && (Rd() == xzr.code()); | 322 return IsMovz() && SixtyFourBits() && (Rd() == kZeroRegCode); |
| 323 // TODO(all): If we extend ::InlineData() to support bigger data, we need | 323 // TODO(all): If we extend ::InlineData() to support bigger data, we need |
| 324 // to update this method too. | 324 // to update this method too. |
| 325 } | 325 } |
| 326 | 326 |
| 327 | 327 |
| 328 // TODO(jbramley): We can't put this inline in the class because things like | 328 // TODO(jbramley): We can't put this inline in the class because things like |
| 329 // xzr and Register are not defined in that header. Consider adding | 329 // xzr and Register are not defined in that header. Consider adding |
| 330 // instructions-arm64-inl.h to work around this. | 330 // instructions-arm64-inl.h to work around this. |
| 331 uint64_t InstructionSequence::InlineData() const { | 331 uint64_t InstructionSequence::InlineData() const { |
| 332 DCHECK(IsInlineData()); | 332 DCHECK(IsInlineData()); |
| 333 uint64_t payload = ImmMoveWide(); | 333 uint64_t payload = ImmMoveWide(); |
| 334 // TODO(all): If we extend ::InlineData() to support bigger data, we need | 334 // TODO(all): If we extend ::InlineData() to support bigger data, we need |
| 335 // to update this method too. | 335 // to update this method too. |
| 336 return payload; | 336 return payload; |
| 337 } | 337 } |
| 338 | 338 |
| 339 | 339 |
| 340 } } // namespace v8::internal | 340 } } // namespace v8::internal |
| 341 | 341 |
| 342 #endif // V8_TARGET_ARCH_ARM64 | 342 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |