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

Function LD3R_advsimd

arch/arm64/disassembler/decode2.c:12345–12411  ·  view source on GitHub ↗

ld3r_advsimd.xml */

Source from the content-addressed store, hash-verified

12343
12344/* ld3r_advsimd.xml */
12345int LD3R_advsimd(context *ctx, Instruction *instr)
12346{
12347 int rc = DECODE_STATUS_UNMATCHED;
12348 /* class iclass_as_no_post_index */
12349 /* 0|Q=x|0011010|L=1|R=0|00000|opcode=111|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */
12350 if((INSWORD & 0xBFFFF000)==0xD40E000) {
12351 decode_fields32(ENC_LD3R_ASISDLSO_R3, ctx, instr);
12352 ctx->t = UINT(ctx->Rt);
12353 ctx->n = UINT(ctx->Rn);
12354 ctx->m = 0;
12355 ctx->wback = FALSE;
12356 ctx->tag_checked = ctx->wback || ctx->n!=0x1f;
12357 OK(ENC_LD3R_ASISDLSO_R3);
12358 }
12359 /* class iclass_as_post_index */
12360 /* 0|Q=x|0011011|L=1|R=0|Rm=xxxxx|opcode=111|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */
12361 if((INSWORD & 0xBFE0F000)==0xDC0E000) {
12362 decode_fields32(ENC_LD3R_ASISDLSOP_R3_I, ctx, instr);
12363 ctx->t = UINT(ctx->Rt);
12364 ctx->n = UINT(ctx->Rn);
12365 ctx->m = UINT(ctx->Rm);
12366 ctx->wback = TRUE;
12367 ctx->tag_checked = ctx->wback || ctx->n!=0x1f;
12368 if(ctx->Rm==0x1f) OK(ENC_LD3R_ASISDLSOP_R3_I);
12369 if(ctx->Rm!=0x1f) OK(ENC_LD3R_ASISDLSOP_RX3_R);
12370 }
12371 /* post-decode pcode */
12372 ctx->init_scale = UINT(SLICE(ctx->opcode,2,1));
12373 ctx->scale = ctx->init_scale;
12374 ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1;
12375 ctx->replicate = FALSE;
12376 if(ctx->scale==3) {
12377 if(ctx->L==0 || ctx->S==1) {
12378 UNDEFINED;
12379 }
12380 ctx->scale = UINT(ctx->size);
12381 ctx->replicate = TRUE;
12382 }
12383 else if(ctx->scale==0) {
12384 ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size));
12385 }
12386 else if(ctx->scale==1) {
12387 if(SLICE(ctx->size,0,0)==1) {
12388 UNDEFINED;
12389 }
12390 ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1)));
12391 }
12392 else if(ctx->scale==2) {
12393 if(SLICE(ctx->size,1,1)==1) {
12394 UNDEFINED;
12395 }
12396 if(SLICE(ctx->size,0,0)==0) {
12397 ctx->index = UINT(((ctx->Q<<1)|ctx->S));
12398 }
12399 else {
12400 if(ctx->S==1) {
12401 UNDEFINED;
12402 }

Callers 2

decode_iclass_asisdlsoFunction · 0.85
decode_iclass_asisdlsopFunction · 0.85

Calls 1

decode_fields32Function · 0.85

Tested by

no test coverage detected