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

Function SQRSHL_advsimd

arch/arm64/disassembler/decode2.c:22905–22945  ·  view source on GitHub ↗

sqrshl_advsimd.xml */

Source from the content-addressed store, hash-verified

22903
22904/* sqrshl_advsimd.xml */
22905int SQRSHL_advsimd(context *ctx, Instruction *instr)
22906{
22907 int rc = DECODE_STATUS_UNMATCHED;
22908 /* class iclass_sisd */
22909 /* 01|U=0|11110|size=xx|1|Rm=xxxxx|opcode[4:2]=010|R=1|S=1|1|Rn=xxxxx|Rd=xxxxx */
22910 if((INSWORD & 0xFF20FC00)==0x5E205C00) {
22911 decode_fields32(ENC_SQRSHL_ASISDSAME_ONLY, ctx, instr);
22912 ctx->d = UINT(ctx->Rd);
22913 ctx->n = UINT(ctx->Rn);
22914 ctx->m = UINT(ctx->Rm);
22915 ctx->esize = (8) << (UINT(ctx->size));
22916 ctx->datasize = ctx->esize;
22917 ctx->elements = 1;
22918 ctx->unsigned_ = (ctx->U==1);
22919 ctx->rounding = (ctx->R==1);
22920 ctx->saturating = (ctx->S==1);
22921 if(ctx->S==0 && ctx->size!=3) {
22922 UNDEFINED;
22923 }
22924 OK(ENC_SQRSHL_ASISDSAME_ONLY);
22925 }
22926 /* class iclass_simd */
22927 /* 0|Q=x|U=0|01110|size=xx|1|Rm=xxxxx|opcode[4:2]=010|R=1|S=1|1|Rn=xxxxx|Rd=xxxxx */
22928 if((INSWORD & 0xBF20FC00)==0xE205C00) {
22929 decode_fields32(ENC_SQRSHL_ASIMDSAME_ONLY, ctx, instr);
22930 ctx->d = UINT(ctx->Rd);
22931 ctx->n = UINT(ctx->Rn);
22932 ctx->m = UINT(ctx->Rm);
22933 if(((ctx->size<<1)|ctx->Q)==6) {
22934 UNDEFINED;
22935 }
22936 ctx->esize = (8) << (UINT(ctx->size));
22937 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
22938 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
22939 ctx->unsigned_ = (ctx->U==1);
22940 ctx->rounding = (ctx->R==1);
22941 ctx->saturating = (ctx->S==1);
22942 OK(ENC_SQRSHL_ASIMDSAME_ONLY);
22943 }
22944 return rc;
22945}
22946
22947/* sqrshrn_advsimd.xml */
22948int SQRSHRN_advsimd(context *ctx, Instruction *instr)

Callers 2

decode_iclass_asisdsameFunction · 0.85
decode_iclass_asimdsameFunction · 0.85

Calls 1

decode_fields32Function · 0.85

Tested by

no test coverage detected