fcvtms_float.xml */
| 6364 | |
| 6365 | /* fcvtms_float.xml */ |
| 6366 | int FCVTMS_float(context *ctx, Instruction *instr) |
| 6367 | { |
| 6368 | int rc = DECODE_STATUS_UNMATCHED; |
| 6369 | /* class iclass_float */ |
| 6370 | /* sf=x|0|S=0|11110|ftype=xx|1|rmode=10|opcode=000|000000|Rn=xxxxx|Rd=xxxxx */ |
| 6371 | if((INSWORD & 0x7F3FFC00)==0x1E300000) { |
| 6372 | decode_fields32(ENC_FCVTMS_32H_FLOAT2INT, ctx, instr); |
| 6373 | ctx->d = UINT(ctx->Rd); |
| 6374 | ctx->n = UINT(ctx->Rn); |
| 6375 | ctx->intsize = (ctx->sf==1) ? 0x40 : 0x20; |
| 6376 | if(!ctx->ftype) { |
| 6377 | ctx->fltsize = 0x20; |
| 6378 | } |
| 6379 | else if(ctx->ftype==1) { |
| 6380 | ctx->fltsize = 0x40; |
| 6381 | } |
| 6382 | else if(ctx->ftype==2) { |
| 6383 | if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)!=13) { |
| 6384 | UNDEFINED; |
| 6385 | } |
| 6386 | ctx->fltsize = 0x80; |
| 6387 | } |
| 6388 | else if(ctx->ftype==3) { |
| 6389 | if(HaveFP16Ext()) { |
| 6390 | ctx->fltsize = 0x10; |
| 6391 | } |
| 6392 | else { |
| 6393 | UNDEFINED; |
| 6394 | } |
| 6395 | } |
| 6396 | if(!(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)&12)) { |
| 6397 | ctx->rounding = FPDecodeRounding(ctx->rmode); |
| 6398 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6399 | ctx->op = FPConvOp_CVT_FtoI; |
| 6400 | } |
| 6401 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==4) { |
| 6402 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 6403 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6404 | ctx->op = FPConvOp_CVT_ItoF; |
| 6405 | } |
| 6406 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==8) { |
| 6407 | ctx->rounding = FPRounding_TIEAWAY; |
| 6408 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6409 | ctx->op = FPConvOp_CVT_FtoI; |
| 6410 | } |
| 6411 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==12) { |
| 6412 | if(ctx->fltsize!=0x10 && ctx->fltsize!=ctx->intsize) { |
| 6413 | UNDEFINED; |
| 6414 | } |
| 6415 | if(SLICE(ctx->opcode,0,0)==1) { |
| 6416 | ctx->op = FPConvOp_MOV_ItoF; |
| 6417 | }; |
| 6418 | ctx->part = 0; |
| 6419 | } |
| 6420 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==13) { |
| 6421 | if(ctx->intsize!=0x40 || ctx->fltsize!=0x80) { |
| 6422 | UNDEFINED; |
| 6423 | } |
no test coverage detected