crc32.xml */
| 2950 | |
| 2951 | /* crc32.xml */ |
| 2952 | int CRC32(context *ctx, Instruction *instr) |
| 2953 | { |
| 2954 | int rc = DECODE_STATUS_UNMATCHED; |
| 2955 | /* class iclass_crc */ |
| 2956 | /* sf=x|op=0|S=0|11010110|Rm=xxxxx|opcode2[5:3]=010|C=0|sz=xx|Rn=xxxxx|Rd=xxxxx */ |
| 2957 | if((INSWORD & 0x7FE0F000)==0x1AC04000) { |
| 2958 | decode_fields32(ENC_CRC32B_32C_DP_2SRC, ctx, instr); |
| 2959 | if(!HaveCRCExt()) { |
| 2960 | UNDEFINED; |
| 2961 | } |
| 2962 | ctx->d = UINT(ctx->Rd); |
| 2963 | ctx->n = UINT(ctx->Rn); |
| 2964 | ctx->m = UINT(ctx->Rm); |
| 2965 | if(ctx->sf==1 && ctx->sz!=3) { |
| 2966 | UNDEFINED; |
| 2967 | } |
| 2968 | if(ctx->sf==0 && ctx->sz==3) { |
| 2969 | UNDEFINED; |
| 2970 | } |
| 2971 | ctx->size = (8) << (UINT(ctx->sz)); |
| 2972 | ctx->crc32c = (ctx->C==1); |
| 2973 | if(ctx->sf==0 && ctx->sz==0) OK(ENC_CRC32B_32C_DP_2SRC); |
| 2974 | if(ctx->sf==0 && ctx->sz==1) OK(ENC_CRC32H_32C_DP_2SRC); |
| 2975 | if(ctx->sf==0 && ctx->sz==2) OK(ENC_CRC32W_32C_DP_2SRC); |
| 2976 | if(ctx->sf==1 && ctx->sz==3) OK(ENC_CRC32X_64C_DP_2SRC); |
| 2977 | } |
| 2978 | return rc; |
| 2979 | } |
| 2980 | |
| 2981 | /* crc32c.xml */ |
| 2982 | int CRC32C(context *ctx, Instruction *instr) |
no test coverage detected