Project

General

Profile

Bug #9471

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

Added by Alexander Protsenko over 1 year ago. Updated 9 months 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>;

History

#1

Updated by Alexander Kamkin 12 months ago

  • Target version set to 2.4
  • Description updated (diff)
#2

Updated by Alexander Kamkin 9 months ago

  • Target version changed from 2.4 to 2.5

Also available in: Atom PDF