int64x2.wast 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 "func_i64x2_extractlane_0") (local $v1 v128)
  8. (set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
  9. (i64.store offset=0 (i32.const 8) (i64x2.extract_lane 0 (get_local $v1)))
  10. )
  11. (func (export "func_i64x2_extractlane_1") (local $v1 v128)
  12. (set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
  13. (i64.store offset=0 (i32.const 0) (i64x2.extract_lane 1 (get_local $v1)))
  14. )
  15. (func (export "func_i64x2_replacelane_0") (local $v1 v128) (local $val i64)
  16. (set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
  17. (set_local $val (i64.load offset=16 align=4 (i32.const 0)))
  18. (v128.store offset=0 align=4 (i32.const 0) (i64x2.replace_lane 0 (get_local $v1) (get_local $val)))
  19. )
  20. (func (export "func_i64x2_replacelane_1") (local $v1 v128) (local $val i64)
  21. (set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
  22. (set_local $val (i64.load offset=16 align=4 (i32.const 0)))
  23. (v128.store offset=0 align=4 (i32.const 0) (i64x2.replace_lane 1 (get_local $v1) (get_local $val)))
  24. )
  25. (func (export "func_i64x2_splat") (local $v1 i64) (local $v2 v128)
  26. (set_local $v1 (i64.load offset=0 align=4 (i32.const 0)))
  27. (set_local $v2 (i64x2.splat (get_local $v1)))
  28. (v128.store offset=0 align=4 (i32.const 0) (get_local $v2))
  29. )
  30. (func (export "func_i64x2_add") (local $v1 v128) (local $v2 v128)
  31. (set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
  32. (set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
  33. (v128.store offset=0 align=4 (i32.const 0) (i64x2.add (get_local $v1) (get_local $v2)))
  34. )
  35. (func (export "func_i64x2_sub") (local $v1 v128) (local $v2 v128)
  36. (set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
  37. (set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
  38. (v128.store offset=0 align=4 (i32.const 0) (i64x2.sub (get_local $v1) (get_local $v2)))
  39. )
  40. (func (export "func_i64x2_neg") (local $v1 v128)
  41. (set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
  42. (v128.store offset=0 align=4 (i32.const 0) (i64x2.neg (get_local $v1)))
  43. )
  44. (func (export "func_i64x2_shl") (param $shamt i32) (local $v1 v128)
  45. (set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
  46. (v128.store offset=0 align=4 (i32.const 0) (i64x2.shl (get_local $v1) (get_local $shamt)))
  47. )
  48. (func (export "func_i64x2_shr_s") (param $shamt i32) (local $v1 v128)
  49. (set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
  50. (v128.store offset=0 align=4 (i32.const 0) (i64x2.shr_s (get_local $v1) (get_local $shamt)))
  51. )
  52. (func (export "func_i64x2_shr_u") (param $shamt i32) (local $v1 v128)
  53. (set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
  54. (v128.store offset=0 align=4 (i32.const 0) (i64x2.shr_u (get_local $v1) (get_local $shamt)))
  55. )
  56. )