diff options
| author | Alasdair Armstrong | 2018-02-21 14:47:37 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-02-21 14:48:36 +0000 |
| commit | 0c9960e4efb510bea03906a528ac4cf57263dbf5 (patch) | |
| tree | 2a29c319fcc06e70489e1de73de5655c33883b2f /test | |
| parent | 08e204f609b6d894f645bccd95c8af9583bf239c (diff) | |
Create an update_field function for each field in a bitfield definition
Diffstat (limited to 'test')
| -rw-r--r-- | test/ocaml/bitfield/bitfield.sail | 6 | ||||
| -rw-r--r-- | test/ocaml/bitfield/expect | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/test/ocaml/bitfield/bitfield.sail b/test/ocaml/bitfield/bitfield.sail index 57629cf0..2a53ab3c 100644 --- a/test/ocaml/bitfield/bitfield.sail +++ b/test/ocaml/bitfield/bitfield.sail @@ -29,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 |
