fcvtzs_float_fix.xml */
| 7391 | |
| 7392 | /* fcvtzs_float_fix.xml */ |
| 7393 | int FCVTZS_float_fix(context *ctx, Instruction *instr) |
| 7394 | { |
| 7395 | int rc = DECODE_STATUS_UNMATCHED; |
| 7396 | /* class iclass_float */ |
| 7397 | /* sf=x|0|S=0|11110|ftype=xx|0|rmode=11|opcode=000|scale=xxxxxx|Rn=xxxxx|Rd=xxxxx */ |
| 7398 | if((INSWORD & 0x7F3F0000)==0x1E180000) { |
| 7399 | decode_fields32(ENC_FCVTZS_32H_FLOAT2FIX, ctx, instr); |
| 7400 | ctx->d = UINT(ctx->Rd); |
| 7401 | ctx->n = UINT(ctx->Rn); |
| 7402 | ctx->intsize = (ctx->sf==1) ? 0x40 : 0x20; |
| 7403 | if(!ctx->ftype) { |
| 7404 | ctx->fltsize = 0x20; |
| 7405 | } |
| 7406 | else if(ctx->ftype==1) { |
| 7407 | ctx->fltsize = 0x40; |
| 7408 | } |
| 7409 | else if(ctx->ftype==2) { |
| 7410 | UNDEFINED; |
| 7411 | } |
| 7412 | else if(ctx->ftype==3) { |
| 7413 | if(HaveFP16Ext()) { |
| 7414 | ctx->fltsize = 0x10; |
| 7415 | } |
| 7416 | else { |
| 7417 | UNDEFINED; |
| 7418 | } |
| 7419 | } |
| 7420 | if(ctx->sf==0 && SLICE(ctx->scale,5,5)==0) { |
| 7421 | UNDEFINED; |
| 7422 | } |
| 7423 | ctx->fracbits = 0x40-UINT(ctx->scale); |
| 7424 | if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==3) { |
| 7425 | ctx->rounding = FPRounding_ZERO; |
| 7426 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 7427 | ctx->op = FPConvOp_CVT_FtoI; |
| 7428 | } |
| 7429 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==4) { |
| 7430 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 7431 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 7432 | ctx->op = FPConvOp_CVT_ItoF; |
| 7433 | } |
| 7434 | else { |
| 7435 | UNDEFINED; |
| 7436 | } |
| 7437 | if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTZS_32H_FLOAT2FIX); |
| 7438 | if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTZS_64H_FLOAT2FIX); |
| 7439 | if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTZS_32S_FLOAT2FIX); |
| 7440 | if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTZS_64S_FLOAT2FIX); |
| 7441 | if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTZS_32D_FLOAT2FIX); |
| 7442 | if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTZS_64D_FLOAT2FIX); |
| 7443 | } |
| 7444 | return rc; |
| 7445 | } |
| 7446 | |
| 7447 | /* fcvtzs_float_int.xml */ |
| 7448 | int FCVTZS_float_int(context *ctx, Instruction *instr) |
no test coverage detected