fcvtau_float.xml */
| 6191 | |
| 6192 | /* fcvtau_float.xml */ |
| 6193 | int FCVTAU_float(context *ctx, Instruction *instr) |
| 6194 | { |
| 6195 | int rc = DECODE_STATUS_UNMATCHED; |
| 6196 | /* class iclass_float */ |
| 6197 | /* sf=x|0|S=0|11110|ftype=xx|1|rmode=00|opcode=101|000000|Rn=xxxxx|Rd=xxxxx */ |
| 6198 | if((INSWORD & 0x7F3FFC00)==0x1E250000) { |
| 6199 | decode_fields32(ENC_FCVTAU_32H_FLOAT2INT, ctx, instr); |
| 6200 | ctx->d = UINT(ctx->Rd); |
| 6201 | ctx->n = UINT(ctx->Rn); |
| 6202 | ctx->intsize = (ctx->sf==1) ? 0x40 : 0x20; |
| 6203 | if(!ctx->ftype) { |
| 6204 | ctx->fltsize = 0x20; |
| 6205 | } |
| 6206 | else if(ctx->ftype==1) { |
| 6207 | ctx->fltsize = 0x40; |
| 6208 | } |
| 6209 | else if(ctx->ftype==2) { |
| 6210 | if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)!=13) { |
| 6211 | UNDEFINED; |
| 6212 | } |
| 6213 | ctx->fltsize = 0x80; |
| 6214 | } |
| 6215 | else if(ctx->ftype==3) { |
| 6216 | if(HaveFP16Ext()) { |
| 6217 | ctx->fltsize = 0x10; |
| 6218 | } |
| 6219 | else { |
| 6220 | UNDEFINED; |
| 6221 | } |
| 6222 | } |
| 6223 | if(!(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)&12)) { |
| 6224 | ctx->rounding = FPDecodeRounding(ctx->rmode); |
| 6225 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6226 | ctx->op = FPConvOp_CVT_FtoI; |
| 6227 | } |
| 6228 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==4) { |
| 6229 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 6230 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6231 | ctx->op = FPConvOp_CVT_ItoF; |
| 6232 | } |
| 6233 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==8) { |
| 6234 | ctx->rounding = FPRounding_TIEAWAY; |
| 6235 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6236 | ctx->op = FPConvOp_CVT_FtoI; |
| 6237 | } |
| 6238 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==12) { |
| 6239 | if(ctx->fltsize!=0x10 && ctx->fltsize!=ctx->intsize) { |
| 6240 | UNDEFINED; |
| 6241 | } |
| 6242 | if(SLICE(ctx->opcode,0,0)==1) { |
| 6243 | ctx->op = FPConvOp_MOV_ItoF; |
| 6244 | }; |
| 6245 | ctx->part = 0; |
| 6246 | } |
| 6247 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==13) { |
| 6248 | if(ctx->intsize!=0x40 || ctx->fltsize!=0x80) { |
| 6249 | UNDEFINED; |
| 6250 | } |
no test coverage detected