On 3/14/20 2:15 AM, LIU Zhiwei wrote:
>>> +static uint64_t fclass_d(uint64_t frs1, float_status *s)
>>> +{
>>> + float64 f = frs1;
>>> + bool sign = float64_is_neg(f);
>>> +
>>> + if (float64_is_infinity(f)) {
>>> + return sign ? 1 << 0 : 1 << 7;
>>> + } else if
On 2020/3/14 17:10, Richard Henderson wrote:
On 3/12/20 7:58 AM, LIU Zhiwei wrote:
+/* Vector Floating-Point Classify Instruction */
+static uint16_t fclass_f16(uint16_t frs1, float_status *s)
+{
+float16 f = frs1;
+bool sign = float16_is_neg(f);
+
+if (float16_is_infinity(f)) {
On 3/12/20 7:58 AM, LIU Zhiwei wrote:
> +/* Vector Floating-Point Classify Instruction */
> +static uint16_t fclass_f16(uint16_t frs1, float_status *s)
> +{
> +float16 f = frs1;
> +bool sign = float16_is_neg(f);
> +
> +if (float16_is_infinity(f)) {
> +return sign ? 1 << 0 : 1
Signed-off-by: LIU Zhiwei
---
target/riscv/helper.h | 4 ++
target/riscv/insn32.decode | 1 +
target/riscv/insn_trans/trans_rvv.inc.c | 3 ++
target/riscv/vector_helper.c| 62 +
4 files changed, 70 insertions(+)
diff --git