Chromium Code Reviews| 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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 { | |
| 1102 // Support not implemented in ia32 yet. | |
|
rmcilroy
2014/09/26 15:54:57
We will probably never us a constant pool on ia32,
baixo
2014/10/02 09:18:21
Done.
| |
| 1103 UNREACHABLE(); | |
| 1104 return false; | |
| 1105 } | |
| 1106 | |
| 1101 protected: | 1107 protected: |
| 1102 void emit_sse_operand(XMMRegister reg, const Operand& adr); | 1108 void emit_sse_operand(XMMRegister reg, const Operand& adr); |
| 1103 void emit_sse_operand(XMMRegister dst, XMMRegister src); | 1109 void emit_sse_operand(XMMRegister dst, XMMRegister src); |
| 1104 void emit_sse_operand(Register dst, XMMRegister src); | 1110 void emit_sse_operand(Register dst, XMMRegister src); |
| 1105 void emit_sse_operand(XMMRegister dst, Register src); | 1111 void emit_sse_operand(XMMRegister dst, Register src); |
| 1106 | 1112 |
| 1107 byte* addr_at(int pos) { return buffer_ + pos; } | 1113 byte* addr_at(int pos) { return buffer_ + pos; } |
| 1108 | 1114 |
| 1115 bool is_const_pool_blocked() const { | |
|
rmcilroy
2014/09/26 15:54:57
You don't need this function (that is only for the
baixo
2014/10/02 09:18:21
Done.
| |
| 1116 // Support not implemented in ia32 yet. | |
| 1117 UNREACHABLE(); | |
| 1118 return false; | |
| 1119 } | |
| 1120 | |
| 1121 void set_constant_pool_available(bool available) { | |
| 1122 // Support not implemented in ia32 yet. | |
|
rmcilroy
2014/09/26 15:54:57
replace comment with: "// Constant pool is not sup
baixo
2014/10/02 09:18:21
Done.
| |
| 1123 UNREACHABLE(); | |
| 1124 } | |
| 1125 | |
| 1109 | 1126 |
| 1110 private: | 1127 private: |
| 1111 uint32_t long_at(int pos) { | 1128 uint32_t long_at(int pos) { |
| 1112 return *reinterpret_cast<uint32_t*>(addr_at(pos)); | 1129 return *reinterpret_cast<uint32_t*>(addr_at(pos)); |
| 1113 } | 1130 } |
| 1114 void long_at_put(int pos, uint32_t x) { | 1131 void long_at_put(int pos, uint32_t x) { |
| 1115 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; | 1132 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; |
| 1116 } | 1133 } |
| 1117 | 1134 |
| 1118 // code emission | 1135 // code emission |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1152 inline Displacement disp_at(Label* L); | 1169 inline Displacement disp_at(Label* L); |
| 1153 inline void disp_at_put(Label* L, Displacement disp); | 1170 inline void disp_at_put(Label* L, Displacement disp); |
| 1154 inline void emit_disp(Label* L, Displacement::Type type); | 1171 inline void emit_disp(Label* L, Displacement::Type type); |
| 1155 inline void emit_near_disp(Label* L); | 1172 inline void emit_near_disp(Label* L); |
| 1156 | 1173 |
| 1157 // record reloc info for current pc_ | 1174 // record reloc info for current pc_ |
| 1158 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); | 1175 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); |
| 1159 | 1176 |
| 1160 friend class CodePatcher; | 1177 friend class CodePatcher; |
| 1161 friend class EnsureSpace; | 1178 friend class EnsureSpace; |
| 1179 friend class FrameAndConstantPoolScope; | |
| 1162 | 1180 |
| 1163 // code generation | 1181 // code generation |
| 1164 RelocInfoWriter reloc_info_writer; | 1182 RelocInfoWriter reloc_info_writer; |
| 1165 | 1183 |
| 1166 PositionsRecorder positions_recorder_; | 1184 PositionsRecorder positions_recorder_; |
| 1167 friend class PositionsRecorder; | 1185 friend class PositionsRecorder; |
| 1168 }; | 1186 }; |
| 1169 | 1187 |
| 1170 | 1188 |
| 1171 // Helper class that ensures that there is enough space for generating | 1189 // Helper class that ensures that there is enough space for generating |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 1191 private: | 1209 private: |
| 1192 Assembler* assembler_; | 1210 Assembler* assembler_; |
| 1193 #ifdef DEBUG | 1211 #ifdef DEBUG |
| 1194 int space_before_; | 1212 int space_before_; |
| 1195 #endif | 1213 #endif |
| 1196 }; | 1214 }; |
| 1197 | 1215 |
| 1198 } } // namespace v8::internal | 1216 } } // namespace v8::internal |
| 1199 | 1217 |
| 1200 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1218 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
| OLD | NEW |