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 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1845 } | 1845 } |
1846 | 1846 |
1847 static bool IsNop(Address addr); | 1847 static bool IsNop(Address addr); |
1848 | 1848 |
1849 // Avoid overflows for displacements etc. | 1849 // Avoid overflows for displacements etc. |
1850 static const int kMaximalBufferSize = 512*MB; | 1850 static const int kMaximalBufferSize = 512*MB; |
1851 | 1851 |
1852 byte byte_at(int pos) { return buffer_[pos]; } | 1852 byte byte_at(int pos) { return buffer_[pos]; } |
1853 void set_byte_at(int pos, byte value) { buffer_[pos] = value; } | 1853 void set_byte_at(int pos, byte value) { buffer_[pos] = value; } |
1854 | 1854 |
| 1855 Address pc() const { return pc_; } |
| 1856 |
1855 protected: | 1857 protected: |
1856 // Call near indirect | 1858 // Call near indirect |
1857 void call(const Operand& operand); | 1859 void call(const Operand& operand); |
1858 | 1860 |
1859 private: | 1861 private: |
1860 byte* addr_at(int pos) { return buffer_ + pos; } | 1862 byte* addr_at(int pos) { return buffer_ + pos; } |
1861 uint32_t long_at(int pos) { | 1863 uint32_t long_at(int pos) { |
1862 return *reinterpret_cast<uint32_t*>(addr_at(pos)); | 1864 return *reinterpret_cast<uint32_t*>(addr_at(pos)); |
1863 } | 1865 } |
1864 void long_at_put(int pos, uint32_t x) { | 1866 void long_at_put(int pos, uint32_t x) { |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2350 Assembler* assembler_; | 2352 Assembler* assembler_; |
2351 #ifdef DEBUG | 2353 #ifdef DEBUG |
2352 int space_before_; | 2354 int space_before_; |
2353 #endif | 2355 #endif |
2354 }; | 2356 }; |
2355 | 2357 |
2356 } // namespace internal | 2358 } // namespace internal |
2357 } // namespace v8 | 2359 } // namespace v8 |
2358 | 2360 |
2359 #endif // V8_X64_ASSEMBLER_X64_H_ | 2361 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |