Commit 7366156
committed
Add the fault check functionality related to pte value.
- add `check_fault` and `check_value` fields in `node` structure in `cycle.ml`,
,with default values being `None` for irrelevance. `check_fault` carries a boolean
and a string, that is, if the event should fault and a label for the instruction.
While `check_value` carries a boolean for if any memory effect check, i.e. read event,
should be check. This two new variables enable generating fault and value check when
there is previous change to pte or plain values respectively.
- Introduce `can_fault` function in `Pteval`, which currently check if `valid` is set,
i.e., being 1, in AArch64, while always returns `true` for other platform.
- Introduce FaultSet of element of an optional label string and a variable string.
This replace the StringSet used in the `final.ml` for printing the fault-related post-
condition such as `fault(P1:L02,y)`.
- Modify `AArch64Compile_gen.ml` for printing the label on load and store instruction,
when a fault check is needed.
Minor improvement:
- Merge the accumulators `cell` and `pte_cell` into CoSt `st` in cycle (`cycle.ml`) building,
functions `do_set_write_v` and `do_set_read_v`.
- Replace a few manual list foldings with a `List.fold_left`.
- Add some explanatory comments on some single-latter variables.1 parent 7ae3e96 commit 7366156
7 files changed
Lines changed: 438 additions & 294 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
591 | 596 | | |
592 | 597 | | |
593 | 598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1725 | 1725 | | |
1726 | 1726 | | |
1727 | 1727 | | |
1728 | | - | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
1729 | 1741 | | |
1730 | 1742 | | |
1731 | 1743 | | |
| |||
1759 | 1771 | | |
1760 | 1772 | | |
1761 | 1773 | | |
1762 | | - | |
| 1774 | + | |
1763 | 1775 | | |
1764 | 1776 | | |
1765 | 1777 | | |
1766 | 1778 | | |
1767 | | - | |
| 1779 | + | |
1768 | 1780 | | |
1769 | 1781 | | |
1770 | 1782 | | |
| |||
1780 | 1792 | | |
1781 | 1793 | | |
1782 | 1794 | | |
1783 | | - | |
| 1795 | + | |
1784 | 1796 | | |
1785 | 1797 | | |
1786 | 1798 | | |
| |||
1929 | 1941 | | |
1930 | 1942 | | |
1931 | 1943 | | |
1932 | | - | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
1933 | 1948 | | |
1934 | 1949 | | |
1935 | 1950 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
184 | | - | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
0 commit comments