Skip to content

Commit

Permalink
Fix mmio example
Browse files Browse the repository at this point in the history
This updates the MMIO example by adding missing constants, such that it
now compiles.  This further enables the mmio trace tests.
  • Loading branch information
DavePearce committed Dec 21, 2024
1 parent ec0b5a4 commit 7de551d
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/test/valid_corset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -818,10 +818,10 @@ func TestSlow_Stp(t *testing.T) {
Check(t, true, "stp")
}

/* func TestSlow_Mmio(t *testing.T) {
func TestSlow_Mmio(t *testing.T) {
Check(t, true, "mmio")
}
*/

// ===================================================================
// Test Helpers
// ===================================================================
Expand Down
100 changes: 100 additions & 0 deletions testdata/mmio.accepts

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions testdata/mmio.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,38 @@
TLO TARGET_LIMB_OFFSET
TBO TARGET_BYTE_OFFSET)

(defconst
LLARGE 16
LLARGEMO (- LLARGE 1)
;;
EXO_SUM_INDEX_ROM 0
EXO_SUM_INDEX_KEC 1
EXO_SUM_INDEX_LOG 2
EXO_SUM_INDEX_TXCD 3
EXO_SUM_INDEX_ECDATA 4
EXO_SUM_INDEX_RIPSHA 5
EXO_SUM_INDEX_BLAKEMODEXP 6
EXO_SUM_WEIGHT_ROM (^ 2 EXO_SUM_INDEX_ROM)
EXO_SUM_WEIGHT_KEC (^ 2 EXO_SUM_INDEX_KEC)
EXO_SUM_WEIGHT_LOG (^ 2 EXO_SUM_INDEX_LOG)
EXO_SUM_WEIGHT_TXCD (^ 2 EXO_SUM_INDEX_TXCD)
EXO_SUM_WEIGHT_ECDATA (^ 2 EXO_SUM_INDEX_ECDATA)
EXO_SUM_WEIGHT_RIPSHA (^ 2 EXO_SUM_INDEX_RIPSHA)
EXO_SUM_WEIGHT_BLAKEMODEXP (^ 2 EXO_SUM_INDEX_BLAKEMODEXP)
;;
MMIO_INST_LIMB_VANISHES 0xfe01
MMIO_INST_LIMB_TO_RAM_TRANSPLANT 0xfe11
MMIO_INST_LIMB_TO_RAM_ONE_TARGET 0xfe12
MMIO_INST_LIMB_TO_RAM_TWO_TARGET 0xfe13
MMIO_INST_RAM_TO_LIMB_TRANSPLANT 0xfe21
MMIO_INST_RAM_TO_LIMB_ONE_SOURCE 0xfe22
MMIO_INST_RAM_TO_LIMB_TWO_SOURCE 0xfe23
MMIO_INST_RAM_TO_RAM_TRANSPLANT 0xfe31
MMIO_INST_RAM_TO_RAM_PARTIAL 0xfe32
MMIO_INST_RAM_TO_RAM_TWO_TARGET 0xfe33
MMIO_INST_RAM_TO_RAM_TWO_SOURCE 0xfe34
MMIO_INST_RAM_EXCISION 0xfe41
MMIO_INST_RAM_VANISHES 0xfe42)

(module mmio)

Expand Down

0 comments on commit 7de551d

Please sign in to comment.