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

Function SLI_advsimd

arch/arm64/disassembler/decode2.c:21354–21391  ·  view source on GitHub ↗

sli_advsimd.xml */

Source from the content-addressed store, hash-verified

21352
21353/* sli_advsimd.xml */
21354int SLI_advsimd(context *ctx, Instruction *instr)
21355{
21356 int rc = DECODE_STATUS_UNMATCHED;
21357 /* class iclass_sisd */
21358 /* 01|U=1|111110|immh!=0000|immb=xxx|opcode=01010|1|Rn=xxxxx|Rd=xxxxx */
21359 if((INSWORD & 0xFF80FC00)==0x7F005400 && (INSWORD & 0x780000)!=0x0) {
21360 decode_fields32(ENC_SLI_ASISDSHF_R, ctx, instr);
21361 ctx->d = UINT(ctx->Rd);
21362 ctx->n = UINT(ctx->Rn);
21363 if(SLICE(ctx->immh,3,3)!=1) {
21364 UNDEFINED;
21365 }
21366 ctx->esize = (8) << (3);
21367 ctx->datasize = ctx->esize;
21368 ctx->elements = 1;
21369 ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize;
21370 OK(ENC_SLI_ASISDSHF_R);
21371 }
21372 /* class iclass_simd */
21373 /* 0|Q=x|U=1|011110|immh!=0000|immb=xxx|opcode=01010|1|Rn=xxxxx|Rd=xxxxx */
21374 if((INSWORD & 0xBF80FC00)==0x2F005400 && (INSWORD & 0x780000)!=0x0) {
21375 decode_fields32(ENC_SLI_ASIMDSHF_R, ctx, instr);
21376 ctx->d = UINT(ctx->Rd);
21377 ctx->n = UINT(ctx->Rn);
21378 if(ctx->immh==0) {
21379 SEE /* asimdimm */;
21380 }
21381 if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) {
21382 UNDEFINED;
21383 }
21384 ctx->esize = (8) << (HighestSetBit(ctx->immh));
21385 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
21386 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
21387 ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize;
21388 OK(ENC_SLI_ASIMDSHF_R);
21389 }
21390 return rc;
21391}
21392
21393/* sm3partw1_advsimd.xml */
21394int SM3PARTW1_advsimd(context *ctx, Instruction *instr)

Callers 2

decode_iclass_asisdshfFunction · 0.85
decode_iclass_asimdshfFunction · 0.85

Calls 2

decode_fields32Function · 0.85
HighestSetBitFunction · 0.85

Tested by

no test coverage detected