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

Side by Side Diff: src/compiler/machine-node-factory.h

Issue 431473004: TF: Add ConvertFloat64ToUint32 and ConvertUint32ToFloat64 machine operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/machine-operator.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 #ifndef V8_COMPILER_MACHINE_NODE_FACTORY_H_ 5 #ifndef V8_COMPILER_MACHINE_NODE_FACTORY_H_
6 #define V8_COMPILER_MACHINE_NODE_FACTORY_H_ 6 #define V8_COMPILER_MACHINE_NODE_FACTORY_H_
7 7
8 #ifdef USE_SIMULATOR 8 #ifdef USE_SIMULATOR
9 #define MACHINE_ASSEMBLER_SUPPORTS_CALL_C 0 9 #define MACHINE_ASSEMBLER_SUPPORTS_CALL_C 0
10 #else 10 #else
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // Conversions. 325 // Conversions.
326 Node* ConvertInt32ToInt64(Node* a) { 326 Node* ConvertInt32ToInt64(Node* a) {
327 return NEW_NODE_1(MACHINE()->ConvertInt32ToInt64(), a); 327 return NEW_NODE_1(MACHINE()->ConvertInt32ToInt64(), a);
328 } 328 }
329 Node* ConvertInt64ToInt32(Node* a) { 329 Node* ConvertInt64ToInt32(Node* a) {
330 return NEW_NODE_1(MACHINE()->ConvertInt64ToInt32(), a); 330 return NEW_NODE_1(MACHINE()->ConvertInt64ToInt32(), a);
331 } 331 }
332 Node* ConvertInt32ToFloat64(Node* a) { 332 Node* ConvertInt32ToFloat64(Node* a) {
333 return NEW_NODE_1(MACHINE()->ConvertInt32ToFloat64(), a); 333 return NEW_NODE_1(MACHINE()->ConvertInt32ToFloat64(), a);
334 } 334 }
335 Node* ConvertUint32ToFloat64(Node* a) {
336 return NEW_NODE_1(MACHINE()->ConvertUint32ToFloat64(), a);
337 }
335 Node* ConvertFloat64ToInt32(Node* a) { 338 Node* ConvertFloat64ToInt32(Node* a) {
336 return NEW_NODE_1(MACHINE()->ConvertFloat64ToInt32(), a); 339 return NEW_NODE_1(MACHINE()->ConvertFloat64ToInt32(), a);
337 } 340 }
341 Node* ConvertFloat64ToUint32(Node* a) {
342 return NEW_NODE_1(MACHINE()->ConvertFloat64ToUint32(), a);
343 }
338 344
339 #ifdef MACHINE_ASSEMBLER_SUPPORTS_CALL_C 345 #ifdef MACHINE_ASSEMBLER_SUPPORTS_CALL_C
340 // Call to C. 346 // Call to C.
341 Node* CallC(Node* function_address, MachineRepresentation return_type, 347 Node* CallC(Node* function_address, MachineRepresentation return_type,
342 MachineRepresentation* arg_types, Node** args, int n_args) { 348 MachineRepresentation* arg_types, Node** args, int n_args) {
343 CallDescriptor* descriptor = Linkage::GetSimplifiedCDescriptor( 349 CallDescriptor* descriptor = Linkage::GetSimplifiedCDescriptor(
344 ZONE(), n_args, return_type, arg_types); 350 ZONE(), n_args, return_type, arg_types);
345 Node** passed_args = 351 Node** passed_args =
346 static_cast<Node**>(alloca((n_args + 1) * sizeof(args[0]))); 352 static_cast<Node**>(alloca((n_args + 1) * sizeof(args[0])));
347 passed_args[0] = function_address; 353 passed_args[0] = function_address;
(...skipping 11 matching lines...) Expand all
359 #undef NEW_NODE_3 365 #undef NEW_NODE_3
360 #undef MACHINE 366 #undef MACHINE
361 #undef COMMON 367 #undef COMMON
362 #undef ZONE 368 #undef ZONE
363 369
364 } // namespace compiler 370 } // namespace compiler
365 } // namespace internal 371 } // namespace internal
366 } // namespace v8 372 } // namespace v8
367 373
368 #endif // V8_COMPILER_MACHINE_NODE_FACTORY_H_ 374 #endif // V8_COMPILER_MACHINE_NODE_FACTORY_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698