fcvtmu_float.xml */
| 6518 | |
| 6519 | /* fcvtmu_float.xml */ |
| 6520 | int FCVTMU_float(context *ctx, Instruction *instr) |
| 6521 | { |
| 6522 | int rc = DECODE_STATUS_UNMATCHED; |
| 6523 | /* class iclass_float */ |
| 6524 | /* sf=x|0|S=0|11110|ftype=xx|1|rmode=10|opcode=001|000000|Rn=xxxxx|Rd=xxxxx */ |
| 6525 | if((INSWORD & 0x7F3FFC00)==0x1E310000) { |
| 6526 | decode_fields32(ENC_FCVTMU_32H_FLOAT2INT, ctx, instr); |
| 6527 | ctx->d = UINT(ctx->Rd); |
| 6528 | ctx->n = UINT(ctx->Rn); |
| 6529 | ctx->intsize = (ctx->sf==1) ? 0x40 : 0x20; |
| 6530 | if(!ctx->ftype) { |
| 6531 | ctx->fltsize = 0x20; |
| 6532 | } |
| 6533 | else if(ctx->ftype==1) { |
| 6534 | ctx->fltsize = 0x40; |
| 6535 | } |
| 6536 | else if(ctx->ftype==2) { |
| 6537 | if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)!=13) { |
| 6538 | UNDEFINED; |
| 6539 | } |
| 6540 | ctx->fltsize = 0x80; |
| 6541 | } |
| 6542 | else if(ctx->ftype==3) { |
| 6543 | if(HaveFP16Ext()) { |
| 6544 | ctx->fltsize = 0x10; |
| 6545 | } |
| 6546 | else { |
| 6547 | UNDEFINED; |
| 6548 | } |
| 6549 | } |
| 6550 | if(!(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)&12)) { |
| 6551 | ctx->rounding = FPDecodeRounding(ctx->rmode); |
| 6552 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6553 | ctx->op = FPConvOp_CVT_FtoI; |
| 6554 | } |
| 6555 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==4) { |
| 6556 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 6557 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6558 | ctx->op = FPConvOp_CVT_ItoF; |
| 6559 | } |
| 6560 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==8) { |
| 6561 | ctx->rounding = FPRounding_TIEAWAY; |
| 6562 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6563 | ctx->op = FPConvOp_CVT_FtoI; |
| 6564 | } |
| 6565 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==12) { |
| 6566 | if(ctx->fltsize!=0x10 && ctx->fltsize!=ctx->intsize) { |
| 6567 | UNDEFINED; |
| 6568 | } |
| 6569 | if(SLICE(ctx->opcode,0,0)==1) { |
| 6570 | ctx->op = FPConvOp_MOV_ItoF; |
| 6571 | }; |
| 6572 | ctx->part = 0; |
| 6573 | } |
| 6574 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==13) { |
| 6575 | if(ctx->intsize!=0x40 || ctx->fltsize!=0x80) { |
| 6576 | UNDEFINED; |
| 6577 | } |
no test coverage detected