Re: [PATCH v5 39/60] target/riscv: vector floating-point classify instructions

2020-03-14 Thread Richard Henderson
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

Re: [PATCH v5 39/60] target/riscv: vector floating-point classify instructions

2020-03-14 Thread LIU Zhiwei
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)) {

Re: [PATCH v5 39/60] target/riscv: vector floating-point classify instructions

2020-03-14 Thread Richard Henderson
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

[PATCH v5 39/60] target/riscv: vector floating-point classify instructions

2020-03-12 Thread LIU Zhiwei
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