MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / CMEQ_advsimd_zero

Function CMEQ_advsimd_zero

arch/arm64/disassembler/decode2.c:2279–2335  ·  view source on GitHub ↗

cmeq_advsimd_zero.xml */

Source from the content-addressed store, hash-verified

2277
2278/* cmeq_advsimd_zero.xml */
2279int CMEQ_advsimd_zero(context *ctx, Instruction *instr)
2280{
2281 int rc = DECODE_STATUS_UNMATCHED;
2282 /* class iclass_sisd */
2283 /* 01|U=0|11110|size=xx|10000|opcode[4:1]=0100|op=1|10|Rn=xxxxx|Rd=xxxxx */
2284 if((INSWORD & 0xFF3FFC00)==0x5E209800) {
2285 decode_fields32(ENC_CMEQ_ASISDMISC_Z, ctx, instr);
2286 ctx->d = UINT(ctx->Rd);
2287 ctx->n = UINT(ctx->Rn);
2288 if(ctx->size!=3) {
2289 UNDEFINED;
2290 }
2291 ctx->esize = (8) << (UINT(ctx->size));
2292 ctx->datasize = ctx->esize;
2293 ctx->elements = 1;
2294 if(!((ctx->op<<1)|ctx->U)) {
2295 ctx->comparison = CompareOp_GT;
2296 }
2297 else if(((ctx->op<<1)|ctx->U)==1) {
2298 ctx->comparison = CompareOp_GE;
2299 }
2300 else if(((ctx->op<<1)|ctx->U)==2) {
2301 ctx->comparison = CompareOp_EQ;
2302 }
2303 else if(((ctx->op<<1)|ctx->U)==3) {
2304 ctx->comparison = CompareOp_LE;
2305 }
2306 OK(ENC_CMEQ_ASISDMISC_Z);
2307 }
2308 /* class iclass_simd */
2309 /* 0|Q=x|U=0|01110|size=xx|10000|opcode[4:1]=0100|op=1|10|Rn=xxxxx|Rd=xxxxx */
2310 if((INSWORD & 0xBF3FFC00)==0xE209800) {
2311 decode_fields32(ENC_CMEQ_ASIMDMISC_Z, ctx, instr);
2312 ctx->d = UINT(ctx->Rd);
2313 ctx->n = UINT(ctx->Rn);
2314 if(((ctx->size<<1)|ctx->Q)==6) {
2315 UNDEFINED;
2316 }
2317 ctx->esize = (8) << (UINT(ctx->size));
2318 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
2319 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
2320 if(!((ctx->op<<1)|ctx->U)) {
2321 ctx->comparison = CompareOp_GT;
2322 }
2323 else if(((ctx->op<<1)|ctx->U)==1) {
2324 ctx->comparison = CompareOp_GE;
2325 }
2326 else if(((ctx->op<<1)|ctx->U)==2) {
2327 ctx->comparison = CompareOp_EQ;
2328 }
2329 else if(((ctx->op<<1)|ctx->U)==3) {
2330 ctx->comparison = CompareOp_LE;
2331 }
2332 OK(ENC_CMEQ_ASIMDMISC_Z);
2333 }
2334 return rc;
2335}
2336

Callers 2

decode_iclass_asisdmiscFunction · 0.85
decode_iclass_asimdmiscFunction · 0.85

Calls 1

decode_fields32Function · 0.85

Tested by

no test coverage detected