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

Unified Diff: src/compiler/x87/instruction-selector-x87.cc

Issue 1973493003: [turbofan] Introduce new operators Float32SubPreserveNan and Float64SubPreserveNan for wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/x64/instruction-selector-x64.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x87/instruction-selector-x87.cc
diff --git a/src/compiler/x87/instruction-selector-x87.cc b/src/compiler/x87/instruction-selector-x87.cc
index 6544fb2d8eb196ab33d6cd833dbad670d58c2031..b487d9448a345b6d073f199ee34eea702d8dded3 100644
--- a/src/compiler/x87/instruction-selector-x87.cc
+++ b/src/compiler/x87/instruction-selector-x87.cc
@@ -897,6 +897,12 @@ void InstructionSelector::VisitFloat32Sub(Node* node) {
Emit(kX87Float32Sub, g.DefineAsFixed(node, stX_0), 0, nullptr);
}
+void InstructionSelector::VisitFloat32SubPreserveNan(Node* node) {
+ X87OperandGenerator g(this);
+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0)));
+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1)));
+ Emit(kX87Float32Sub, g.DefineAsFixed(node, stX_0), 0, nullptr);
+}
void InstructionSelector::VisitFloat64Sub(Node* node) {
X87OperandGenerator g(this);
@@ -905,6 +911,13 @@ void InstructionSelector::VisitFloat64Sub(Node* node) {
Emit(kX87Float64Sub, g.DefineAsFixed(node, stX_0), 0, nullptr);
}
+void InstructionSelector::VisitFloat64SubPreserveNan(Node* node) {
+ X87OperandGenerator g(this);
+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0)));
+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1)));
+ Emit(kX87Float64Sub, g.DefineAsFixed(node, stX_0), 0, nullptr);
+}
+
void InstructionSelector::VisitFloat32Mul(Node* node) {
X87OperandGenerator g(this);
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698