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

Side by Side Diff: src/x64/assembler-x64.h

Issue 7122003: Make x64 to use the RecordWrite stub. This is a step towards getting (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/x64/code-stubs-x64.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 (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 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 inline int available_space() const { 1387 inline int available_space() const {
1388 return static_cast<int>(reloc_info_writer.pos() - pc_); 1388 return static_cast<int>(reloc_info_writer.pos() - pc_);
1389 } 1389 }
1390 1390
1391 static bool IsNop(Address addr) { return *addr == 0x90; } 1391 static bool IsNop(Address addr) { return *addr == 0x90; }
1392 1392
1393 // Avoid overflows for displacements etc. 1393 // Avoid overflows for displacements etc.
1394 static const int kMaximalBufferSize = 512*MB; 1394 static const int kMaximalBufferSize = 512*MB;
1395 static const int kMinimalBufferSize = 4*KB; 1395 static const int kMinimalBufferSize = 4*KB;
1396 1396
1397 byte byte_at(int pos) { return buffer_[pos]; }
1398 void set_byte_at(int pos, byte value) { buffer_[pos] = value; }
1399
1397 protected: 1400 protected:
1398 bool emit_debug_code() const { return emit_debug_code_; } 1401 bool emit_debug_code() const { return emit_debug_code_; }
1399 1402
1400 private: 1403 private:
1401 byte* addr_at(int pos) { return buffer_ + pos; } 1404 byte* addr_at(int pos) { return buffer_ + pos; }
1402 byte byte_at(int pos) { return buffer_[pos]; }
1403 void set_byte_at(int pos, byte value) { buffer_[pos] = value; }
1404 uint32_t long_at(int pos) { 1405 uint32_t long_at(int pos) {
1405 return *reinterpret_cast<uint32_t*>(addr_at(pos)); 1406 return *reinterpret_cast<uint32_t*>(addr_at(pos));
1406 } 1407 }
1407 void long_at_put(int pos, uint32_t x) { 1408 void long_at_put(int pos, uint32_t x) {
1408 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; 1409 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x;
1409 } 1410 }
1410 1411
1411 // code emission 1412 // code emission
1412 void GrowBuffer(); 1413 void GrowBuffer();
1413 1414
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 private: 1631 private:
1631 Assembler* assembler_; 1632 Assembler* assembler_;
1632 #ifdef DEBUG 1633 #ifdef DEBUG
1633 int space_before_; 1634 int space_before_;
1634 #endif 1635 #endif
1635 }; 1636 };
1636 1637
1637 } } // namespace v8::internal 1638 } } // namespace v8::internal
1638 1639
1639 #endif // V8_X64_ASSEMBLER_X64_H_ 1640 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698