riscv-p-spec icon indicating copy to clipboard operation
riscv-p-spec copied to clipboard

Undefined signedness of operations

Open mkostal-codasip opened this issue 5 years ago • 2 comments

The specification at the beggining introduces signed and unsigned multiplication. But only a few of the instruction definitions use specifically signed or unsigned multiplication. For some cases that is not a big issue, because from the C-function, we can see, whether the operans are signed or unsigned, but for instructions such as MSUBR32, MADDR32 missing the information can lead to different results.

The definition of these instructions states: The contents of Rs1 and Rs2 can be either signed or unsigned integers. In this case the signedness of a number has a mutually exclusive nature, since from the pseodocode definition we can observe, that signedness can produce different results.

Can the devs tell, what is the intended signedness of instructions MSUBR32, MADDR32

mkostal-codasip avatar Nov 18 '20 08:11 mkostal-codasip

Hi,

Is this issue got resolved or not?

lazyparser avatar Jan 16 '21 00:01 lazyparser

@mkostal-codasip Can you give an example for msubr32/maddr32 where the signedness of the source operands can produce different results? We thought that the signedness of the source operands will not affect the end result. We could be wrong. Thanks.

chuanhua avatar Oct 05 '21 05:10 chuanhua