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

Side by Side Diff: src/compiler/raw-machine-assembler.h

Issue 1044793002: [turbofan] Add backend support for float32 operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add MachineOperator unit tests. Created 5 years, 8 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
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_RAW_MACHINE_ASSEMBLER_H_ 5 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
7 7
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/graph-builder.h" 9 #include "src/compiler/graph-builder.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 INTPTR_BINOP(Int, Sub); 321 INTPTR_BINOP(Int, Sub);
322 INTPTR_BINOP(Int, LessThan); 322 INTPTR_BINOP(Int, LessThan);
323 INTPTR_BINOP(Int, LessThanOrEqual); 323 INTPTR_BINOP(Int, LessThanOrEqual);
324 INTPTR_BINOP(Word, Equal); 324 INTPTR_BINOP(Word, Equal);
325 INTPTR_BINOP(Word, NotEqual); 325 INTPTR_BINOP(Word, NotEqual);
326 INTPTR_BINOP(Int, GreaterThanOrEqual); 326 INTPTR_BINOP(Int, GreaterThanOrEqual);
327 INTPTR_BINOP(Int, GreaterThan); 327 INTPTR_BINOP(Int, GreaterThan);
328 328
329 #undef INTPTR_BINOP 329 #undef INTPTR_BINOP
330 330
331 Node* Float32Add(Node* a, Node* b) {
332 return NewNode(machine()->Float32Add(), a, b);
333 }
334 Node* Float32Sub(Node* a, Node* b) {
335 return NewNode(machine()->Float32Sub(), a, b);
336 }
337 Node* Float32Mul(Node* a, Node* b) {
338 return NewNode(machine()->Float32Mul(), a, b);
339 }
340 Node* Float32Div(Node* a, Node* b) {
341 return NewNode(machine()->Float32Div(), a, b);
342 }
343 Node* Float32Sqrt(Node* a) { return NewNode(machine()->Float32Sqrt(), a); }
344 Node* Float32Equal(Node* a, Node* b) {
345 return NewNode(machine()->Float32Equal(), a, b);
346 }
347 Node* Float32NotEqual(Node* a, Node* b) {
348 return WordBinaryNot(Float32Equal(a, b));
349 }
350 Node* Float32LessThan(Node* a, Node* b) {
351 return NewNode(machine()->Float32LessThan(), a, b);
352 }
353 Node* Float32LessThanOrEqual(Node* a, Node* b) {
354 return NewNode(machine()->Float32LessThanOrEqual(), a, b);
355 }
356 Node* Float32GreaterThan(Node* a, Node* b) { return Float32LessThan(b, a); }
357 Node* Float32GreaterThanOrEqual(Node* a, Node* b) {
358 return Float32LessThanOrEqual(b, a);
359 }
360
331 Node* Float64Add(Node* a, Node* b) { 361 Node* Float64Add(Node* a, Node* b) {
332 return NewNode(machine()->Float64Add(), a, b); 362 return NewNode(machine()->Float64Add(), a, b);
333 } 363 }
334 Node* Float64Sub(Node* a, Node* b) { 364 Node* Float64Sub(Node* a, Node* b) {
335 return NewNode(machine()->Float64Sub(), a, b); 365 return NewNode(machine()->Float64Sub(), a, b);
336 } 366 }
337 Node* Float64Mul(Node* a, Node* b) { 367 Node* Float64Mul(Node* a, Node* b) {
338 return NewNode(machine()->Float64Mul(), a, b); 368 return NewNode(machine()->Float64Mul(), a, b);
339 } 369 }
340 Node* Float64Div(Node* a, Node* b) { 370 Node* Float64Div(Node* a, Node* b) {
341 return NewNode(machine()->Float64Div(), a, b); 371 return NewNode(machine()->Float64Div(), a, b);
342 } 372 }
343 Node* Float64Mod(Node* a, Node* b) { 373 Node* Float64Mod(Node* a, Node* b) {
344 return NewNode(machine()->Float64Mod(), a, b); 374 return NewNode(machine()->Float64Mod(), a, b);
345 } 375 }
376 Node* Float64Sqrt(Node* a) { return NewNode(machine()->Float64Sqrt(), a); }
346 Node* Float64Equal(Node* a, Node* b) { 377 Node* Float64Equal(Node* a, Node* b) {
347 return NewNode(machine()->Float64Equal(), a, b); 378 return NewNode(machine()->Float64Equal(), a, b);
348 } 379 }
349 Node* Float64NotEqual(Node* a, Node* b) { 380 Node* Float64NotEqual(Node* a, Node* b) {
350 return WordBinaryNot(Float64Equal(a, b)); 381 return WordBinaryNot(Float64Equal(a, b));
351 } 382 }
352 Node* Float64LessThan(Node* a, Node* b) { 383 Node* Float64LessThan(Node* a, Node* b) {
353 return NewNode(machine()->Float64LessThan(), a, b); 384 return NewNode(machine()->Float64LessThan(), a, b);
354 } 385 }
355 Node* Float64LessThanOrEqual(Node* a, Node* b) { 386 Node* Float64LessThanOrEqual(Node* a, Node* b) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 BasicBlock* current_block_; 511 BasicBlock* current_block_;
481 512
482 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); 513 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler);
483 }; 514 };
484 515
485 } // namespace compiler 516 } // namespace compiler
486 } // namespace internal 517 } // namespace internal
487 } // namespace v8 518 } // namespace v8
488 519
489 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 520 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698