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

Unified Diff: src/crankshaft/x87/lithium-gap-resolver-x87.cc

Issue 1586013006: X87: [turbofan] avoid xchg instruction on Intel. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/compiler/x87/code-generator-x87.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-gap-resolver-x87.cc
diff --git a/src/crankshaft/x87/lithium-gap-resolver-x87.cc b/src/crankshaft/x87/lithium-gap-resolver-x87.cc
index aa9183541fc8b34c20328c15ba6c4b7012e04074..80e39934595ba3a877e210379ea77ff34f3ff8d2 100644
--- a/src/crankshaft/x87/lithium-gap-resolver-x87.cc
+++ b/src/crankshaft/x87/lithium-gap-resolver-x87.cc
@@ -374,7 +374,9 @@ void LGapResolver::EmitSwap(int index) {
// Register-register.
Register src = cgen_->ToRegister(source);
Register dst = cgen_->ToRegister(destination);
- __ xchg(dst, src);
+ __ push(src);
+ __ mov(src, dst);
+ __ pop(dst);
} else if ((source->IsRegister() && destination->IsStackSlot()) ||
(source->IsStackSlot() && destination->IsRegister())) {
« no previous file with comments | « src/compiler/x87/code-generator-x87.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698