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

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

Issue 6794052: Combine the incremental-marking write barrier and the remembered-set... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 8 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/code-stubs.h ('k') | src/ia32/code-stubs-ia32.h » ('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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 // write a comment. 959 // write a comment.
960 void RecordComment(const char* msg, bool force = false); 960 void RecordComment(const char* msg, bool force = false);
961 961
962 // Writes a single byte or word of data in the code stream. Used for 962 // Writes a single byte or word of data in the code stream. Used for
963 // inline tables, e.g., jump-tables. 963 // inline tables, e.g., jump-tables.
964 void db(uint8_t data); 964 void db(uint8_t data);
965 void dd(uint32_t data); 965 void dd(uint32_t data);
966 966
967 int pc_offset() const { return pc_ - buffer_; } 967 int pc_offset() const { return pc_ - buffer_; }
968 968
969 // Used for patching the code stream while it is being emitted.
970 inline byte get_opcode(int offset) {
971 ASSERT(offset < 0);
972 ASSERT(pc_ + offset >= buffer_);
973 return pc_[offset];
974 }
975 inline void set_opcode(int offset, byte opcode) {
976 ASSERT(offset < 0);
977 ASSERT(pc_ + offset >= buffer_);
978 pc_[offset] = opcode;
979 }
980
969 // Check if there is less than kGap bytes available in the buffer. 981 // Check if there is less than kGap bytes available in the buffer.
970 // If this is the case, we need to grow the buffer before emitting 982 // If this is the case, we need to grow the buffer before emitting
971 // an instruction or relocation information. 983 // an instruction or relocation information.
972 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; } 984 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; }
973 985
974 // Get the number of bytes available in the buffer. 986 // Get the number of bytes available in the buffer.
975 inline int available_space() const { return reloc_info_writer.pos() - pc_; } 987 inline int available_space() const { return reloc_info_writer.pos() - pc_; }
976 988
977 static bool IsNop(Address addr) { return *addr == 0x90; } 989 static bool IsNop(Address addr) { return *addr == 0x90; }
978 990
(...skipping 11 matching lines...) Expand all
990 bool emit_debug_code() const { return emit_debug_code_; } 1002 bool emit_debug_code() const { return emit_debug_code_; }
991 1003
992 void movsd(XMMRegister dst, const Operand& src); 1004 void movsd(XMMRegister dst, const Operand& src);
993 void movsd(const Operand& dst, XMMRegister src); 1005 void movsd(const Operand& dst, XMMRegister src);
994 1006
995 void emit_sse_operand(XMMRegister reg, const Operand& adr); 1007 void emit_sse_operand(XMMRegister reg, const Operand& adr);
996 void emit_sse_operand(XMMRegister dst, XMMRegister src); 1008 void emit_sse_operand(XMMRegister dst, XMMRegister src);
997 void emit_sse_operand(Register dst, XMMRegister src); 1009 void emit_sse_operand(Register dst, XMMRegister src);
998 1010
999 byte* addr_at(int pos) { return buffer_ + pos; } 1011 byte* addr_at(int pos) { return buffer_ + pos; }
1012
1000 private: 1013 private:
1001 byte byte_at(int pos) { return buffer_[pos]; } 1014 byte byte_at(int pos) { return buffer_[pos]; }
1002 void set_byte_at(int pos, byte value) { buffer_[pos] = value; } 1015 void set_byte_at(int pos, byte value) { buffer_[pos] = value; }
1003 uint32_t long_at(int pos) { 1016 uint32_t long_at(int pos) {
1004 return *reinterpret_cast<uint32_t*>(addr_at(pos)); 1017 return *reinterpret_cast<uint32_t*>(addr_at(pos));
1005 } 1018 }
1006 void long_at_put(int pos, uint32_t x) { 1019 void long_at_put(int pos, uint32_t x) {
1007 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; 1020 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x;
1008 } 1021 }
1009 1022
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 private: 1106 private:
1094 Assembler* assembler_; 1107 Assembler* assembler_;
1095 #ifdef DEBUG 1108 #ifdef DEBUG
1096 int space_before_; 1109 int space_before_;
1097 #endif 1110 #endif
1098 }; 1111 };
1099 1112
1100 } } // namespace v8::internal 1113 } } // namespace v8::internal
1101 1114
1102 #endif // V8_IA32_ASSEMBLER_IA32_H_ 1115 #endif // V8_IA32_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/code-stubs-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698