fcvtzs_float_int.xml */
| 7446 | |
| 7447 | /* fcvtzs_float_int.xml */ |
| 7448 | int FCVTZS_float_int(context *ctx, Instruction *instr) |
| 7449 | { |
| 7450 | int rc = DECODE_STATUS_UNMATCHED; |
| 7451 | /* class iclass_float */ |
| 7452 | /* sf=x|0|S=0|11110|ftype=xx|1|rmode=11|opcode=000|000000|Rn=xxxxx|Rd=xxxxx */ |
| 7453 | if((INSWORD & 0x7F3FFC00)==0x1E380000) { |
| 7454 | decode_fields32(ENC_FCVTZS_32H_FLOAT2INT, ctx, instr); |
| 7455 | ctx->d = UINT(ctx->Rd); |
| 7456 | ctx->n = UINT(ctx->Rn); |
| 7457 | ctx->intsize = (ctx->sf==1) ? 0x40 : 0x20; |
| 7458 | if(!ctx->ftype) { |
| 7459 | ctx->fltsize = 0x20; |
| 7460 | } |
| 7461 | else if(ctx->ftype==1) { |
| 7462 | ctx->fltsize = 0x40; |
| 7463 | } |
| 7464 | else if(ctx->ftype==2) { |
| 7465 | if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)!=13) { |
| 7466 | UNDEFINED; |
| 7467 | } |
| 7468 | ctx->fltsize = 0x80; |
| 7469 | } |
| 7470 | else if(ctx->ftype==3) { |
| 7471 | if(HaveFP16Ext()) { |
| 7472 | ctx->fltsize = 0x10; |
| 7473 | } |
| 7474 | else { |
| 7475 | UNDEFINED; |
| 7476 | } |
| 7477 | } |
| 7478 | if(!(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)&12)) { |
| 7479 | ctx->rounding = FPDecodeRounding(ctx->rmode); |
| 7480 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 7481 | ctx->op = FPConvOp_CVT_FtoI; |
| 7482 | } |
| 7483 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==4) { |
| 7484 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 7485 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 7486 | ctx->op = FPConvOp_CVT_ItoF; |
| 7487 | } |
| 7488 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==8) { |
| 7489 | ctx->rounding = FPRounding_TIEAWAY; |
| 7490 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 7491 | ctx->op = FPConvOp_CVT_FtoI; |
| 7492 | } |
| 7493 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==12) { |
| 7494 | if(ctx->fltsize!=0x10 && ctx->fltsize!=ctx->intsize) { |
| 7495 | UNDEFINED; |
| 7496 | } |
| 7497 | if(SLICE(ctx->opcode,0,0)==1) { |
| 7498 | ctx->op = FPConvOp_MOV_ItoF; |
| 7499 | }; |
| 7500 | ctx->part = 0; |
| 7501 | } |
| 7502 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==13) { |
| 7503 | if(ctx->intsize!=0x40 || ctx->fltsize!=0x80) { |
| 7504 | UNDEFINED; |
| 7505 | } |
no test coverage detected