f32address.wast 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ;;-------------------------------------------------------------------------------------------------------
  2. ;; Copyright (C) Microsoft. 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. (memory 1 1)
  7. (data (i32.const 1) "\00\00\e0\7f")
  8. (func (export "f32.load") (result f32) (f32.load offset=0 align=1 (i32.const 1)))
  9. (func (export "i32.load") (result i32) (i32.load offset=0 align=2 (i32.const 1)))
  10. (func (export "f32.store") (f32.store (i32.const 1) (f32.const 0x7fa00000)))
  11. (func (export "i32.store") (i32.store (i32.const 1) (i32.const 0x7fa00000)))
  12. (func (export "reset") (i32.store (i32.const 1) (i32.const 0)))
  13. (func (export "f32.load1") (result f32) (f32.load offset=1 align=1 (i32.const 1)))
  14. (func (export "i32.load1") (result i32) (i32.load offset=1 align=2 (i32.const 1)))
  15. (func (export "f32.store1") (f32.store offset=1 (i32.const 1) (f32.const 0x7fa00000)))
  16. (func (export "i32.store1") (i32.store offset=1 (i32.const 1) (i32.const 0x7fa00000)))
  17. (func (export "reset1") (i32.store offset=1 (i32.const 1) (i32.const 0)))
  18. (func (export "f32.load2") (result f32) (f32.load offset=2 align=1 (i32.const 1)))
  19. (func (export "i32.load2") (result i32) (i32.load offset=2 align=2 (i32.const 1)))
  20. (func (export "f32.store2") (f32.store offset=2 (i32.const 1) (f32.const 0x7fa00000)))
  21. (func (export "i32.store2") (i32.store offset=2 (i32.const 1) (i32.const 0x7fa00000)))
  22. (func (export "reset2") (i32.store offset=2 (i32.const 1) (i32.const 0)))
  23. )
  24. ;;(assert_return (invoke "i32.load") (i32.const 0x7fa00000))
  25. ;;(assert_return (invoke "f32.load") (f32.const nan:0x200000))
  26. ;;(invoke "reset")
  27. ;;(assert_return (invoke "i32.load") (i32.const 0x0))
  28. ;;(assert_return (invoke "f32.load") (f32.const 0.0))
  29. ;;(invoke "f32.store")
  30. ;;(assert_return (invoke "i32.load") (i32.const 0x7fa00000))
  31. ;;(assert_return (invoke "f32.load") (f32.const nan:0x200000))
  32. ;;(invoke "reset")
  33. ;;(assert_return (invoke "i32.load") (i32.const 0x0))
  34. ;;(assert_return (invoke "f32.load") (f32.const 0.0))
  35. ;;(invoke "i32.store")
  36. ;;(assert_return (invoke "i32.load") (i32.const 0x7fa00000))
  37. ;;(assert_return (invoke "f32.load") (f32.const nan:0x200000))