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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 2083453002: [builtins] Introduce proper Float64Tan operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « src/compiler/instruction-scheduler.cc ('k') | src/compiler/js-builtin-reducer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compiler/instruction-selector-impl.h" 10 #include "src/compiler/instruction-selector-impl.h"
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 case IrOpcode::kFloat64Log1p: 1153 case IrOpcode::kFloat64Log1p:
1154 return MarkAsFloat64(node), VisitFloat64Log1p(node); 1154 return MarkAsFloat64(node), VisitFloat64Log1p(node);
1155 case IrOpcode::kFloat64Log10: 1155 case IrOpcode::kFloat64Log10:
1156 return MarkAsFloat64(node), VisitFloat64Log10(node); 1156 return MarkAsFloat64(node), VisitFloat64Log10(node);
1157 case IrOpcode::kFloat64Log2: 1157 case IrOpcode::kFloat64Log2:
1158 return MarkAsFloat64(node), VisitFloat64Log2(node); 1158 return MarkAsFloat64(node), VisitFloat64Log2(node);
1159 case IrOpcode::kFloat64Sin: 1159 case IrOpcode::kFloat64Sin:
1160 return MarkAsFloat64(node), VisitFloat64Sin(node); 1160 return MarkAsFloat64(node), VisitFloat64Sin(node);
1161 case IrOpcode::kFloat64Sqrt: 1161 case IrOpcode::kFloat64Sqrt:
1162 return MarkAsFloat64(node), VisitFloat64Sqrt(node); 1162 return MarkAsFloat64(node), VisitFloat64Sqrt(node);
1163 case IrOpcode::kFloat64Tan:
1164 return MarkAsFloat64(node), VisitFloat64Tan(node);
1163 case IrOpcode::kFloat64Equal: 1165 case IrOpcode::kFloat64Equal:
1164 return VisitFloat64Equal(node); 1166 return VisitFloat64Equal(node);
1165 case IrOpcode::kFloat64LessThan: 1167 case IrOpcode::kFloat64LessThan:
1166 return VisitFloat64LessThan(node); 1168 return VisitFloat64LessThan(node);
1167 case IrOpcode::kFloat64LessThanOrEqual: 1169 case IrOpcode::kFloat64LessThanOrEqual:
1168 return VisitFloat64LessThanOrEqual(node); 1170 return VisitFloat64LessThanOrEqual(node);
1169 case IrOpcode::kFloat32RoundDown: 1171 case IrOpcode::kFloat32RoundDown:
1170 return MarkAsFloat32(node), VisitFloat32RoundDown(node); 1172 return MarkAsFloat32(node), VisitFloat32RoundDown(node);
1171 case IrOpcode::kFloat64RoundDown: 1173 case IrOpcode::kFloat64RoundDown:
1172 return MarkAsFloat64(node), VisitFloat64RoundDown(node); 1174 return MarkAsFloat64(node), VisitFloat64RoundDown(node);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 } 1306 }
1305 1307
1306 void InstructionSelector::VisitFloat64Log10(Node* node) { 1308 void InstructionSelector::VisitFloat64Log10(Node* node) {
1307 VisitFloat64Ieee754Unop(node, kIeee754Float64Log10); 1309 VisitFloat64Ieee754Unop(node, kIeee754Float64Log10);
1308 } 1310 }
1309 1311
1310 void InstructionSelector::VisitFloat64Sin(Node* node) { 1312 void InstructionSelector::VisitFloat64Sin(Node* node) {
1311 VisitFloat64Ieee754Unop(node, kIeee754Float64Sin); 1313 VisitFloat64Ieee754Unop(node, kIeee754Float64Sin);
1312 } 1314 }
1313 1315
1316 void InstructionSelector::VisitFloat64Tan(Node* node) {
1317 VisitFloat64Ieee754Unop(node, kIeee754Float64Tan);
1318 }
1319
1314 void InstructionSelector::EmitTableSwitch(const SwitchInfo& sw, 1320 void InstructionSelector::EmitTableSwitch(const SwitchInfo& sw,
1315 InstructionOperand& index_operand) { 1321 InstructionOperand& index_operand) {
1316 OperandGenerator g(this); 1322 OperandGenerator g(this);
1317 size_t input_count = 2 + sw.value_range; 1323 size_t input_count = 2 + sw.value_range;
1318 auto* inputs = zone()->NewArray<InstructionOperand>(input_count); 1324 auto* inputs = zone()->NewArray<InstructionOperand>(input_count);
1319 inputs[0] = index_operand; 1325 inputs[0] = index_operand;
1320 InstructionOperand default_operand = g.Label(sw.default_branch); 1326 InstructionOperand default_operand = g.Label(sw.default_branch);
1321 std::fill(&inputs[1], &inputs[input_count], default_operand); 1327 std::fill(&inputs[1], &inputs[input_count], default_operand);
1322 for (size_t index = 0; index < sw.case_count; ++index) { 1328 for (size_t index = 0; index < sw.case_count; ++index) {
1323 size_t value = sw.case_values[index] - sw.min_value; 1329 size_t value = sw.case_values[index] - sw.min_value;
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 return new (instruction_zone()) FrameStateDescriptor( 1931 return new (instruction_zone()) FrameStateDescriptor(
1926 instruction_zone(), state_info.type(), state_info.bailout_id(), 1932 instruction_zone(), state_info.type(), state_info.bailout_id(),
1927 state_info.state_combine(), parameters, locals, stack, 1933 state_info.state_combine(), parameters, locals, stack,
1928 state_info.shared_info(), outer_state); 1934 state_info.shared_info(), outer_state);
1929 } 1935 }
1930 1936
1931 1937
1932 } // namespace compiler 1938 } // namespace compiler
1933 } // namespace internal 1939 } // namespace internal
1934 } // namespace v8 1940 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-scheduler.cc ('k') | src/compiler/js-builtin-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698