fcvtzu_float_fix.xml */
| 7647 | |
| 7648 | /* fcvtzu_float_fix.xml */ |
| 7649 | int FCVTZU_float_fix(context *ctx, Instruction *instr) |
| 7650 | { |
| 7651 | int rc = DECODE_STATUS_UNMATCHED; |
| 7652 | /* class iclass_float */ |
| 7653 | /* sf=x|0|S=0|11110|ftype=xx|0|rmode=11|opcode=001|scale=xxxxxx|Rn=xxxxx|Rd=xxxxx */ |
| 7654 | if((INSWORD & 0x7F3F0000)==0x1E190000) { |
| 7655 | decode_fields32(ENC_FCVTZU_32H_FLOAT2FIX, ctx, instr); |
| 7656 | ctx->d = UINT(ctx->Rd); |
| 7657 | ctx->n = UINT(ctx->Rn); |
| 7658 | ctx->intsize = (ctx->sf==1) ? 0x40 : 0x20; |
| 7659 | if(!ctx->ftype) { |
| 7660 | ctx->fltsize = 0x20; |
| 7661 | } |
| 7662 | else if(ctx->ftype==1) { |
| 7663 | ctx->fltsize = 0x40; |
| 7664 | } |
| 7665 | else if(ctx->ftype==2) { |
| 7666 | UNDEFINED; |
| 7667 | } |
| 7668 | else if(ctx->ftype==3) { |
| 7669 | if(HaveFP16Ext()) { |
| 7670 | ctx->fltsize = 0x10; |
| 7671 | } |
| 7672 | else { |
| 7673 | UNDEFINED; |
| 7674 | } |
| 7675 | } |
| 7676 | if(ctx->sf==0 && SLICE(ctx->scale,5,5)==0) { |
| 7677 | UNDEFINED; |
| 7678 | } |
| 7679 | ctx->fracbits = 0x40-UINT(ctx->scale); |
| 7680 | if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==3) { |
| 7681 | ctx->rounding = FPRounding_ZERO; |
| 7682 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 7683 | ctx->op = FPConvOp_CVT_FtoI; |
| 7684 | } |
| 7685 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==4) { |
| 7686 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 7687 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 7688 | ctx->op = FPConvOp_CVT_ItoF; |
| 7689 | } |
| 7690 | else { |
| 7691 | UNDEFINED; |
| 7692 | } |
| 7693 | if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTZU_32H_FLOAT2FIX); |
| 7694 | if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTZU_64H_FLOAT2FIX); |
| 7695 | if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTZU_32S_FLOAT2FIX); |
| 7696 | if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTZU_64S_FLOAT2FIX); |
| 7697 | if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTZU_32D_FLOAT2FIX); |
| 7698 | if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTZU_64D_FLOAT2FIX); |
| 7699 | } |
| 7700 | return rc; |
| 7701 | } |
| 7702 | |
| 7703 | /* fcvtzu_float_int.xml */ |
| 7704 | int FCVTZU_float_int(context *ctx, Instruction *instr) |
no test coverage detected