int64x2.wast 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. ;;-------------------------------------------------------------------------------------------------------
  2. ;; Copyright (C) Microsoft Corporation and contributors. All rights reserved.
  3. ;; Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. ;;-------------------------------------------------------------------------------------------------------
  5. (module
  6. (import "dummy" "memory" (memory 1))
  7. (func (export "i16x8_anytrue") (result i32)
  8. (i64x2.any_true (m128.load offset=0 align=4 (i32.const 0)))
  9. )
  10. (func (export "i16x8_alltrue") (result i32)
  11. (i64x2.all_true (m128.load offset=0 align=4 (i32.const 0)))
  12. )
  13. (func (export "func_i64x2_extractlane_0") (local $v1 m128)
  14. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  15. (i64.store offset=0 (i32.const 8) (i64x2.extract_lane lane=0 (get_local $v1)))
  16. )
  17. (func (export "func_i64x2_extractlane_1") (local $v1 m128)
  18. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  19. (i64.store offset=0 (i32.const 0) (i64x2.extract_lane lane=1 (get_local $v1)))
  20. )
  21. (func (export "func_i64x2_replacelane_0") (local $v1 m128) (local $val i64)
  22. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  23. (set_local $val (i64.load offset=16 align=4 (i32.const 0)))
  24. (m128.store offset=0 (i32.const 0) (i64x2.replace_lane lane=0 (get_local $v1) (get_local $val)))
  25. )
  26. (func (export "func_i64x2_replacelane_1") (local $v1 m128) (local $val i64)
  27. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  28. (set_local $val (i64.load offset=16 align=4 (i32.const 0)))
  29. (m128.store offset=0 (i32.const 0) (i64x2.replace_lane lane=1 (get_local $v1) (get_local $val)))
  30. )
  31. (func (export "func_i64x2_splat") (local $v1 i64) (local $v2 m128)
  32. (set_local $v1 (i64.load offset=0 align=4 (i32.const 0)))
  33. (set_local $v2 (i64x2.splat (get_local $v1)))
  34. (m128.store offset=0 (i32.const 0) (get_local $v2))
  35. )
  36. (func (export "func_i64x2_add") (local $v1 m128) (local $v2 m128)
  37. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  38. (set_local $v2 (m128.load offset=0 align=4 (i32.const 16)))
  39. (m128.store offset=0 (i32.const 0) (i64x2.add (get_local $v1) (get_local $v2)))
  40. )
  41. (func (export "func_i64x2_sub") (local $v1 m128) (local $v2 m128)
  42. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  43. (set_local $v2 (m128.load offset=0 align=4 (i32.const 16)))
  44. (m128.store offset=0 (i32.const 0) (i64x2.sub (get_local $v1) (get_local $v2)))
  45. )
  46. (func (export "func_i64x2_neg") (local $v1 m128)
  47. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  48. (m128.store offset=0 (i32.const 0) (i64x2.neg (get_local $v1)))
  49. )
  50. (func (export "func_i64x2_anytrue") (local $v1 m128)
  51. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  52. (i32.store offset=0 (i32.const 0) (i64x2.any_true (get_local $v1)))
  53. )
  54. (func (export "func_i64x2_alltrue") (local $v1 m128)
  55. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  56. (i32.store offset=0 (i32.const 0) (i64x2.all_true (get_local $v1)))
  57. )
  58. (func (export "func_i64x2_shl") (param $shamt i32) (local $v1 m128)
  59. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  60. (m128.store offset=0 (i32.const 0) (i64x2.shl (get_local $v1) (get_local $shamt)))
  61. )
  62. (func (export "func_i64x2_shr_s") (param $shamt i32) (local $v1 m128)
  63. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  64. (m128.store offset=0 (i32.const 0) (i64x2.shr_s (get_local $v1) (get_local $shamt)))
  65. )
  66. (func (export "func_i64x2_shr_u") (param $shamt i32) (local $v1 m128)
  67. (set_local $v1 (m128.load offset=0 align=4 (i32.const 0)))
  68. (m128.store offset=0 (i32.const 0) (i64x2.shr_u (get_local $v1) (get_local $shamt)))
  69. )
  70. )