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

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

Issue 597005: Ported ia32 optimization of revision 3487 to x64. (Closed)
Patch Set: Created 10 years, 10 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
« no previous file with comments | « no previous file | src/x64/assembler-x64.cc » ('j') | src/x64/codegen-x64.cc » ('J')
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 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 void cvtlsi2sd(XMMRegister dst, const Operand& src); 1115 void cvtlsi2sd(XMMRegister dst, const Operand& src);
1116 void cvtlsi2sd(XMMRegister dst, Register src); 1116 void cvtlsi2sd(XMMRegister dst, Register src);
1117 void cvtqsi2sd(XMMRegister dst, const Operand& src); 1117 void cvtqsi2sd(XMMRegister dst, const Operand& src);
1118 void cvtqsi2sd(XMMRegister dst, Register src); 1118 void cvtqsi2sd(XMMRegister dst, Register src);
1119 1119
1120 void addsd(XMMRegister dst, XMMRegister src); 1120 void addsd(XMMRegister dst, XMMRegister src);
1121 void subsd(XMMRegister dst, XMMRegister src); 1121 void subsd(XMMRegister dst, XMMRegister src);
1122 void mulsd(XMMRegister dst, XMMRegister src); 1122 void mulsd(XMMRegister dst, XMMRegister src);
1123 void divsd(XMMRegister dst, XMMRegister src); 1123 void divsd(XMMRegister dst, XMMRegister src);
1124 1124
1125 void xorpd(XMMRegister dst, XMMRegister src);
1126
1127 void comisd(XMMRegister dst, XMMRegister src);
1128 void ucomisd(XMMRegister dst, XMMRegister src);
1125 1129
1126 void emit_sse_operand(XMMRegister dst, XMMRegister src); 1130 void emit_sse_operand(XMMRegister dst, XMMRegister src);
1127 void emit_sse_operand(XMMRegister reg, const Operand& adr); 1131 void emit_sse_operand(XMMRegister reg, const Operand& adr);
1128 void emit_sse_operand(XMMRegister dst, Register src); 1132 void emit_sse_operand(XMMRegister dst, Register src);
1129 1133
1130 // Use either movsd or movlpd. 1134 // Use either movsd or movlpd.
1131 // void movdbl(XMMRegister dst, const Operand& src); 1135 // void movdbl(XMMRegister dst, const Operand& src);
1132 // void movdbl(const Operand& dst, XMMRegister src); 1136 // void movdbl(const Operand& dst, XMMRegister src);
1133 1137
1134 // Debugging 1138 // Debugging
(...skipping 26 matching lines...) Expand all
1161 1165
1162 // Get the number of bytes available in the buffer. 1166 // Get the number of bytes available in the buffer.
1163 inline int available_space() const { 1167 inline int available_space() const {
1164 return static_cast<int>(reloc_info_writer.pos() - pc_); 1168 return static_cast<int>(reloc_info_writer.pos() - pc_);
1165 } 1169 }
1166 1170
1167 // Avoid overflows for displacements etc. 1171 // Avoid overflows for displacements etc.
1168 static const int kMaximalBufferSize = 512*MB; 1172 static const int kMaximalBufferSize = 512*MB;
1169 static const int kMinimalBufferSize = 4*KB; 1173 static const int kMinimalBufferSize = 4*KB;
1170 1174
1171 protected:
1172 // void movsd(XMMRegister dst, const Operand& src);
1173 // void movsd(const Operand& dst, XMMRegister src);
1174
1175 // void emit_sse_operand(XMMRegister reg, const Operand& adr);
1176 // void emit_sse_operand(XMMRegister dst, XMMRegister src);
1177
1178
1179 private: 1175 private:
1180 byte* addr_at(int pos) { return buffer_ + pos; } 1176 byte* addr_at(int pos) { return buffer_ + pos; }
1181 byte byte_at(int pos) { return buffer_[pos]; } 1177 byte byte_at(int pos) { return buffer_[pos]; }
1182 uint32_t long_at(int pos) { 1178 uint32_t long_at(int pos) {
1183 return *reinterpret_cast<uint32_t*>(addr_at(pos)); 1179 return *reinterpret_cast<uint32_t*>(addr_at(pos));
1184 } 1180 }
1185 void long_at_put(int pos, uint32_t x) { 1181 void long_at_put(int pos, uint32_t x) {
1186 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; 1182 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x;
1187 } 1183 }
1188 1184
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 private: 1402 private:
1407 Assembler* assembler_; 1403 Assembler* assembler_;
1408 #ifdef DEBUG 1404 #ifdef DEBUG
1409 int space_before_; 1405 int space_before_;
1410 #endif 1406 #endif
1411 }; 1407 };
1412 1408
1413 } } // namespace v8::internal 1409 } } // namespace v8::internal
1414 1410
1415 #endif // V8_X64_ASSEMBLER_X64_H_ 1411 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « no previous file | src/x64/assembler-x64.cc » ('j') | src/x64/codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698