We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
array.new_data
1 parent 4c10619 commit f846dd1Copy full SHA for f846dd1
test/core/gc/array_new_data.wast
@@ -51,3 +51,18 @@
51
52
;; Data segments are interpreted as little-endian.
53
(assert_return (invoke "array-new-data-little-endian") (i32.const 0xddccbbaa))
54
+
55
+(module
56
+ (type $arr (array (mut i16)))
57
58
+ (data $d "\00\11\22")
59
60
+ (func (export "array-new-data-unaligned") (result i32)
61
+ (array.get_u $arr
62
+ (array.new_data $arr $d (i32.const 1) (i32.const 1))
63
+ (i32.const 0))
64
+ )
65
+)
66
67
+;; Data inside the segment doesn't need to be aligned to the element size.
68
+(assert_return (invoke "array-new-data-unaligned") (i32.const 0x2211))
0 commit comments