fcvtas_float.xml */
| 6037 | |
| 6038 | /* fcvtas_float.xml */ |
| 6039 | int FCVTAS_float(context *ctx, Instruction *instr) |
| 6040 | { |
| 6041 | int rc = DECODE_STATUS_UNMATCHED; |
| 6042 | /* class iclass_float */ |
| 6043 | /* sf=x|0|S=0|11110|ftype=xx|1|rmode=00|opcode=100|000000|Rn=xxxxx|Rd=xxxxx */ |
| 6044 | if((INSWORD & 0x7F3FFC00)==0x1E240000) { |
| 6045 | decode_fields32(ENC_FCVTAS_32H_FLOAT2INT, ctx, instr); |
| 6046 | ctx->d = UINT(ctx->Rd); |
| 6047 | ctx->n = UINT(ctx->Rn); |
| 6048 | ctx->intsize = (ctx->sf==1) ? 0x40 : 0x20; |
| 6049 | if(!ctx->ftype) { |
| 6050 | ctx->fltsize = 0x20; |
| 6051 | } |
| 6052 | else if(ctx->ftype==1) { |
| 6053 | ctx->fltsize = 0x40; |
| 6054 | } |
| 6055 | else if(ctx->ftype==2) { |
| 6056 | if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)!=13) { |
| 6057 | UNDEFINED; |
| 6058 | } |
| 6059 | ctx->fltsize = 0x80; |
| 6060 | } |
| 6061 | else if(ctx->ftype==3) { |
| 6062 | if(HaveFP16Ext()) { |
| 6063 | ctx->fltsize = 0x10; |
| 6064 | } |
| 6065 | else { |
| 6066 | UNDEFINED; |
| 6067 | } |
| 6068 | } |
| 6069 | if(!(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)&12)) { |
| 6070 | ctx->rounding = FPDecodeRounding(ctx->rmode); |
| 6071 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6072 | ctx->op = FPConvOp_CVT_FtoI; |
| 6073 | } |
| 6074 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==4) { |
| 6075 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 6076 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6077 | ctx->op = FPConvOp_CVT_ItoF; |
| 6078 | } |
| 6079 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==8) { |
| 6080 | ctx->rounding = FPRounding_TIEAWAY; |
| 6081 | ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1); |
| 6082 | ctx->op = FPConvOp_CVT_FtoI; |
| 6083 | } |
| 6084 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==12) { |
| 6085 | if(ctx->fltsize!=0x10 && ctx->fltsize!=ctx->intsize) { |
| 6086 | UNDEFINED; |
| 6087 | } |
| 6088 | if(SLICE(ctx->opcode,0,0)==1) { |
| 6089 | ctx->op = FPConvOp_MOV_ItoF; |
| 6090 | }; |
| 6091 | ctx->part = 0; |
| 6092 | } |
| 6093 | else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==13) { |
| 6094 | if(ctx->intsize!=0x40 || ctx->fltsize!=0x80) { |
| 6095 | UNDEFINED; |
| 6096 | } |
no test coverage detected