diff options
| author | Shaked Flur | 2017-09-02 10:23:33 +0100 |
|---|---|---|
| committer | Shaked Flur | 2017-09-02 10:23:33 +0100 |
| commit | 69dbe323ef6a8195465e2662fd447e1853e40866 (patch) | |
| tree | b0f1f90bbfa02628ebc90535a3a6039b387a94f5 /risc-v | |
| parent | 016cb11c78f84d02b40988958098b464dffc0f26 (diff) | |
fix for parsing diy generated tests
Diffstat (limited to 'risc-v')
| -rw-r--r-- | risc-v/hgen/parser.hgen | 6 |
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) } |
