Project

General

Profile

Actions

Bug #9398

closed

Некорректная спецификация с использованием версии ревизий

Added by Alexander Protsenko over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
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х битной версии не существует, а в коде есть.

Actions

Also available in: Atom PDF