frintx_float.xml */
| 11195 | |
| 11196 | /* frintx_float.xml */ |
| 11197 | int FRINTX_float(context *ctx, Instruction *instr) |
| 11198 | { |
| 11199 | int rc = DECODE_STATUS_UNMATCHED; |
| 11200 | /* class iclass_float */ |
| 11201 | /* M=0|0|S=0|11110|ftype=xx|1|opcode[5:3]=001|rmode=110|10000|Rn=xxxxx|Rd=xxxxx */ |
| 11202 | if((INSWORD & 0xFF3FFC00)==0x1E274000) { |
| 11203 | decode_fields32(ENC_FRINTX_H_FLOATDP1, ctx, instr); |
| 11204 | ctx->d = UINT(ctx->Rd); |
| 11205 | ctx->n = UINT(ctx->Rn); |
| 11206 | if(!ctx->ftype) { |
| 11207 | ctx->esize = 0x20; |
| 11208 | } |
| 11209 | else if(ctx->ftype==1) { |
| 11210 | ctx->esize = 0x40; |
| 11211 | } |
| 11212 | else if(ctx->ftype==2) { |
| 11213 | UNDEFINED; |
| 11214 | } |
| 11215 | else if(ctx->ftype==3) { |
| 11216 | if(HaveFP16Ext()) { |
| 11217 | ctx->esize = 0x10; |
| 11218 | } |
| 11219 | else { |
| 11220 | UNDEFINED; |
| 11221 | } |
| 11222 | } |
| 11223 | ctx->exact = FALSE; |
| 11224 | if(!(ctx->rmode&4)) { |
| 11225 | ctx->rounding = FPDecodeRounding(SLICE(ctx->rmode,1,0)); |
| 11226 | } |
| 11227 | else if(ctx->rmode==4) { |
| 11228 | ctx->rounding = FPRounding_TIEAWAY; |
| 11229 | } |
| 11230 | else if(ctx->rmode==5) { |
| 11231 | UNDEFINED; |
| 11232 | } |
| 11233 | else if(ctx->rmode==6) { |
| 11234 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 11235 | ctx->exact = TRUE; |
| 11236 | } |
| 11237 | else if(ctx->rmode==7) { |
| 11238 | ctx->rounding = FPRoundingMode(ctx->FPCR); |
| 11239 | } |
| 11240 | if(ctx->ftype==3) OK(ENC_FRINTX_H_FLOATDP1); |
| 11241 | if(ctx->ftype==0) OK(ENC_FRINTX_S_FLOATDP1); |
| 11242 | if(ctx->ftype==1) OK(ENC_FRINTX_D_FLOATDP1); |
| 11243 | } |
| 11244 | return rc; |
| 11245 | } |
| 11246 | |
| 11247 | /* frintz_advsimd.xml */ |
| 11248 | int FRINTZ_advsimd(context *ctx, Instruction *instr) |
no test coverage detected