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

Function CMGE_advsimd_zero

arch/arm64/disassembler/decode2.c:2379–2435  ·  view source on GitHub ↗

cmge_advsimd_zero.xml */

Source from the content-addressed store, hash-verified

2377
2378/* cmge_advsimd_zero.xml */
2379int CMGE_advsimd_zero(context *ctx, Instruction *instr)
2380{
2381 int rc = DECODE_STATUS_UNMATCHED;
2382 /* class iclass_sisd */
2383 /* 01|U=1|11110|size=xx|10000|opcode[4:1]=0100|op=0|10|Rn=xxxxx|Rd=xxxxx */
2384 if((INSWORD & 0xFF3FFC00)==0x7E208800) {
2385 decode_fields32(ENC_CMGE_ASISDMISC_Z, ctx, instr);
2386 ctx->d = UINT(ctx->Rd);
2387 ctx->n = UINT(ctx->Rn);
2388 if(ctx->size!=3) {
2389 UNDEFINED;
2390 }
2391 ctx->esize = (8) << (UINT(ctx->size));
2392 ctx->datasize = ctx->esize;
2393 ctx->elements = 1;
2394 if(!((ctx->op<<1)|ctx->U)) {
2395 ctx->comparison = CompareOp_GT;
2396 }
2397 else if(((ctx->op<<1)|ctx->U)==1) {
2398 ctx->comparison = CompareOp_GE;
2399 }
2400 else if(((ctx->op<<1)|ctx->U)==2) {
2401 ctx->comparison = CompareOp_EQ;
2402 }
2403 else if(((ctx->op<<1)|ctx->U)==3) {
2404 ctx->comparison = CompareOp_LE;
2405 }
2406 OK(ENC_CMGE_ASISDMISC_Z);
2407 }
2408 /* class iclass_simd */
2409 /* 0|Q=x|U=1|01110|size=xx|10000|opcode[4:1]=0100|op=0|10|Rn=xxxxx|Rd=xxxxx */
2410 if((INSWORD & 0xBF3FFC00)==0x2E208800) {
2411 decode_fields32(ENC_CMGE_ASIMDMISC_Z, ctx, instr);
2412 ctx->d = UINT(ctx->Rd);
2413 ctx->n = UINT(ctx->Rn);
2414 if(((ctx->size<<1)|ctx->Q)==6) {
2415 UNDEFINED;
2416 }
2417 ctx->esize = (8) << (UINT(ctx->size));
2418 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
2419 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
2420 if(!((ctx->op<<1)|ctx->U)) {
2421 ctx->comparison = CompareOp_GT;
2422 }
2423 else if(((ctx->op<<1)|ctx->U)==1) {
2424 ctx->comparison = CompareOp_GE;
2425 }
2426 else if(((ctx->op<<1)|ctx->U)==2) {
2427 ctx->comparison = CompareOp_EQ;
2428 }
2429 else if(((ctx->op<<1)|ctx->U)==3) {
2430 ctx->comparison = CompareOp_LE;
2431 }
2432 OK(ENC_CMGE_ASIMDMISC_Z);
2433 }
2434 return rc;
2435}
2436

Callers 2

decode_iclass_asisdmiscFunction · 0.85
decode_iclass_asimdmiscFunction · 0.85

Calls 1

decode_fields32Function · 0.85

Tested by

no test coverage detected