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

Function CSINC

arch/arm64/disassembler/decode2.c:3172–3193  ·  view source on GitHub ↗

csinc.xml */

Source from the content-addressed store, hash-verified

3170
3171/* csinc.xml */
3172int CSINC(context *ctx, Instruction *instr)
3173{
3174 int rc = DECODE_STATUS_UNMATCHED;
3175 /* class iclass_general */
3176 /* sf=x|op=0|S=0|11010100|Rm=xxxxx|cond=xxxx|op2[1]=0|o2=1|Rn=xxxxx|Rd=xxxxx */
3177 if((INSWORD & 0x7FE00C00)==0x1A800400) {
3178 decode_fields32(ENC_CSINC_32_CONDSEL, ctx, instr);
3179 ctx->d = UINT(ctx->Rd);
3180 ctx->n = UINT(ctx->Rn);
3181 ctx->m = UINT(ctx->Rm);
3182 ctx->datasize = (ctx->sf==1) ? 0x40 : 0x20;
3183 ctx->condition = ctx->cond;
3184 ctx->else_inv = (ctx->op==1);
3185 ctx->else_inc = (ctx->o2==1);
3186 /* regular aliases */
3187 if(ctx->Rm!=0x1f && (ctx->cond&14)!=14 && ctx->Rn!=0x1f && ctx->Rn==ctx->Rm) return CINC_CSINC(ctx, instr);
3188 if(ctx->Rm==0x1f && (ctx->cond&14)!=14 && ctx->Rn==0x1f) return CSET_CSINC(ctx, instr);
3189 if(ctx->sf==0) OK(ENC_CSINC_32_CONDSEL);
3190 if(ctx->sf==1) OK(ENC_CSINC_64_CONDSEL);
3191 }
3192 return rc;
3193}
3194
3195/* csinv.xml */
3196int CSINV(context *ctx, Instruction *instr)

Callers 1

decode_iclass_condselFunction · 0.85

Calls 3

decode_fields32Function · 0.85
CINC_CSINCFunction · 0.85
CSET_CSINCFunction · 0.85

Tested by

no test coverage detected