frinti_float.xml */
| 10715 | |
| 10716 | /* frinti_float.xml */ |
| 10717 | int FRINTI_float(context *ctx, Instruction *instr) |
| 10718 | { |
| 10719 | int rc = DECODE_STATUS_UNMATCHED; |
| 10720 | /* class iclass_float */ |
| 10721 | /* M=0|0|S=0|11110|ftype=xx|1|opcode[5:3]=001|rmode=111|10000|Rn=xxxxx|Rd=xxxxx */ |
| 10722 | if((INSWORD & 0xFF3FFC00)==0x1E27C000) { |
| 10723 | decode_fields32(ENC_FRINTI_H_FLOATDP1, ctx, instr); |
| 10724 | ctx->d = UINT(ctx->Rd); |
| 10725 | ctx->n = UINT(ctx->Rn); |
| 10726 | if(!ctx->ftype) { |
| 10727 | ctx->esize = 0x20; |
| 10728 | } |
| 10729 | else if(ctx->ftype==1) { |
| 10730 | ctx->esize = 0x40; |
| 10731 | } |
| 10732 | else if(ctx->ftype==2) { |
| 10733 | UNDEFINED; |
| 10734 | } |
| 10735 | else if(ctx->ftype==3) { |
| 10736 | if(HaveFP16Ext()) { |
| 10737 | ctx->esize = 0x10; |
| 10738 | } |
| 10739 | else { |
| 10740 | UNDEFINED; |
| 10741 | } |
| 10742 | } |
| 10743 | ctx->exact = FALSE; |
| 10744 | if(!(ctx->rmode&4)) { |
| 10745 | ctx->rounding = FPDecodeRounding(SLICE(ctx->rmode,1,0)); |
| 10746 | } |
| 10747 | else if(ctx->rmode==4) { |
| 10748 | ctx->rounding = FPRounding_TIEAWAY; |
| 10749 | } |
| 10750 | else if(ctx->rmode==5) { |
| 10751 | UNDEFINED; |
| 10752 | } |
| 10753 | else if(ctx->rmode==6) { |
| 10754 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 10755 | ctx->exact = TRUE; |
| 10756 | } |
| 10757 | else if(ctx->rmode==7) { |
| 10758 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 10759 | } |
| 10760 | if(ctx->ftype==3) OK(ENC_FRINTI_H_FLOATDP1); |
| 10761 | if(ctx->ftype==0) OK(ENC_FRINTI_S_FLOATDP1); |
| 10762 | if(ctx->ftype==1) OK(ENC_FRINTI_D_FLOATDP1); |
| 10763 | } |
| 10764 | return rc; |
| 10765 | } |
| 10766 | |
| 10767 | /* frintm_advsimd.xml */ |
| 10768 | int FRINTM_advsimd(context *ctx, Instruction *instr) |
no test coverage detected