riscv / riscv-v-spec

Working draft of the proposed RISC-V V vector extension
https://jira.riscv.org/browse/RVG-122
Creative Commons Attribution 4.0 International
956 stars 271 forks source link

Question about Narrowing Floating-Point/Integer Type-Convert Instructions #899

Closed bhbruce closed 1 year ago

bhbruce commented 1 year ago

Do these instructions support float to uint16/int16 conversion?

Section 13.19 mentions that: A set of conversion instructions is provided to convert wider integer and floating-point datatypes to a type of half the width..

I suppose it supports float to uint16/int16 conversion. However, the example below doesn't mention it. So I would like to confirm whether these instructions support float to uint16/int16 conversion.

furuame commented 1 year ago

Yes I think so

WojciechMula commented 1 year ago

They support f32 -> i16 and also f16 -> i8. I don't see any restrictions in the spec.