diff options
| author | Robert Norton | 2018-02-22 17:23:48 +0000 |
|---|---|---|
| committer | Robert Norton | 2018-02-22 17:23:48 +0000 |
| commit | bac62a260ce9aa8f83bb71515daf1829133b0127 (patch) | |
| tree | 03b24eea504d09dc6fa3267fc9740aef6b66e446 /test/ocaml | |
| parent | 5308167903db5e81c07a5aff9f20c83f33afcb9c (diff) | |
| parent | c63741a21b5a1f77f85987f15f6aac3321a91f0a (diff) | |
Merge branch 'sail2' of github.com:rems-project/sail into sail2
Diffstat (limited to 'test/ocaml')
| -rw-r--r-- | test/ocaml/bitfield/bitfield.sail | 9 | ||||
| -rw-r--r-- | test/ocaml/bitfield/expect | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/test/ocaml/bitfield/bitfield.sail b/test/ocaml/bitfield/bitfield.sail index 5a70d52e..2a53ab3c 100644 --- a/test/ocaml/bitfield/bitfield.sail +++ b/test/ocaml/bitfield/bitfield.sail @@ -12,7 +12,8 @@ bitfield cr : bits(8) = { register CR : cr bitfield dr : vector(4, inc, bit) = { - DR0 : 2 .. 3 + DR0 : 2 .. 3, + LT : 2 } register DR : dr @@ -28,5 +29,9 @@ function main () = { print_bits("CR.CR0: ", CR.CR0()); print_bits("CR: ", CR.bits()); CR->CR3() = 0b0; - print_bits("CR: ", CR.bits()) + print_bits("CR: ", CR.bits()); + CR = update_CR1(CR, 0b11); + print_bits("CR.CR1: ", CR.CR1()); + CR = update_CR1(CR, 0b01); + print_bits("CR.CR1: ", CR.CR1()); } diff --git a/test/ocaml/bitfield/expect b/test/ocaml/bitfield/expect index 63247dfd..e6e5a618 100644 --- a/test/ocaml/bitfield/expect +++ b/test/ocaml/bitfield/expect @@ -3,3 +3,5 @@ CR: 0x0F CR.CR0: 0x8 CR: 0x8F CR: 0x8E +CR.CR1: 0b11 +CR.CR1: 0b01 |
