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

Function LD2R_advsimd

arch/arm64/disassembler/decode2.c:12129–12195  ·  view source on GitHub ↗

ld2r_advsimd.xml */

Source from the content-addressed store, hash-verified

12127
12128/* ld2r_advsimd.xml */
12129int LD2R_advsimd(context *ctx, Instruction *instr)
12130{
12131 int rc = DECODE_STATUS_UNMATCHED;
12132 /* class iclass_as_no_post_index */
12133 /* 0|Q=x|0011010|L=1|R=1|00000|opcode=110|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */
12134 if((INSWORD & 0xBFFFF000)==0xD60C000) {
12135 decode_fields32(ENC_LD2R_ASISDLSO_R2, ctx, instr);
12136 ctx->t = UINT(ctx->Rt);
12137 ctx->n = UINT(ctx->Rn);
12138 ctx->m = 0;
12139 ctx->wback = FALSE;
12140 ctx->tag_checked = ctx->wback || ctx->n!=0x1f;
12141 OK(ENC_LD2R_ASISDLSO_R2);
12142 }
12143 /* class iclass_as_post_index */
12144 /* 0|Q=x|0011011|L=1|R=1|Rm=xxxxx|opcode=110|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */
12145 if((INSWORD & 0xBFE0F000)==0xDE0C000) {
12146 decode_fields32(ENC_LD2R_ASISDLSOP_R2_I, ctx, instr);
12147 ctx->t = UINT(ctx->Rt);
12148 ctx->n = UINT(ctx->Rn);
12149 ctx->m = UINT(ctx->Rm);
12150 ctx->wback = TRUE;
12151 ctx->tag_checked = ctx->wback || ctx->n!=0x1f;
12152 if(ctx->Rm==0x1f) OK(ENC_LD2R_ASISDLSOP_R2_I);
12153 if(ctx->Rm!=0x1f) OK(ENC_LD2R_ASISDLSOP_RX2_R);
12154 }
12155 /* post-decode pcode */
12156 ctx->init_scale = UINT(SLICE(ctx->opcode,2,1));
12157 ctx->scale = ctx->init_scale;
12158 ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1;
12159 ctx->replicate = FALSE;
12160 if(ctx->scale==3) {
12161 if(ctx->L==0 || ctx->S==1) {
12162 UNDEFINED;
12163 }
12164 ctx->scale = UINT(ctx->size);
12165 ctx->replicate = TRUE;
12166 }
12167 else if(ctx->scale==0) {
12168 ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size));
12169 }
12170 else if(ctx->scale==1) {
12171 if(SLICE(ctx->size,0,0)==1) {
12172 UNDEFINED;
12173 }
12174 ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1)));
12175 }
12176 else if(ctx->scale==2) {
12177 if(SLICE(ctx->size,1,1)==1) {
12178 UNDEFINED;
12179 }
12180 if(SLICE(ctx->size,0,0)==0) {
12181 ctx->index = UINT(((ctx->Q<<1)|ctx->S));
12182 }
12183 else {
12184 if(ctx->S==1) {
12185 UNDEFINED;
12186 }

Callers 2

decode_iclass_asisdlsoFunction · 0.85
decode_iclass_asisdlsopFunction · 0.85

Calls 1

decode_fields32Function · 0.85

Tested by

no test coverage detected