diff options
| author | Alasdair Armstrong | 2019-01-11 21:00:36 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2019-01-11 21:00:36 +0000 |
| commit | 9cfa575245a0427a0d35504086de182bd80b7df8 (patch) | |
| tree | 8ac466188cfad342a35afb1557110a6ee882baaa /src/parser.mly | |
| parent | 05e6058795e71cf1543e282752cbf95e471894cc (diff) | |
Updates for sail-arm release
We want to ensure that no_devices.sail and devices.sail have the same
effect footprint, because with a snapshot-type release in sail-arm, we
can't rebuild the spec with asl_to_sail every time we switch from
running elf binaries to booting OS's. This commit allows registers to
have arbitrary effects, so registers that are really representing
memory-mapped devices don't have to have the wmem/rmem effect.
Diffstat (limited to 'src/parser.mly')
| -rw-r--r-- | src/parser.mly | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parser.mly b/src/parser.mly index 3b42d498..68720048 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -1362,7 +1362,11 @@ val_spec_def: register_def: | Register id Colon typ - { mk_reg_dec (DEC_reg ($4, $2)) $startpos $endpos } + { let rreg = mk_typ (ATyp_set [mk_effect BE_rreg $startpos($1) $endpos($1)]) $startpos($1) $endpos($1) in + let wreg = mk_typ (ATyp_set [mk_effect BE_wreg $startpos($1) $endpos($1)]) $startpos($1) $endpos($1) in + mk_reg_dec (DEC_reg (rreg, wreg, $4, $2)) $startpos $endpos } + | Register effect_set effect_set id Colon typ + { mk_reg_dec (DEC_reg ($2, $3, $6, $4)) $startpos $endpos } | Register Configuration id Colon typ Eq exp { mk_reg_dec (DEC_config ($3, $5, $7)) $startpos $endpos } |
