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

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

Issue 609843002: Refactor FrameAndConstantPoolScope and ConstantPoolUnavailableScope to be architecture independent (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Re-factoring to enable FrameAndConstantPoolScope and ConstantPoolUnavailableScope to be used by oth… Created 6 years, 2 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
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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 1091
1092 byte byte_at(int pos) { return buffer_[pos]; } 1092 byte byte_at(int pos) { return buffer_[pos]; }
1093 void set_byte_at(int pos, byte value) { buffer_[pos] = value; } 1093 void set_byte_at(int pos, byte value) { buffer_[pos] = value; }
1094 1094
1095 // Allocate a constant pool of the correct size for the generated code. 1095 // Allocate a constant pool of the correct size for the generated code.
1096 Handle<ConstantPoolArray> NewConstantPool(Isolate* isolate); 1096 Handle<ConstantPoolArray> NewConstantPool(Isolate* isolate);
1097 1097
1098 // Generate the constant pool for the generated code. 1098 // Generate the constant pool for the generated code.
1099 void PopulateConstantPool(ConstantPoolArray* constant_pool); 1099 void PopulateConstantPool(ConstantPoolArray* constant_pool);
1100 1100
1101 bool is_constant_pool_available() const { return false; }
1102
1101 protected: 1103 protected:
1102 void emit_sse_operand(XMMRegister reg, const Operand& adr); 1104 void emit_sse_operand(XMMRegister reg, const Operand& adr);
1103 void emit_sse_operand(XMMRegister dst, XMMRegister src); 1105 void emit_sse_operand(XMMRegister dst, XMMRegister src);
1104 void emit_sse_operand(Register dst, XMMRegister src); 1106 void emit_sse_operand(Register dst, XMMRegister src);
1105 void emit_sse_operand(XMMRegister dst, Register src); 1107 void emit_sse_operand(XMMRegister dst, Register src);
1106 1108
1107 byte* addr_at(int pos) { return buffer_ + pos; } 1109 byte* addr_at(int pos) { return buffer_ + pos; }
1108 1110
1111 void set_constant_pool_available(bool available) {
1112 // Constant pool is not supported on ia32.
1113 UNREACHABLE();
1114 }
1115
1109 1116
1110 private: 1117 private:
1111 uint32_t long_at(int pos) { 1118 uint32_t long_at(int pos) {
1112 return *reinterpret_cast<uint32_t*>(addr_at(pos)); 1119 return *reinterpret_cast<uint32_t*>(addr_at(pos));
1113 } 1120 }
1114 void long_at_put(int pos, uint32_t x) { 1121 void long_at_put(int pos, uint32_t x) {
1115 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; 1122 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x;
1116 } 1123 }
1117 1124
1118 // code emission 1125 // code emission
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 inline void disp_at_put(Label* L, Displacement disp); 1160 inline void disp_at_put(Label* L, Displacement disp);
1154 inline void emit_disp(Label* L, Displacement::Type type); 1161 inline void emit_disp(Label* L, Displacement::Type type);
1155 inline void emit_near_disp(Label* L); 1162 inline void emit_near_disp(Label* L);
1156 1163
1157 // record reloc info for current pc_ 1164 // record reloc info for current pc_
1158 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); 1165 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
1159 1166
1160 friend class CodePatcher; 1167 friend class CodePatcher;
1161 friend class EnsureSpace; 1168 friend class EnsureSpace;
1162 1169
1170 // constant pool
1171 friend class FrameAndConstantPoolScope;
1172 friend class ConstantPoolUnavailableScope;
1173
1163 // code generation 1174 // code generation
1164 RelocInfoWriter reloc_info_writer; 1175 RelocInfoWriter reloc_info_writer;
1165 1176
1166 PositionsRecorder positions_recorder_; 1177 PositionsRecorder positions_recorder_;
1167 friend class PositionsRecorder; 1178 friend class PositionsRecorder;
1168 }; 1179 };
1169 1180
1170 1181
1171 // Helper class that ensures that there is enough space for generating 1182 // Helper class that ensures that there is enough space for generating
1172 // instructions and relocation information. The constructor makes 1183 // instructions and relocation information. The constructor makes
(...skipping 18 matching lines...) Expand all
1191 private: 1202 private:
1192 Assembler* assembler_; 1203 Assembler* assembler_;
1193 #ifdef DEBUG 1204 #ifdef DEBUG
1194 int space_before_; 1205 int space_before_;
1195 #endif 1206 #endif
1196 }; 1207 };
1197 1208
1198 } } // namespace v8::internal 1209 } } // namespace v8::internal
1199 1210
1200 #endif // V8_IA32_ASSEMBLER_IA32_H_ 1211 #endif // V8_IA32_ASSEMBLER_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698