summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--risc-v/hgen/parser.hgen6
1 files changed, 6 insertions, 0 deletions
diff --git a/risc-v/hgen/parser.hgen b/risc-v/hgen/parser.hgen
index 4440ffda..dc61e566 100644
--- a/risc-v/hgen/parser.hgen
+++ b/risc-v/hgen/parser.hgen
@@ -38,7 +38,13 @@
{ `RISCVFENCEI }
| LOADRES reg COMMA LPAR reg RPAR
{ `RISCVLoadRes($1.aq, $1.rl, $5, $1.width, $2) }
+| LOADRES reg COMMA NUM LPAR reg RPAR
+ { if $4 <> 0 then failwith "'lr' offset must be 0" else
+ `RISCVLoadRes($1.aq, $1.rl, $6, $1.width, $2) }
| STORECON reg COMMA reg COMMA LPAR reg RPAR
{ `RISCVStoreCon($1.aq, $1.rl, $4, $7, $1.width, $2) }
+| STORECON reg COMMA reg COMMA NUM LPAR reg RPAR
+ { if $6 <> 0 then failwith "'sc' offset must be 0" else
+ `RISCVStoreCon($1.aq, $1.rl, $4, $8, $1.width, $2) }
| AMO reg COMMA reg COMMA LPAR reg RPAR
{ `RISCVAMO($1.op, $1.aq, $1.rl, $4, $7, $1.width, $2) }