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

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

Issue 2083573002: [builtins] Unify Cosh, Sinh and Tanh as exports from flibm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE and windows fix. Created 4 years, 5 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 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 case IrOpcode::kFloat64Atan: 1151 case IrOpcode::kFloat64Atan:
1152 return MarkAsFloat64(node), VisitFloat64Atan(node); 1152 return MarkAsFloat64(node), VisitFloat64Atan(node);
1153 case IrOpcode::kFloat64Atan2: 1153 case IrOpcode::kFloat64Atan2:
1154 return MarkAsFloat64(node), VisitFloat64Atan2(node); 1154 return MarkAsFloat64(node), VisitFloat64Atan2(node);
1155 case IrOpcode::kFloat64Atanh: 1155 case IrOpcode::kFloat64Atanh:
1156 return MarkAsFloat64(node), VisitFloat64Atanh(node); 1156 return MarkAsFloat64(node), VisitFloat64Atanh(node);
1157 case IrOpcode::kFloat64Cbrt: 1157 case IrOpcode::kFloat64Cbrt:
1158 return MarkAsFloat64(node), VisitFloat64Cbrt(node); 1158 return MarkAsFloat64(node), VisitFloat64Cbrt(node);
1159 case IrOpcode::kFloat64Cos: 1159 case IrOpcode::kFloat64Cos:
1160 return MarkAsFloat64(node), VisitFloat64Cos(node); 1160 return MarkAsFloat64(node), VisitFloat64Cos(node);
1161 case IrOpcode::kFloat64Cosh:
1162 return MarkAsFloat64(node), VisitFloat64Cosh(node);
1161 case IrOpcode::kFloat64Exp: 1163 case IrOpcode::kFloat64Exp:
1162 return MarkAsFloat64(node), VisitFloat64Exp(node); 1164 return MarkAsFloat64(node), VisitFloat64Exp(node);
1163 case IrOpcode::kFloat64Expm1: 1165 case IrOpcode::kFloat64Expm1:
1164 return MarkAsFloat64(node), VisitFloat64Expm1(node); 1166 return MarkAsFloat64(node), VisitFloat64Expm1(node);
1165 case IrOpcode::kFloat64Log: 1167 case IrOpcode::kFloat64Log:
1166 return MarkAsFloat64(node), VisitFloat64Log(node); 1168 return MarkAsFloat64(node), VisitFloat64Log(node);
1167 case IrOpcode::kFloat64Log1p: 1169 case IrOpcode::kFloat64Log1p:
1168 return MarkAsFloat64(node), VisitFloat64Log1p(node); 1170 return MarkAsFloat64(node), VisitFloat64Log1p(node);
1169 case IrOpcode::kFloat64Log10: 1171 case IrOpcode::kFloat64Log10:
1170 return MarkAsFloat64(node), VisitFloat64Log10(node); 1172 return MarkAsFloat64(node), VisitFloat64Log10(node);
1171 case IrOpcode::kFloat64Log2: 1173 case IrOpcode::kFloat64Log2:
1172 return MarkAsFloat64(node), VisitFloat64Log2(node); 1174 return MarkAsFloat64(node), VisitFloat64Log2(node);
1173 case IrOpcode::kFloat64Pow: 1175 case IrOpcode::kFloat64Pow:
1174 return MarkAsFloat64(node), VisitFloat64Pow(node); 1176 return MarkAsFloat64(node), VisitFloat64Pow(node);
1175 case IrOpcode::kFloat64Sin: 1177 case IrOpcode::kFloat64Sin:
1176 return MarkAsFloat64(node), VisitFloat64Sin(node); 1178 return MarkAsFloat64(node), VisitFloat64Sin(node);
1179 case IrOpcode::kFloat64Sinh:
1180 return MarkAsFloat64(node), VisitFloat64Sinh(node);
1177 case IrOpcode::kFloat64Sqrt: 1181 case IrOpcode::kFloat64Sqrt:
1178 return MarkAsFloat64(node), VisitFloat64Sqrt(node); 1182 return MarkAsFloat64(node), VisitFloat64Sqrt(node);
1179 case IrOpcode::kFloat64Tan: 1183 case IrOpcode::kFloat64Tan:
1180 return MarkAsFloat64(node), VisitFloat64Tan(node); 1184 return MarkAsFloat64(node), VisitFloat64Tan(node);
1185 case IrOpcode::kFloat64Tanh:
1186 return MarkAsFloat64(node), VisitFloat64Tanh(node);
1181 case IrOpcode::kFloat64Equal: 1187 case IrOpcode::kFloat64Equal:
1182 return VisitFloat64Equal(node); 1188 return VisitFloat64Equal(node);
1183 case IrOpcode::kFloat64LessThan: 1189 case IrOpcode::kFloat64LessThan:
1184 return VisitFloat64LessThan(node); 1190 return VisitFloat64LessThan(node);
1185 case IrOpcode::kFloat64LessThanOrEqual: 1191 case IrOpcode::kFloat64LessThanOrEqual:
1186 return VisitFloat64LessThanOrEqual(node); 1192 return VisitFloat64LessThanOrEqual(node);
1187 case IrOpcode::kFloat32RoundDown: 1193 case IrOpcode::kFloat32RoundDown:
1188 return MarkAsFloat32(node), VisitFloat32RoundDown(node); 1194 return MarkAsFloat32(node), VisitFloat32RoundDown(node);
1189 case IrOpcode::kFloat64RoundDown: 1195 case IrOpcode::kFloat64RoundDown:
1190 return MarkAsFloat64(node), VisitFloat64RoundDown(node); 1196 return MarkAsFloat64(node), VisitFloat64RoundDown(node);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 } 1300 }
1295 1301
1296 void InstructionSelector::VisitFloat64Cbrt(Node* node) { 1302 void InstructionSelector::VisitFloat64Cbrt(Node* node) {
1297 VisitFloat64Ieee754Unop(node, kIeee754Float64Cbrt); 1303 VisitFloat64Ieee754Unop(node, kIeee754Float64Cbrt);
1298 } 1304 }
1299 1305
1300 void InstructionSelector::VisitFloat64Cos(Node* node) { 1306 void InstructionSelector::VisitFloat64Cos(Node* node) {
1301 VisitFloat64Ieee754Unop(node, kIeee754Float64Cos); 1307 VisitFloat64Ieee754Unop(node, kIeee754Float64Cos);
1302 } 1308 }
1303 1309
1310 void InstructionSelector::VisitFloat64Cosh(Node* node) {
1311 VisitFloat64Ieee754Unop(node, kIeee754Float64Cosh);
1312 }
1313
1304 void InstructionSelector::VisitFloat64Exp(Node* node) { 1314 void InstructionSelector::VisitFloat64Exp(Node* node) {
1305 VisitFloat64Ieee754Unop(node, kIeee754Float64Exp); 1315 VisitFloat64Ieee754Unop(node, kIeee754Float64Exp);
1306 } 1316 }
1307 1317
1308 void InstructionSelector::VisitFloat64Expm1(Node* node) { 1318 void InstructionSelector::VisitFloat64Expm1(Node* node) {
1309 VisitFloat64Ieee754Unop(node, kIeee754Float64Expm1); 1319 VisitFloat64Ieee754Unop(node, kIeee754Float64Expm1);
1310 } 1320 }
1311 1321
1312 void InstructionSelector::VisitFloat64Log(Node* node) { 1322 void InstructionSelector::VisitFloat64Log(Node* node) {
1313 VisitFloat64Ieee754Unop(node, kIeee754Float64Log); 1323 VisitFloat64Ieee754Unop(node, kIeee754Float64Log);
(...skipping 12 matching lines...) Expand all
1326 } 1336 }
1327 1337
1328 void InstructionSelector::VisitFloat64Pow(Node* node) { 1338 void InstructionSelector::VisitFloat64Pow(Node* node) {
1329 VisitFloat64Ieee754Binop(node, kIeee754Float64Pow); 1339 VisitFloat64Ieee754Binop(node, kIeee754Float64Pow);
1330 } 1340 }
1331 1341
1332 void InstructionSelector::VisitFloat64Sin(Node* node) { 1342 void InstructionSelector::VisitFloat64Sin(Node* node) {
1333 VisitFloat64Ieee754Unop(node, kIeee754Float64Sin); 1343 VisitFloat64Ieee754Unop(node, kIeee754Float64Sin);
1334 } 1344 }
1335 1345
1346 void InstructionSelector::VisitFloat64Sinh(Node* node) {
1347 VisitFloat64Ieee754Unop(node, kIeee754Float64Sinh);
1348 }
1349
1336 void InstructionSelector::VisitFloat64Tan(Node* node) { 1350 void InstructionSelector::VisitFloat64Tan(Node* node) {
1337 VisitFloat64Ieee754Unop(node, kIeee754Float64Tan); 1351 VisitFloat64Ieee754Unop(node, kIeee754Float64Tan);
1338 } 1352 }
1339 1353
1354 void InstructionSelector::VisitFloat64Tanh(Node* node) {
1355 VisitFloat64Ieee754Unop(node, kIeee754Float64Tanh);
1356 }
1357
1340 void InstructionSelector::EmitTableSwitch(const SwitchInfo& sw, 1358 void InstructionSelector::EmitTableSwitch(const SwitchInfo& sw,
1341 InstructionOperand& index_operand) { 1359 InstructionOperand& index_operand) {
1342 OperandGenerator g(this); 1360 OperandGenerator g(this);
1343 size_t input_count = 2 + sw.value_range; 1361 size_t input_count = 2 + sw.value_range;
1344 auto* inputs = zone()->NewArray<InstructionOperand>(input_count); 1362 auto* inputs = zone()->NewArray<InstructionOperand>(input_count);
1345 inputs[0] = index_operand; 1363 inputs[0] = index_operand;
1346 InstructionOperand default_operand = g.Label(sw.default_branch); 1364 InstructionOperand default_operand = g.Label(sw.default_branch);
1347 std::fill(&inputs[1], &inputs[input_count], default_operand); 1365 std::fill(&inputs[1], &inputs[input_count], default_operand);
1348 for (size_t index = 0; index < sw.case_count; ++index) { 1366 for (size_t index = 0; index < sw.case_count; ++index) {
1349 size_t value = sw.case_values[index] - sw.min_value; 1367 size_t value = sw.case_values[index] - sw.min_value;
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 return new (instruction_zone()) FrameStateDescriptor( 1969 return new (instruction_zone()) FrameStateDescriptor(
1952 instruction_zone(), state_info.type(), state_info.bailout_id(), 1970 instruction_zone(), state_info.type(), state_info.bailout_id(),
1953 state_info.state_combine(), parameters, locals, stack, 1971 state_info.state_combine(), parameters, locals, stack,
1954 state_info.shared_info(), outer_state); 1972 state_info.shared_info(), outer_state);
1955 } 1973 }
1956 1974
1957 1975
1958 } // namespace compiler 1976 } // namespace compiler
1959 } // namespace internal 1977 } // namespace internal
1960 } // namespace v8 1978 } // 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