diff options
| author | Prashanth Mundkur | 2018-02-01 09:50:58 -0800 |
|---|---|---|
| committer | Prashanth Mundkur | 2018-02-01 10:08:18 -0800 |
| commit | 70bb3838838a222dd008a443bd941d5487fe20c7 (patch) | |
| tree | 08b7ccd17f2d4c2652fcf21569c3ba51cf7ad1e2 /riscv | |
| parent | c815ede7a5a311f85b05b9b597fd23765c7b0156 (diff) | |
Use the recursive execute for c.addi4spn.
Conversations with Alexandre/Jon indicate that a BSV generator
should be able to deal with this recursion, and Thomas has
fixed the Lem generator.
Diffstat (limited to 'riscv')
| -rw-r--r-- | riscv/riscv.sail | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/riscv/riscv.sail b/riscv/riscv.sail index b730a347..1eb87adf 100644 --- a/riscv/riscv.sail +++ b/riscv/riscv.sail @@ -549,19 +549,7 @@ function clause decodeCompressed (0b000 @ function clause execute (C_ADDI4SPN(rdc, nzimm)) = { let imm : bits(12) = (0b00 @ nzimm @ 0b00) in let rd : regbits = 0b01 @ rdc in - /* Ideally, we could just do this here: - execute(ITYPE(imm, sp, rd, RISCV_ADDI)) - But this recursive call is problematic: - - it currently breaks the generated lem, since recursive execute - is not supported - - it might create issues for hardware generation for a BSV generator. - Once those are resolved, we could use the recursive call. For - now, the ADDI implementation is inlined. - */ - let sp_val = rGPR(sp) in - let imm64 : bits(64) = EXTS(imm) in - let result = sp_val + imm64 in - wGPR(rd, result) + execute(ITYPE(imm, sp, rd, RISCV_ADDI)) } /* ****************************************************************** */ |
