Skip to content

Commit e580f08

Browse files
committed
Test libc.
1 parent 9ea7099 commit e580f08

File tree

4 files changed

+300
-153
lines changed

4 files changed

+300
-153
lines changed

sqlite3/libc/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ EOF
2323
-mbulk-memory -mreference-types \
2424
-mnontrapping-fptoint -msign-ext \
2525
-fno-stack-protector -fno-stack-clash-protection \
26+
-Wl,-z,stack-size=1024 \
2627
-Wl,--stack-first \
2728
-Wl,--import-undefined \
2829
-Wl,--initial-memory=16777216 \

sqlite3/libc/libc.wasm

-48 Bytes
Binary file not shown.

sqlite3/libc/libc.wat

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
(type $2 (func (param i32) (result i32)))
55
(type $3 (func (param i32 i32 i32 i32)))
66
(memory $0 256)
7-
(data $0 (i32.const 65536) "\01")
7+
(data $0 (i32.const 1024) "\01")
88
(table $0 1 1 funcref)
99
(export "memory" (memory $0))
1010
(export "memset" (func $memset))
@@ -996,67 +996,67 @@
996996
)
997997
)
998998
(v128.store
999-
(i32.const 65792)
999+
(i32.const 1280)
10001000
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10011001
)
10021002
(v128.store
1003-
(i32.const 65776)
1003+
(i32.const 1264)
10041004
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10051005
)
10061006
(v128.store
1007-
(i32.const 65760)
1007+
(i32.const 1248)
10081008
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10091009
)
10101010
(v128.store
1011-
(i32.const 65744)
1011+
(i32.const 1232)
10121012
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10131013
)
10141014
(v128.store
1015-
(i32.const 65728)
1015+
(i32.const 1216)
10161016
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10171017
)
10181018
(v128.store
1019-
(i32.const 65712)
1019+
(i32.const 1200)
10201020
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10211021
)
10221022
(v128.store
1023-
(i32.const 65696)
1023+
(i32.const 1184)
10241024
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10251025
)
10261026
(v128.store
1027-
(i32.const 65680)
1027+
(i32.const 1168)
10281028
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10291029
)
10301030
(v128.store
1031-
(i32.const 65664)
1031+
(i32.const 1152)
10321032
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10331033
)
10341034
(v128.store
1035-
(i32.const 65648)
1035+
(i32.const 1136)
10361036
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10371037
)
10381038
(v128.store
1039-
(i32.const 65632)
1039+
(i32.const 1120)
10401040
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10411041
)
10421042
(v128.store
1043-
(i32.const 65616)
1043+
(i32.const 1104)
10441044
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10451045
)
10461046
(v128.store
1047-
(i32.const 65600)
1047+
(i32.const 1088)
10481048
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10491049
)
10501050
(v128.store
1051-
(i32.const 65584)
1051+
(i32.const 1072)
10521052
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10531053
)
10541054
(v128.store
1055-
(i32.const 65568)
1055+
(i32.const 1056)
10561056
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10571057
)
10581058
(v128.store
1059-
(i32.const 65552)
1059+
(i32.const 1040)
10601060
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
10611061
)
10621062
(local.set $1
@@ -1072,7 +1072,7 @@
10721072
(local.get $2)
10731073
(i32.const 255)
10741074
)
1075-
(i32.const 65552)
1075+
(i32.const 1040)
10761076
)
10771077
(i32.const 1)
10781078
)
@@ -1105,7 +1105,7 @@
11051105
(i32.load8_u
11061106
(local.get $2)
11071107
)
1108-
(i32.const 65552)
1108+
(i32.const 1040)
11091109
)
11101110
)
11111111
)
@@ -1117,7 +1117,7 @@
11171117
(i32.load8_u offset=1
11181118
(local.get $2)
11191119
)
1120-
(i32.const 65552)
1120+
(i32.const 1040)
11211121
)
11221122
)
11231123
)
@@ -1129,7 +1129,7 @@
11291129
(i32.load8_u offset=2
11301130
(local.get $2)
11311131
)
1132-
(i32.const 65552)
1132+
(i32.const 1040)
11331133
)
11341134
)
11351135
)
@@ -1151,7 +1151,7 @@
11511151
)
11521152
(local.get $scratch)
11531153
)
1154-
(i32.const 65552)
1154+
(i32.const 1040)
11551155
)
11561156
)
11571157
)
@@ -1214,67 +1214,67 @@
12141214
)
12151215
)
12161216
(v128.store
1217-
(i32.const 66048)
1217+
(i32.const 1536)
12181218
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12191219
)
12201220
(v128.store
1221-
(i32.const 66032)
1221+
(i32.const 1520)
12221222
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12231223
)
12241224
(v128.store
1225-
(i32.const 66016)
1225+
(i32.const 1504)
12261226
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12271227
)
12281228
(v128.store
1229-
(i32.const 66000)
1229+
(i32.const 1488)
12301230
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12311231
)
12321232
(v128.store
1233-
(i32.const 65984)
1233+
(i32.const 1472)
12341234
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12351235
)
12361236
(v128.store
1237-
(i32.const 65968)
1237+
(i32.const 1456)
12381238
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12391239
)
12401240
(v128.store
1241-
(i32.const 65952)
1241+
(i32.const 1440)
12421242
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12431243
)
12441244
(v128.store
1245-
(i32.const 65936)
1245+
(i32.const 1424)
12461246
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12471247
)
12481248
(v128.store
1249-
(i32.const 65920)
1249+
(i32.const 1408)
12501250
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12511251
)
12521252
(v128.store
1253-
(i32.const 65904)
1253+
(i32.const 1392)
12541254
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12551255
)
12561256
(v128.store
1257-
(i32.const 65888)
1257+
(i32.const 1376)
12581258
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12591259
)
12601260
(v128.store
1261-
(i32.const 65872)
1261+
(i32.const 1360)
12621262
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12631263
)
12641264
(v128.store
1265-
(i32.const 65856)
1265+
(i32.const 1344)
12661266
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12671267
)
12681268
(v128.store
1269-
(i32.const 65840)
1269+
(i32.const 1328)
12701270
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12711271
)
12721272
(v128.store
1273-
(i32.const 65824)
1273+
(i32.const 1312)
12741274
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12751275
)
12761276
(v128.store
1277-
(i32.const 65808)
1277+
(i32.const 1296)
12781278
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
12791279
)
12801280
(loop $label
@@ -1285,7 +1285,7 @@
12851285
(local.get $1)
12861286
)
12871287
)
1288-
(i32.const 65808)
1288+
(i32.const 1296)
12891289
)
12901290
(i32.const 1)
12911291
)
@@ -1309,7 +1309,7 @@
13091309
(i32.load8_u
13101310
(local.get $1)
13111311
)
1312-
(i32.const 65808)
1312+
(i32.const 1296)
13131313
)
13141314
)
13151315
)
@@ -1319,7 +1319,7 @@
13191319
(i32.load8_u offset=1
13201320
(local.get $1)
13211321
)
1322-
(i32.const 65808)
1322+
(i32.const 1296)
13231323
)
13241324
)
13251325
)
@@ -1329,7 +1329,7 @@
13291329
(i32.load8_u offset=2
13301330
(local.get $1)
13311331
)
1332-
(i32.const 65808)
1332+
(i32.const 1296)
13331333
)
13341334
)
13351335
)
@@ -1351,7 +1351,7 @@
13511351
)
13521352
(local.get $scratch)
13531353
)
1354-
(i32.const 65808)
1354+
(i32.const 1296)
13551355
)
13561356
)
13571357
)

0 commit comments

Comments
 (0)