Project

General

Profile

Actions

Bug #9471

open

ERROR (SEMANTIC): The given bitfield expressions cannot be reduced to constant value

Added by Alexander Protsenko almost 6 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Category:
nML Translator
Target version:
Start date:
02/01/2019
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

Ошибка:

riscv.nml 370:8 ERROR (SEMANTIC): "Unable to calculate bitfield size. The given bitfield expressions cannot be reduced to constant value." 
riscv.nml 370:8 ERROR (SEMANTIC): "Failed to recognize the grammar structure. It will be ignored: 'tmp_dword<63-tmp_bit_offset..0>'." 
riscv.nml 370:8 ERROR (SEMANTIC): "Failed to recognize the grammar structure. It will be ignored: 'tmp_dword<63-tmp_bit_offset..0>'." 
riscv.nml 370:42 ERROR (SEMANTIC): "Failed to recognize the grammar structure. It will be ignored: 'tmp_dword<63-tmp_bit_offset..0>=MEM[mem_index]<63..tmp_bit_offset>'." 
riscv.nml 370:42 ERROR (SEMANTIC): "Failed to recognize the grammar structure. It will be ignored: 'tmp_dword<63-tmp_bit_offset..0>=MEM[mem_index]<63..tmp_bit_offset>'." 

Неправильная версия:

        tmp_bit_offset = zero_extend(card(6), tmp_address_op<2..0>) * 8;
        tmp_dword<63 - tmp_bit_offset..0> = MEM[mem_index]<63..tmp_bit_offset>;
        tmp_dword<63..64 - tmp_bit_offset> = MEM[mem_index + 1]<tmp_bit_offset-1..0>;

Правильная версия:

        tmp_bit_offset = zero_extend(card(6), tmp_address_op<2..0>) * 8;
        tmp_qword = MEM[mem_index + 1]::MEM[mem_index];
        tmp_dword = tmp_qword<63+tmp_bit_offset..0+tmp_bit_offset>;

Actions

Also available in: Atom PDF