OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 }; | 350 }; |
351 } | 351 } |
352 | 352 |
353 | 353 |
354 // ----------------------------------------------------------------------------- | 354 // ----------------------------------------------------------------------------- |
355 // Machine instruction Immediates | 355 // Machine instruction Immediates |
356 | 356 |
357 class Immediate BASE_EMBEDDED { | 357 class Immediate BASE_EMBEDDED { |
358 public: | 358 public: |
359 explicit Immediate(int32_t value) : value_(value) {} | 359 explicit Immediate(int32_t value) : value_(value) {} |
| 360 explicit Immediate(Smi* value) { |
| 361 ASSERT(SmiValuesAre31Bits()); // Only available for 31-bit SMI. |
| 362 value_ = static_cast<int32_t>(reinterpret_cast<intptr_t>(value)); |
| 363 } |
360 | 364 |
361 private: | 365 private: |
362 int32_t value_; | 366 int32_t value_; |
363 | 367 |
364 friend class Assembler; | 368 friend class Assembler; |
365 }; | 369 }; |
366 | 370 |
367 | 371 |
368 // ----------------------------------------------------------------------------- | 372 // ----------------------------------------------------------------------------- |
369 // Machine instruction Operands | 373 // Machine instruction Operands |
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 private: | 1650 private: |
1647 Assembler* assembler_; | 1651 Assembler* assembler_; |
1648 #ifdef DEBUG | 1652 #ifdef DEBUG |
1649 int space_before_; | 1653 int space_before_; |
1650 #endif | 1654 #endif |
1651 }; | 1655 }; |
1652 | 1656 |
1653 } } // namespace v8::internal | 1657 } } // namespace v8::internal |
1654 | 1658 |
1655 #endif // V8_X64_ASSEMBLER_X64_H_ | 1659 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |