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

Unified Diff: src/x64/macro-assembler-x64.cc

Issue 6883159: X64: Adding macro to load double from memory, and use SSE3 instruction if present. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 339420679184b15ead2d8a4921d07368eeb86106..26c6e3324b20102565245cbb7f5bc50fd38c0bee 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -2260,7 +2260,7 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles) {
int offset = -2 * kPointerSize;
for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; i++) {
XMMRegister reg = XMMRegister::FromAllocationIndex(i);
- movsd(reg, Operand(rbp, offset - ((i + 1) * kDoubleSize)));
+ LoadDbl(reg, Operand(rbp, offset - ((i + 1) * kDoubleSize)));
}
}
// Get the return address from the stack and restore the frame pointer.
@@ -2894,6 +2894,16 @@ void MacroAssembler::CallCFunction(Register function, int num_arguments) {
}
+void MacroAssembler::LoadDbl(XMMRegister dst, const Operand& src) {
+ if (CpuFeatures::IsSupported(SSE3)) {
+ CpuFeatures::Scope enable(SSE3);
+ movddup(dst, src);
+ } else {
+ movsd(dst, src);
+ }
+}
+
+
CodePatcher::CodePatcher(byte* address, int size)
: address_(address),
size_(size),
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698