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

Function LD1R_advsimd

arch/arm64/disassembler/decode2.c:11904–11970  ·  view source on GitHub ↗

ld1r_advsimd.xml */

Source from the content-addressed store, hash-verified

11902
11903/* ld1r_advsimd.xml */
11904int LD1R_advsimd(context *ctx, Instruction *instr)
11905{
11906 int rc = DECODE_STATUS_UNMATCHED;
11907 /* class iclass_as_no_post_index */
11908 /* 0|Q=x|0011010|L=1|R=0|00000|opcode=110|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */
11909 if((INSWORD & 0xBFFFF000)==0xD40C000) {
11910 decode_fields32(ENC_LD1R_ASISDLSO_R1, ctx, instr);
11911 ctx->t = UINT(ctx->Rt);
11912 ctx->n = UINT(ctx->Rn);
11913 ctx->m = 0;
11914 ctx->wback = FALSE;
11915 ctx->tag_checked = ctx->wback || ctx->n!=0x1f;
11916 OK(ENC_LD1R_ASISDLSO_R1);
11917 }
11918 /* class iclass_as_post_index */
11919 /* 0|Q=x|0011011|L=1|R=0|Rm=xxxxx|opcode=110|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */
11920 if((INSWORD & 0xBFE0F000)==0xDC0C000) {
11921 decode_fields32(ENC_LD1R_ASISDLSOP_R1_I, ctx, instr);
11922 ctx->t = UINT(ctx->Rt);
11923 ctx->n = UINT(ctx->Rn);
11924 ctx->m = UINT(ctx->Rm);
11925 ctx->wback = TRUE;
11926 ctx->tag_checked = ctx->wback || ctx->n!=0x1f;
11927 if(ctx->Rm==0x1f) OK(ENC_LD1R_ASISDLSOP_R1_I);
11928 if(ctx->Rm!=0x1f) OK(ENC_LD1R_ASISDLSOP_RX1_R);
11929 }
11930 /* post-decode pcode */
11931 ctx->init_scale = UINT(SLICE(ctx->opcode,2,1));
11932 ctx->scale = ctx->init_scale;
11933 ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1;
11934 ctx->replicate = FALSE;
11935 if(ctx->scale==3) {
11936 if(ctx->L==0 || ctx->S==1) {
11937 UNDEFINED;
11938 }
11939 ctx->scale = UINT(ctx->size);
11940 ctx->replicate = TRUE;
11941 }
11942 else if(ctx->scale==0) {
11943 ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size));
11944 }
11945 else if(ctx->scale==1) {
11946 if(SLICE(ctx->size,0,0)==1) {
11947 UNDEFINED;
11948 }
11949 ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1)));
11950 }
11951 else if(ctx->scale==2) {
11952 if(SLICE(ctx->size,1,1)==1) {
11953 UNDEFINED;
11954 }
11955 if(SLICE(ctx->size,0,0)==0) {
11956 ctx->index = UINT(((ctx->Q<<1)|ctx->S));
11957 }
11958 else {
11959 if(ctx->S==1) {
11960 UNDEFINED;
11961 }

Callers 2

decode_iclass_asisdlsoFunction · 0.85
decode_iclass_asisdlsopFunction · 0.85

Calls 1

decode_fields32Function · 0.85

Tested by

no test coverage detected