OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/wasm-compiler.h" | 5 #include "src/compiler/wasm-compiler.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/assembler-inl.h" | 9 #include "src/assembler-inl.h" |
10 #include "src/base/platform/elapsed-timer.h" | 10 #include "src/base/platform/elapsed-timer.h" |
(...skipping 3361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3372 inputs[0]); | 3372 inputs[0]); |
3373 case wasm::kExprF32x4UConvertI32x4: | 3373 case wasm::kExprF32x4UConvertI32x4: |
3374 return graph()->NewNode(jsgraph()->machine()->Float32x4FromUint32x4(), | 3374 return graph()->NewNode(jsgraph()->machine()->Float32x4FromUint32x4(), |
3375 inputs[0]); | 3375 inputs[0]); |
3376 case wasm::kExprF32x4Abs: | 3376 case wasm::kExprF32x4Abs: |
3377 return graph()->NewNode(jsgraph()->machine()->Float32x4Abs(), inputs[0]); | 3377 return graph()->NewNode(jsgraph()->machine()->Float32x4Abs(), inputs[0]); |
3378 case wasm::kExprF32x4Neg: | 3378 case wasm::kExprF32x4Neg: |
3379 return graph()->NewNode(jsgraph()->machine()->Float32x4Neg(), inputs[0]); | 3379 return graph()->NewNode(jsgraph()->machine()->Float32x4Neg(), inputs[0]); |
3380 case wasm::kExprF32x4Sqrt: | 3380 case wasm::kExprF32x4Sqrt: |
3381 return graph()->NewNode(jsgraph()->machine()->Float32x4Sqrt(), inputs[0]); | 3381 return graph()->NewNode(jsgraph()->machine()->Float32x4Sqrt(), inputs[0]); |
| 3382 case wasm::kExprF32x4RecipApprox: |
| 3383 return graph()->NewNode(jsgraph()->machine()->Float32x4RecipApprox(), |
| 3384 inputs[0]); |
| 3385 case wasm::kExprF32x4RecipSqrtApprox: |
| 3386 return graph()->NewNode(jsgraph()->machine()->Float32x4RecipSqrtApprox(), |
| 3387 inputs[0]); |
3382 case wasm::kExprF32x4Add: | 3388 case wasm::kExprF32x4Add: |
3383 return graph()->NewNode(jsgraph()->machine()->Float32x4Add(), inputs[0], | 3389 return graph()->NewNode(jsgraph()->machine()->Float32x4Add(), inputs[0], |
3384 inputs[1]); | 3390 inputs[1]); |
3385 case wasm::kExprF32x4Sub: | 3391 case wasm::kExprF32x4Sub: |
3386 return graph()->NewNode(jsgraph()->machine()->Float32x4Sub(), inputs[0], | 3392 return graph()->NewNode(jsgraph()->machine()->Float32x4Sub(), inputs[0], |
3387 inputs[1]); | 3393 inputs[1]); |
3388 case wasm::kExprF32x4Mul: | 3394 case wasm::kExprF32x4Mul: |
3389 return graph()->NewNode(jsgraph()->machine()->Float32x4Mul(), inputs[0], | 3395 return graph()->NewNode(jsgraph()->machine()->Float32x4Mul(), inputs[0], |
3390 inputs[1]); | 3396 inputs[1]); |
3391 case wasm::kExprF32x4Div: | 3397 case wasm::kExprF32x4Div: |
3392 return graph()->NewNode(jsgraph()->machine()->Float32x4Div(), inputs[0], | 3398 return graph()->NewNode(jsgraph()->machine()->Float32x4Div(), inputs[0], |
3393 inputs[1]); | 3399 inputs[1]); |
3394 case wasm::kExprF32x4Min: | 3400 case wasm::kExprF32x4Min: |
3395 return graph()->NewNode(jsgraph()->machine()->Float32x4Min(), inputs[0], | 3401 return graph()->NewNode(jsgraph()->machine()->Float32x4Min(), inputs[0], |
3396 inputs[1]); | 3402 inputs[1]); |
3397 case wasm::kExprF32x4Max: | 3403 case wasm::kExprF32x4Max: |
3398 return graph()->NewNode(jsgraph()->machine()->Float32x4Max(), inputs[0], | 3404 return graph()->NewNode(jsgraph()->machine()->Float32x4Max(), inputs[0], |
3399 inputs[1]); | 3405 inputs[1]); |
| 3406 case wasm::kExprF32x4RecipRefine: |
| 3407 return graph()->NewNode(jsgraph()->machine()->Float32x4RecipRefine(), |
| 3408 inputs[0], inputs[1]); |
| 3409 case wasm::kExprF32x4RecipSqrtRefine: |
| 3410 return graph()->NewNode(jsgraph()->machine()->Float32x4RecipSqrtRefine(), |
| 3411 inputs[0], inputs[1]); |
3400 case wasm::kExprF32x4Eq: | 3412 case wasm::kExprF32x4Eq: |
3401 return graph()->NewNode(jsgraph()->machine()->Float32x4Equal(), inputs[0], | 3413 return graph()->NewNode(jsgraph()->machine()->Float32x4Equal(), inputs[0], |
3402 inputs[1]); | 3414 inputs[1]); |
3403 case wasm::kExprF32x4Ne: | 3415 case wasm::kExprF32x4Ne: |
3404 return graph()->NewNode(jsgraph()->machine()->Float32x4NotEqual(), | 3416 return graph()->NewNode(jsgraph()->machine()->Float32x4NotEqual(), |
3405 inputs[0], inputs[1]); | 3417 inputs[0], inputs[1]); |
3406 // TODO(aseemgarg): Get rid of GreaterThan and GreaterThanEquals machine ops | |
3407 // for all SIMD types. | |
3408 case wasm::kExprF32x4Gt: | |
3409 return graph()->NewNode(jsgraph()->machine()->Float32x4GreaterThan(), | |
3410 inputs[0], inputs[1]); | |
3411 case wasm::kExprF32x4Ge: | |
3412 return graph()->NewNode( | |
3413 jsgraph()->machine()->Float32x4GreaterThanOrEqual(), inputs[0], | |
3414 inputs[1]); | |
3415 case wasm::kExprF32x4Lt: | 3418 case wasm::kExprF32x4Lt: |
3416 return graph()->NewNode(jsgraph()->machine()->Float32x4LessThan(), | 3419 return graph()->NewNode(jsgraph()->machine()->Float32x4LessThan(), |
3417 inputs[0], inputs[1]); | 3420 inputs[0], inputs[1]); |
3418 case wasm::kExprF32x4Le: | 3421 case wasm::kExprF32x4Le: |
3419 return graph()->NewNode(jsgraph()->machine()->Float32x4LessThanOrEqual(), | 3422 return graph()->NewNode(jsgraph()->machine()->Float32x4LessThanOrEqual(), |
3420 inputs[0], inputs[1]); | 3423 inputs[0], inputs[1]); |
| 3424 case wasm::kExprF32x4Gt: |
| 3425 return graph()->NewNode(jsgraph()->machine()->Float32x4LessThan(), |
| 3426 inputs[1], inputs[0]); |
| 3427 case wasm::kExprF32x4Ge: |
| 3428 return graph()->NewNode(jsgraph()->machine()->Float32x4LessThanOrEqual(), |
| 3429 inputs[1], inputs[0]); |
3421 case wasm::kExprI32x4Splat: | 3430 case wasm::kExprI32x4Splat: |
3422 return graph()->NewNode(jsgraph()->machine()->Int32x4Splat(), inputs[0]); | 3431 return graph()->NewNode(jsgraph()->machine()->Int32x4Splat(), inputs[0]); |
3423 case wasm::kExprI32x4SConvertF32x4: | 3432 case wasm::kExprI32x4SConvertF32x4: |
3424 return graph()->NewNode(jsgraph()->machine()->Int32x4FromFloat32x4(), | 3433 return graph()->NewNode(jsgraph()->machine()->Int32x4FromFloat32x4(), |
3425 inputs[0]); | 3434 inputs[0]); |
3426 case wasm::kExprI32x4UConvertF32x4: | 3435 case wasm::kExprI32x4UConvertF32x4: |
3427 return graph()->NewNode(jsgraph()->machine()->Uint32x4FromFloat32x4(), | 3436 return graph()->NewNode(jsgraph()->machine()->Uint32x4FromFloat32x4(), |
3428 inputs[0]); | 3437 inputs[0]); |
3429 case wasm::kExprI32x4Neg: | 3438 case wasm::kExprI32x4Neg: |
3430 return graph()->NewNode(jsgraph()->machine()->Int32x4Neg(), inputs[0]); | 3439 return graph()->NewNode(jsgraph()->machine()->Int32x4Neg(), inputs[0]); |
(...skipping 12 matching lines...) Expand all Loading... |
3443 case wasm::kExprI32x4MaxS: | 3452 case wasm::kExprI32x4MaxS: |
3444 return graph()->NewNode(jsgraph()->machine()->Int32x4Max(), inputs[0], | 3453 return graph()->NewNode(jsgraph()->machine()->Int32x4Max(), inputs[0], |
3445 inputs[1]); | 3454 inputs[1]); |
3446 case wasm::kExprI32x4Eq: | 3455 case wasm::kExprI32x4Eq: |
3447 return graph()->NewNode(jsgraph()->machine()->Int32x4Equal(), inputs[0], | 3456 return graph()->NewNode(jsgraph()->machine()->Int32x4Equal(), inputs[0], |
3448 inputs[1]); | 3457 inputs[1]); |
3449 case wasm::kExprI32x4Ne: | 3458 case wasm::kExprI32x4Ne: |
3450 return graph()->NewNode(jsgraph()->machine()->Int32x4NotEqual(), | 3459 return graph()->NewNode(jsgraph()->machine()->Int32x4NotEqual(), |
3451 inputs[0], inputs[1]); | 3460 inputs[0], inputs[1]); |
3452 case wasm::kExprI32x4LtS: | 3461 case wasm::kExprI32x4LtS: |
3453 return graph()->NewNode(jsgraph()->machine()->Int32x4GreaterThan(), | 3462 return graph()->NewNode(jsgraph()->machine()->Int32x4LessThan(), |
| 3463 inputs[0], inputs[1]); |
| 3464 case wasm::kExprI32x4LeS: |
| 3465 return graph()->NewNode(jsgraph()->machine()->Int32x4LessThanOrEqual(), |
| 3466 inputs[0], inputs[1]); |
| 3467 case wasm::kExprI32x4GtS: |
| 3468 return graph()->NewNode(jsgraph()->machine()->Int32x4LessThan(), |
3454 inputs[1], inputs[0]); | 3469 inputs[1], inputs[0]); |
3455 case wasm::kExprI32x4LeS: | 3470 case wasm::kExprI32x4GeS: |
3456 return graph()->NewNode(jsgraph()->machine()->Int32x4GreaterThanOrEqual(), | 3471 return graph()->NewNode(jsgraph()->machine()->Int32x4LessThanOrEqual(), |
3457 inputs[1], inputs[0]); | 3472 inputs[1], inputs[0]); |
3458 case wasm::kExprI32x4GtS: | |
3459 return graph()->NewNode(jsgraph()->machine()->Int32x4GreaterThan(), | |
3460 inputs[0], inputs[1]); | |
3461 case wasm::kExprI32x4GeS: | |
3462 return graph()->NewNode(jsgraph()->machine()->Int32x4GreaterThanOrEqual(), | |
3463 inputs[0], inputs[1]); | |
3464 case wasm::kExprI32x4MinU: | 3473 case wasm::kExprI32x4MinU: |
3465 return graph()->NewNode(jsgraph()->machine()->Uint32x4Min(), inputs[0], | 3474 return graph()->NewNode(jsgraph()->machine()->Uint32x4Min(), inputs[0], |
3466 inputs[1]); | 3475 inputs[1]); |
3467 case wasm::kExprI32x4MaxU: | 3476 case wasm::kExprI32x4MaxU: |
3468 return graph()->NewNode(jsgraph()->machine()->Uint32x4Max(), inputs[0], | 3477 return graph()->NewNode(jsgraph()->machine()->Uint32x4Max(), inputs[0], |
3469 inputs[1]); | 3478 inputs[1]); |
3470 case wasm::kExprI32x4LtU: | 3479 case wasm::kExprI32x4LtU: |
3471 return graph()->NewNode(jsgraph()->machine()->Uint32x4GreaterThan(), | 3480 return graph()->NewNode(jsgraph()->machine()->Uint32x4LessThan(), |
| 3481 inputs[0], inputs[1]); |
| 3482 case wasm::kExprI32x4LeU: |
| 3483 return graph()->NewNode(jsgraph()->machine()->Uint32x4LessThanOrEqual(), |
| 3484 inputs[0], inputs[1]); |
| 3485 case wasm::kExprI32x4GtU: |
| 3486 return graph()->NewNode(jsgraph()->machine()->Uint32x4LessThan(), |
3472 inputs[1], inputs[0]); | 3487 inputs[1], inputs[0]); |
3473 case wasm::kExprI32x4LeU: | |
3474 return graph()->NewNode( | |
3475 jsgraph()->machine()->Uint32x4GreaterThanOrEqual(), inputs[1], | |
3476 inputs[0]); | |
3477 case wasm::kExprI32x4GtU: | |
3478 return graph()->NewNode(jsgraph()->machine()->Uint32x4GreaterThan(), | |
3479 inputs[0], inputs[1]); | |
3480 case wasm::kExprI32x4GeU: | 3488 case wasm::kExprI32x4GeU: |
3481 return graph()->NewNode( | 3489 return graph()->NewNode(jsgraph()->machine()->Uint32x4LessThanOrEqual(), |
3482 jsgraph()->machine()->Uint32x4GreaterThanOrEqual(), inputs[0], | 3490 inputs[1], inputs[0]); |
3483 inputs[1]); | |
3484 case wasm::kExprI16x8Splat: | 3491 case wasm::kExprI16x8Splat: |
3485 return graph()->NewNode(jsgraph()->machine()->Int16x8Splat(), inputs[0]); | 3492 return graph()->NewNode(jsgraph()->machine()->Int16x8Splat(), inputs[0]); |
3486 case wasm::kExprI16x8Neg: | 3493 case wasm::kExprI16x8Neg: |
3487 return graph()->NewNode(jsgraph()->machine()->Int16x8Neg(), inputs[0]); | 3494 return graph()->NewNode(jsgraph()->machine()->Int16x8Neg(), inputs[0]); |
3488 case wasm::kExprI16x8Add: | 3495 case wasm::kExprI16x8Add: |
3489 return graph()->NewNode(jsgraph()->machine()->Int16x8Add(), inputs[0], | 3496 return graph()->NewNode(jsgraph()->machine()->Int16x8Add(), inputs[0], |
3490 inputs[1]); | 3497 inputs[1]); |
3491 case wasm::kExprI16x8AddSaturateS: | 3498 case wasm::kExprI16x8AddSaturateS: |
3492 return graph()->NewNode(jsgraph()->machine()->Int16x8AddSaturate(), | 3499 return graph()->NewNode(jsgraph()->machine()->Int16x8AddSaturate(), |
3493 inputs[0], inputs[1]); | 3500 inputs[0], inputs[1]); |
(...skipping 12 matching lines...) Expand all Loading... |
3506 case wasm::kExprI16x8MaxS: | 3513 case wasm::kExprI16x8MaxS: |
3507 return graph()->NewNode(jsgraph()->machine()->Int16x8Max(), inputs[0], | 3514 return graph()->NewNode(jsgraph()->machine()->Int16x8Max(), inputs[0], |
3508 inputs[1]); | 3515 inputs[1]); |
3509 case wasm::kExprI16x8Eq: | 3516 case wasm::kExprI16x8Eq: |
3510 return graph()->NewNode(jsgraph()->machine()->Int16x8Equal(), inputs[0], | 3517 return graph()->NewNode(jsgraph()->machine()->Int16x8Equal(), inputs[0], |
3511 inputs[1]); | 3518 inputs[1]); |
3512 case wasm::kExprI16x8Ne: | 3519 case wasm::kExprI16x8Ne: |
3513 return graph()->NewNode(jsgraph()->machine()->Int16x8NotEqual(), | 3520 return graph()->NewNode(jsgraph()->machine()->Int16x8NotEqual(), |
3514 inputs[0], inputs[1]); | 3521 inputs[0], inputs[1]); |
3515 case wasm::kExprI16x8LtS: | 3522 case wasm::kExprI16x8LtS: |
3516 return graph()->NewNode(jsgraph()->machine()->Int16x8GreaterThan(), | 3523 return graph()->NewNode(jsgraph()->machine()->Int16x8LessThan(), |
| 3524 inputs[0], inputs[1]); |
| 3525 case wasm::kExprI16x8LeS: |
| 3526 return graph()->NewNode(jsgraph()->machine()->Int16x8LessThanOrEqual(), |
| 3527 inputs[0], inputs[1]); |
| 3528 case wasm::kExprI16x8GtS: |
| 3529 return graph()->NewNode(jsgraph()->machine()->Int16x8LessThan(), |
3517 inputs[1], inputs[0]); | 3530 inputs[1], inputs[0]); |
3518 case wasm::kExprI16x8LeS: | 3531 case wasm::kExprI16x8GeS: |
3519 return graph()->NewNode(jsgraph()->machine()->Int16x8GreaterThanOrEqual(), | 3532 return graph()->NewNode(jsgraph()->machine()->Int16x8LessThanOrEqual(), |
3520 inputs[1], inputs[0]); | 3533 inputs[1], inputs[0]); |
3521 case wasm::kExprI16x8GtS: | |
3522 return graph()->NewNode(jsgraph()->machine()->Int16x8GreaterThan(), | |
3523 inputs[0], inputs[1]); | |
3524 case wasm::kExprI16x8GeS: | |
3525 return graph()->NewNode(jsgraph()->machine()->Int16x8GreaterThanOrEqual(), | |
3526 inputs[0], inputs[1]); | |
3527 case wasm::kExprI16x8AddSaturateU: | 3534 case wasm::kExprI16x8AddSaturateU: |
3528 return graph()->NewNode(jsgraph()->machine()->Uint16x8AddSaturate(), | 3535 return graph()->NewNode(jsgraph()->machine()->Uint16x8AddSaturate(), |
3529 inputs[0], inputs[1]); | 3536 inputs[0], inputs[1]); |
3530 case wasm::kExprI16x8SubSaturateU: | 3537 case wasm::kExprI16x8SubSaturateU: |
3531 return graph()->NewNode(jsgraph()->machine()->Uint16x8SubSaturate(), | 3538 return graph()->NewNode(jsgraph()->machine()->Uint16x8SubSaturate(), |
3532 inputs[0], inputs[1]); | 3539 inputs[0], inputs[1]); |
3533 case wasm::kExprI16x8MinU: | 3540 case wasm::kExprI16x8MinU: |
3534 return graph()->NewNode(jsgraph()->machine()->Uint16x8Min(), inputs[0], | 3541 return graph()->NewNode(jsgraph()->machine()->Uint16x8Min(), inputs[0], |
3535 inputs[1]); | 3542 inputs[1]); |
3536 case wasm::kExprI16x8MaxU: | 3543 case wasm::kExprI16x8MaxU: |
3537 return graph()->NewNode(jsgraph()->machine()->Uint16x8Max(), inputs[0], | 3544 return graph()->NewNode(jsgraph()->machine()->Uint16x8Max(), inputs[0], |
3538 inputs[1]); | 3545 inputs[1]); |
3539 case wasm::kExprI16x8LtU: | 3546 case wasm::kExprI16x8LtU: |
3540 return graph()->NewNode(jsgraph()->machine()->Uint16x8GreaterThan(), | 3547 return graph()->NewNode(jsgraph()->machine()->Uint16x8LessThan(), |
| 3548 inputs[0], inputs[1]); |
| 3549 case wasm::kExprI16x8LeU: |
| 3550 return graph()->NewNode(jsgraph()->machine()->Uint16x8LessThanOrEqual(), |
| 3551 inputs[0], inputs[1]); |
| 3552 case wasm::kExprI16x8GtU: |
| 3553 return graph()->NewNode(jsgraph()->machine()->Uint16x8LessThan(), |
3541 inputs[1], inputs[0]); | 3554 inputs[1], inputs[0]); |
3542 case wasm::kExprI16x8LeU: | |
3543 return graph()->NewNode( | |
3544 jsgraph()->machine()->Uint16x8GreaterThanOrEqual(), inputs[1], | |
3545 inputs[0]); | |
3546 case wasm::kExprI16x8GtU: | |
3547 return graph()->NewNode(jsgraph()->machine()->Uint16x8GreaterThan(), | |
3548 inputs[0], inputs[1]); | |
3549 case wasm::kExprI16x8GeU: | 3555 case wasm::kExprI16x8GeU: |
3550 return graph()->NewNode( | 3556 return graph()->NewNode(jsgraph()->machine()->Uint16x8LessThanOrEqual(), |
3551 jsgraph()->machine()->Uint16x8GreaterThanOrEqual(), inputs[0], | 3557 inputs[1], inputs[0]); |
3552 inputs[1]); | |
3553 case wasm::kExprI8x16Splat: | 3558 case wasm::kExprI8x16Splat: |
3554 return graph()->NewNode(jsgraph()->machine()->Int8x16Splat(), inputs[0]); | 3559 return graph()->NewNode(jsgraph()->machine()->Int8x16Splat(), inputs[0]); |
3555 case wasm::kExprI8x16Neg: | 3560 case wasm::kExprI8x16Neg: |
3556 return graph()->NewNode(jsgraph()->machine()->Int8x16Neg(), inputs[0]); | 3561 return graph()->NewNode(jsgraph()->machine()->Int8x16Neg(), inputs[0]); |
3557 case wasm::kExprI8x16Add: | 3562 case wasm::kExprI8x16Add: |
3558 return graph()->NewNode(jsgraph()->machine()->Int8x16Add(), inputs[0], | 3563 return graph()->NewNode(jsgraph()->machine()->Int8x16Add(), inputs[0], |
3559 inputs[1]); | 3564 inputs[1]); |
3560 case wasm::kExprI8x16AddSaturateS: | 3565 case wasm::kExprI8x16AddSaturateS: |
3561 return graph()->NewNode(jsgraph()->machine()->Int8x16AddSaturate(), | 3566 return graph()->NewNode(jsgraph()->machine()->Int8x16AddSaturate(), |
3562 inputs[0], inputs[1]); | 3567 inputs[0], inputs[1]); |
(...skipping 12 matching lines...) Expand all Loading... |
3575 case wasm::kExprI8x16MaxS: | 3580 case wasm::kExprI8x16MaxS: |
3576 return graph()->NewNode(jsgraph()->machine()->Int8x16Max(), inputs[0], | 3581 return graph()->NewNode(jsgraph()->machine()->Int8x16Max(), inputs[0], |
3577 inputs[1]); | 3582 inputs[1]); |
3578 case wasm::kExprI8x16Eq: | 3583 case wasm::kExprI8x16Eq: |
3579 return graph()->NewNode(jsgraph()->machine()->Int8x16Equal(), inputs[0], | 3584 return graph()->NewNode(jsgraph()->machine()->Int8x16Equal(), inputs[0], |
3580 inputs[1]); | 3585 inputs[1]); |
3581 case wasm::kExprI8x16Ne: | 3586 case wasm::kExprI8x16Ne: |
3582 return graph()->NewNode(jsgraph()->machine()->Int8x16NotEqual(), | 3587 return graph()->NewNode(jsgraph()->machine()->Int8x16NotEqual(), |
3583 inputs[0], inputs[1]); | 3588 inputs[0], inputs[1]); |
3584 case wasm::kExprI8x16LtS: | 3589 case wasm::kExprI8x16LtS: |
3585 return graph()->NewNode(jsgraph()->machine()->Int8x16GreaterThan(), | 3590 return graph()->NewNode(jsgraph()->machine()->Int8x16LessThan(), |
| 3591 inputs[0], inputs[1]); |
| 3592 case wasm::kExprI8x16LeS: |
| 3593 return graph()->NewNode(jsgraph()->machine()->Int8x16LessThanOrEqual(), |
| 3594 inputs[0], inputs[1]); |
| 3595 case wasm::kExprI8x16GtS: |
| 3596 return graph()->NewNode(jsgraph()->machine()->Int8x16LessThan(), |
3586 inputs[1], inputs[0]); | 3597 inputs[1], inputs[0]); |
3587 case wasm::kExprI8x16LeS: | 3598 case wasm::kExprI8x16GeS: |
3588 return graph()->NewNode(jsgraph()->machine()->Int8x16GreaterThanOrEqual(), | 3599 return graph()->NewNode(jsgraph()->machine()->Int8x16LessThanOrEqual(), |
3589 inputs[1], inputs[0]); | 3600 inputs[1], inputs[0]); |
3590 case wasm::kExprI8x16GtS: | |
3591 return graph()->NewNode(jsgraph()->machine()->Int8x16GreaterThan(), | |
3592 inputs[0], inputs[1]); | |
3593 case wasm::kExprI8x16GeS: | |
3594 return graph()->NewNode(jsgraph()->machine()->Int8x16GreaterThanOrEqual(), | |
3595 inputs[0], inputs[1]); | |
3596 case wasm::kExprI8x16AddSaturateU: | 3601 case wasm::kExprI8x16AddSaturateU: |
3597 return graph()->NewNode(jsgraph()->machine()->Uint8x16AddSaturate(), | 3602 return graph()->NewNode(jsgraph()->machine()->Uint8x16AddSaturate(), |
3598 inputs[0], inputs[1]); | 3603 inputs[0], inputs[1]); |
3599 case wasm::kExprI8x16SubSaturateU: | 3604 case wasm::kExprI8x16SubSaturateU: |
3600 return graph()->NewNode(jsgraph()->machine()->Uint8x16SubSaturate(), | 3605 return graph()->NewNode(jsgraph()->machine()->Uint8x16SubSaturate(), |
3601 inputs[0], inputs[1]); | 3606 inputs[0], inputs[1]); |
3602 case wasm::kExprI8x16MinU: | 3607 case wasm::kExprI8x16MinU: |
3603 return graph()->NewNode(jsgraph()->machine()->Uint8x16Min(), inputs[0], | 3608 return graph()->NewNode(jsgraph()->machine()->Uint8x16Min(), inputs[0], |
3604 inputs[1]); | 3609 inputs[1]); |
3605 case wasm::kExprI8x16MaxU: | 3610 case wasm::kExprI8x16MaxU: |
3606 return graph()->NewNode(jsgraph()->machine()->Uint8x16Max(), inputs[0], | 3611 return graph()->NewNode(jsgraph()->machine()->Uint8x16Max(), inputs[0], |
3607 inputs[1]); | 3612 inputs[1]); |
3608 case wasm::kExprI8x16LtU: | 3613 case wasm::kExprI8x16LtU: |
3609 return graph()->NewNode(jsgraph()->machine()->Uint8x16GreaterThan(), | 3614 return graph()->NewNode(jsgraph()->machine()->Uint8x16LessThan(), |
| 3615 inputs[0], inputs[1]); |
| 3616 case wasm::kExprI8x16LeU: |
| 3617 return graph()->NewNode(jsgraph()->machine()->Uint8x16LessThanOrEqual(), |
| 3618 inputs[0], inputs[1]); |
| 3619 case wasm::kExprI8x16GtU: |
| 3620 return graph()->NewNode(jsgraph()->machine()->Uint8x16LessThan(), |
3610 inputs[1], inputs[0]); | 3621 inputs[1], inputs[0]); |
3611 case wasm::kExprI8x16LeU: | |
3612 return graph()->NewNode( | |
3613 jsgraph()->machine()->Uint8x16GreaterThanOrEqual(), inputs[1], | |
3614 inputs[0]); | |
3615 case wasm::kExprI8x16GtU: | |
3616 return graph()->NewNode(jsgraph()->machine()->Uint8x16GreaterThan(), | |
3617 inputs[0], inputs[1]); | |
3618 case wasm::kExprI8x16GeU: | 3622 case wasm::kExprI8x16GeU: |
3619 return graph()->NewNode( | 3623 return graph()->NewNode(jsgraph()->machine()->Uint8x16LessThanOrEqual(), |
3620 jsgraph()->machine()->Uint8x16GreaterThanOrEqual(), inputs[0], | 3624 inputs[1], inputs[0]); |
3621 inputs[1]); | |
3622 case wasm::kExprS128And: | 3625 case wasm::kExprS128And: |
3623 return graph()->NewNode(jsgraph()->machine()->Simd128And(), inputs[0], | 3626 return graph()->NewNode(jsgraph()->machine()->Simd128And(), inputs[0], |
3624 inputs[1]); | 3627 inputs[1]); |
3625 case wasm::kExprS128Or: | 3628 case wasm::kExprS128Or: |
3626 return graph()->NewNode(jsgraph()->machine()->Simd128Or(), inputs[0], | 3629 return graph()->NewNode(jsgraph()->machine()->Simd128Or(), inputs[0], |
3627 inputs[1]); | 3630 inputs[1]); |
3628 case wasm::kExprS128Xor: | 3631 case wasm::kExprS128Xor: |
3629 return graph()->NewNode(jsgraph()->machine()->Simd128Xor(), inputs[0], | 3632 return graph()->NewNode(jsgraph()->machine()->Simd128Xor(), inputs[0], |
3630 inputs[1]); | 3633 inputs[1]); |
3631 case wasm::kExprS128Not: | 3634 case wasm::kExprS128Not: |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4232 wasm::ErrorThrower* thrower, Isolate* isolate, | 4235 wasm::ErrorThrower* thrower, Isolate* isolate, |
4233 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { | 4236 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { |
4234 WasmCompilationUnit unit(isolate, module_env, function); | 4237 WasmCompilationUnit unit(isolate, module_env, function); |
4235 unit.ExecuteCompilation(); | 4238 unit.ExecuteCompilation(); |
4236 return unit.FinishCompilation(thrower); | 4239 return unit.FinishCompilation(thrower); |
4237 } | 4240 } |
4238 | 4241 |
4239 } // namespace compiler | 4242 } // namespace compiler |
4240 } // namespace internal | 4243 } // namespace internal |
4241 } // namespace v8 | 4244 } // namespace v8 |
OLD | NEW |