fcvtnu_float.xml */
| 6826 | |
| 6827 | /* fcvtnu_float.xml */ |
| 6828 | int FCVTNU_float(context *ctx, Instruction *instr) |
| 6829 | { |
| 6830 | int rc = DECODE_STATUS_UNMATCHED; |
| 6831 | /* class iclass_float */ |
| 6832 | /* sf=x|0|S=0|11110|ftype=xx|1|rmode=00|opcode=001|000000|Rn=xxxxx|Rd=xxxxx */ |
| 6833 | if((INSWORD & 0x7F3FFC00)==0x1E210000) { |
| 6834 | decode_fields32(ENC_FCVTNU_32H_FLOAT2INT, ctx, instr); |
| 6835 | ctx->d = UINT(ctx->Rd); |
| 6836 | ctx->n = UINT(ctx->Rn); |
| 6837 | ctx->intsize = (ctx->sf==1) ? 0x40 : 0x20; |
| 6838 | if(!ctx->ftype) { |
| 6839 | ctx->fltsize = 0x20; |
| 6840 | } |
| 6841 | else if(ctx->ftype==1) { |
| 6842 | ctx->fltsize = 0x40; |
| 6843 | } |
| 6844 | else if(ctx->ftype==2) { |
| 6845 | if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)!=13) { |
| 6846 | UNDEFINED; |
| 6847 | } |
| 6848 | ctx->fltsize = 0x80; |
| 6849 | } |
| 6850 | else if(ctx->ftype==3) { |
| 6851 | if(HaveFP16Ext()) { |
| 6852 | ctx->fltsize = 0x10; |
| 6853 | } |
| 6854 | else { |
| 6855 | UNDEFINED; |
| 6856 | } |
| 6857 | } |
| 6858 | if(!(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)&12)) { |
| 6859 | ctx->rounding = FPDecodeRounding(ctx->rmode); |
| 6860 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6861 | ctx->op = FPConvOp_CVT_FtoI; |
| 6862 | } |
| 6863 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==4) { |
| 6864 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 6865 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6866 | ctx->op = FPConvOp_CVT_ItoF; |
| 6867 | } |
| 6868 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==8) { |
| 6869 | ctx->rounding = FPRounding_TIEAWAY; |
| 6870 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6871 | ctx->op = FPConvOp_CVT_FtoI; |
| 6872 | } |
| 6873 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==12) { |
| 6874 | if(ctx->fltsize!=0x10 && ctx->fltsize!=ctx->intsize) { |
| 6875 | UNDEFINED; |
| 6876 | } |
| 6877 | if(SLICE(ctx->opcode,0,0)==1) { |
| 6878 | ctx->op = FPConvOp_MOV_ItoF; |
| 6879 | }; |
| 6880 | ctx->part = 0; |
| 6881 | } |
| 6882 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==13) { |
| 6883 | if(ctx->intsize!=0x40 || ctx->fltsize!=0x80) { |
| 6884 | UNDEFINED; |
| 6885 | } |
no test coverage detected