Actions
Bug #9398
closedНекорректная спецификация с использованием версии ревизий
Start date:
11/26/2018
Due date:
% Done:
0%
Estimated time:
Detected in build:
svn
Platform:
Published in build:
Description
Очень плохой вариант:
op slli(rd: X, rs1: X, imm: card(SHLEN)) syntax = format("slli %s, %s, 0x%x", rd.syntax, rs1.syntax, imm) image = format("000000%1s%5s%s001%s0010011", if SHLEN == 6 then imm<5> else coerce(BIT, 0) endif, if SHLEN == 5 then imm else imm<4..0> endif, rs1.image, rd.image ) action = { rd = rs1 << imm; }
Бит imm<5> для 32х битной версии не существует, а в коде есть.
Updated by Alexander Protsenko over 5 years ago
Правильная версия:
op slli(rd: X, rs1: X, imm: card(SHLEN)) syntax = format("slli %s, %s, 0x%x", rd.syntax, rs1.syntax, imm) @rev(RV64I) image = format("000000%1s%5s%s001%s0010011", imm<5>, imm<4..0>, rs1.image, rd.image) #ifndef RV64I @rev(RV32I) image = format("000000%1s%5s%s001%s0010011", coerce(BIT, 0), imm<4..0>, rs1.image, rd.image) #endif action = { rd = rs1 << imm; }
Updated by Alexander Protsenko over 5 years ago
- Status changed from Open to Resolved
Updated by Alexander Protsenko over 5 years ago
- Status changed from Resolved to Closed
Actions