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

Function LD4R_advsimd

arch/arm64/disassembler/decode2.c:12561–12627  ·  view source on GitHub ↗

ld4r_advsimd.xml */

Source from the content-addressed store, hash-verified

12559
12560/* ld4r_advsimd.xml */
12561int LD4R_advsimd(context *ctx, Instruction *instr)
12562{
12563 int rc = DECODE_STATUS_UNMATCHED;
12564 /* class iclass_as_no_post_index */
12565 /* 0|Q=x|0011010|L=1|R=1|00000|opcode=111|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */
12566 if((INSWORD & 0xBFFFF000)==0xD60E000) {
12567 decode_fields32(ENC_LD4R_ASISDLSO_R4, ctx, instr);
12568 ctx->t = UINT(ctx->Rt);
12569 ctx->n = UINT(ctx->Rn);
12570 ctx->m = 0;
12571 ctx->wback = FALSE;
12572 ctx->tag_checked = ctx->wback || ctx->n!=0x1f;
12573 OK(ENC_LD4R_ASISDLSO_R4);
12574 }
12575 /* class iclass_as_post_index */
12576 /* 0|Q=x|0011011|L=1|R=1|Rm=xxxxx|opcode=111|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */
12577 if((INSWORD & 0xBFE0F000)==0xDE0E000) {
12578 decode_fields32(ENC_LD4R_ASISDLSOP_R4_I, ctx, instr);
12579 ctx->t = UINT(ctx->Rt);
12580 ctx->n = UINT(ctx->Rn);
12581 ctx->m = UINT(ctx->Rm);
12582 ctx->wback = TRUE;
12583 ctx->tag_checked = ctx->wback || ctx->n!=0x1f;
12584 if(ctx->Rm==0x1f) OK(ENC_LD4R_ASISDLSOP_R4_I);
12585 if(ctx->Rm!=0x1f) OK(ENC_LD4R_ASISDLSOP_RX4_R);
12586 }
12587 /* post-decode pcode */
12588 ctx->init_scale = UINT(SLICE(ctx->opcode,2,1));
12589 ctx->scale = ctx->init_scale;
12590 ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1;
12591 ctx->replicate = FALSE;
12592 if(ctx->scale==3) {
12593 if(ctx->L==0 || ctx->S==1) {
12594 UNDEFINED;
12595 }
12596 ctx->scale = UINT(ctx->size);
12597 ctx->replicate = TRUE;
12598 }
12599 else if(ctx->scale==0) {
12600 ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size));
12601 }
12602 else if(ctx->scale==1) {
12603 if(SLICE(ctx->size,0,0)==1) {
12604 UNDEFINED;
12605 }
12606 ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1)));
12607 }
12608 else if(ctx->scale==2) {
12609 if(SLICE(ctx->size,1,1)==1) {
12610 UNDEFINED;
12611 }
12612 if(SLICE(ctx->size,0,0)==0) {
12613 ctx->index = UINT(((ctx->Q<<1)|ctx->S));
12614 }
12615 else {
12616 if(ctx->S==1) {
12617 UNDEFINED;
12618 }

Callers 2

decode_iclass_asisdlsoFunction · 0.85
decode_iclass_asisdlsopFunction · 0.85

Calls 1

decode_fields32Function · 0.85

Tested by

no test coverage detected