You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: document/core/exec/instructions.rst
+29-37Lines changed: 29 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1341,47 +1341,43 @@ Where:
1341
1341
1342
1342
19. Assert: due to :ref:`validation <valid-array.init_data>`, the :ref:`array instance <syntax-arrayinst>` :math:`S.\SARRAYS[a]` exists.
1343
1343
1344
-
20. If :math:`d + n` is larger than or equal to the length of :math:`S.\SARRAYS[a].\AIFIELDS`, then:
1344
+
20. Assert: due to :ref:`validation <valid-array.init_data>`, the :ref:`field type <syntax-fieldtype>` :math:`\X{ft}` has a defined :ref:`bit width <bitwidth-fieldtype>`.
1345
1345
1346
-
a. Trap.
1347
-
1348
-
21. Assert: due to :ref:`validation <valid-array.init_data>`, the :ref:`field type <syntax-fieldtype>` :math:`\X{ft}` has a defined :ref:`bit width <bitwidth-fieldtype>`.
1346
+
21. Let :math:`z` be the :ref:`bit width <bitwidth-fieldtype>` of :ref:`field type <syntax-fieldtype>` :math:`\X{ft}` divided by eight.
1349
1347
1350
-
22. Let :math:`z` be the :ref:`bit width <bitwidth-fieldtype>` of :ref:`field type <syntax-fieldtype>` :math:`\X{ft}` divided by eight.
1351
-
1352
-
23. If the sum of :math:`s` and :math:`n` times :math:`z` is larger than the length of :math:`\datainst.\DIDATA`, then:
1348
+
22. If :math:`d + n` is larger than the length of :math:`S.\SARRAYS[a].\AIFIELDS`, or the sum of :math:`s` and :math:`n` times :math:`z` is larger than the length of :math:`\datainst.\DIDATA`, then:
1353
1349
1354
1350
a. Trap.
1355
1351
1356
-
24. If :math:`n = 0`, then:
1352
+
23. If :math:`n = 0`, then:
1357
1353
1358
1354
a. Return.
1359
1355
1360
-
25. Let :math:`b^\ast` be the :ref:`byte <syntax-byte>` sequence :math:`\datainst.\DIDATA[s \slice z]`.
1356
+
24. Let :math:`b^\ast` be the :ref:`byte <syntax-byte>` sequence :math:`\datainst.\DIDATA[s \slice z]`.
1361
1357
1362
-
26. Let :math:`t` be the :ref:`value type <syntax-valtype>` :math:`\unpacktype(\X{ft})`.
1358
+
25. Let :math:`t` be the :ref:`value type <syntax-valtype>` :math:`\unpacktype(\X{ft})`.
1363
1359
1364
-
27. Assert: due to :ref:`validation <valid-array.init_data>`, :math:`\bytes_{\X{ft}}` is defined.
1360
+
26. Assert: due to :ref:`validation <valid-array.init_data>`, :math:`\bytes_{\X{ft}}` is defined.
1365
1361
1366
-
28. Let :math:`c` be the constant for which :math:`\bytes_{\X{ft}}(c)` is :math:`b^\ast`.
1362
+
27. Let :math:`c` be the constant for which :math:`\bytes_{\X{ft}}(c)` is :math:`b^\ast`.
1367
1363
1368
-
29. Push the value :math:`\REFARRAYADDR~a` to the stack.
1364
+
28. Push the value :math:`\REFARRAYADDR~a` to the stack.
1369
1365
1370
-
30. Push the value :math:`\I32.\CONST~d` to the stack.
1366
+
29. Push the value :math:`\I32.\CONST~d` to the stack.
1371
1367
1372
-
31. Push the value :math:`t.\CONST~c` to the stack.
1368
+
30. Push the value :math:`t.\CONST~c` to the stack.
1373
1369
1374
-
32. Execute the instruction :math:`\ARRAYSET~x`.
1370
+
31. Execute the instruction :math:`\ARRAYSET~x`.
1375
1371
1376
-
33. Push the value :math:`\REFARRAYADDR~a` to the stack.
1372
+
32. Push the value :math:`\REFARRAYADDR~a` to the stack.
1377
1373
1378
-
34. Push the value :math:`\I32.\CONST~(d+1)` to the stack.
1374
+
33. Push the value :math:`\I32.\CONST~(d+1)` to the stack.
1379
1375
1380
-
35. Push the value :math:`\I32.\CONST~(s+z)` to the stack.
1376
+
34. Push the value :math:`\I32.\CONST~(s+z)` to the stack.
1381
1377
1382
-
36. Push the value :math:`\I32.\CONST~(n-1)` to the stack.
1378
+
35. Push the value :math:`\I32.\CONST~(n-1)` to the stack.
1383
1379
1384
-
37. Execute the instruction :math:`\ARRAYINITDATA~x~y`.
1380
+
36. Execute the instruction :math:`\ARRAYINITDATA~x~y`.
1385
1381
1386
1382
.. math::
1387
1383
~\\[-1ex]
@@ -1462,37 +1458,33 @@ Where:
1462
1458
1463
1459
19. Assert: due to :ref:`validation <valid-array.init_elem>`, the :ref:`array instance <syntax-arrayinst>` :math:`S.\SARRAYS[a]` exists.
1464
1460
1465
-
20. If :math:`d + n` is larger than or equal to the length of :math:`S.\SARRAYS[a].\AIFIELDS`, then:
1461
+
20. If :math:`d + n` is larger than the length of :math:`S.\SARRAYS[a].\AIFIELDS`, or :math:`s + n` is larger than the length of :math:`\eleminst.\EIELEM`, then:
1466
1462
1467
1463
a. Trap.
1468
1464
1469
-
21. If :math:`s + n` is larger than or equal to the length of :math:`\eleminst.\EIELEM`, then:
1470
-
1471
-
a. Trap.
1472
-
1473
-
22. If :math:`n = 0`, then:
1465
+
21. If :math:`n = 0`, then:
1474
1466
1475
1467
a. Return.
1476
1468
1477
-
23. Let :math:`\reff'` be the :ref:`reference value <syntax-ref>` :math:`\eleminst.\EIELEM[s]`.
1469
+
22. Let :math:`\reff'` be the :ref:`reference value <syntax-ref>` :math:`\eleminst.\EIELEM[s]`.
1478
1470
1479
-
24. Push the value :math:`\REFARRAYADDR~a` to the stack.
1471
+
23. Push the value :math:`\REFARRAYADDR~a` to the stack.
1480
1472
1481
-
25. Push the value :math:`\I32.\CONST~d` to the stack.
1473
+
24. Push the value :math:`\I32.\CONST~d` to the stack.
1482
1474
1483
-
26. Push the value :math:`\reff'` to the stack.
1475
+
25. Push the value :math:`\reff'` to the stack.
1484
1476
1485
-
27. Execute the instruction :math:`\ARRAYSET~x`.
1477
+
26. Execute the instruction :math:`\ARRAYSET~x`.
1486
1478
1487
-
28. Push the value :math:`\REFARRAYADDR~a` to the stack.
1479
+
27. Push the value :math:`\REFARRAYADDR~a` to the stack.
1488
1480
1489
-
29. Push the value :math:`\I32.\CONST~(d+1)` to the stack.
1481
+
28. Push the value :math:`\I32.\CONST~(d+1)` to the stack.
1490
1482
1491
-
30. Push the value :math:`\I32.\CONST~(s+1)` to the stack.
1483
+
29. Push the value :math:`\I32.\CONST~(s+1)` to the stack.
1492
1484
1493
-
31. Push the value :math:`\I32.\CONST~(n-1)` to the stack.
1485
+
30. Push the value :math:`\I32.\CONST~(n-1)` to the stack.
1494
1486
1495
-
32. Execute the instruction :math:`\ARRAYINITELEM~x~y`.
1487
+
31. Execute the instruction :math:`\ARRAYINITELEM~x~y`.
0 commit comments