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

Function SSHR_advsimd

arch/arm64/disassembler/decode2.c:23718–23761  ·  view source on GitHub ↗

sshr_advsimd.xml */

Source from the content-addressed store, hash-verified

23716
23717/* sshr_advsimd.xml */
23718int SSHR_advsimd(context *ctx, Instruction *instr)
23719{
23720 int rc = DECODE_STATUS_UNMATCHED;
23721 /* class iclass_sisd */
23722 /* 01|U=0|111110|immh!=0000|immb=xxx|opcode[4:3]=00|o1=0|o0=0|opcode[0]=0|1|Rn=xxxxx|Rd=xxxxx */
23723 if((INSWORD & 0xFF80FC00)==0x5F000400 && (INSWORD & 0x780000)!=0x0) {
23724 decode_fields32(ENC_SSHR_ASISDSHF_R, ctx, instr);
23725 ctx->d = UINT(ctx->Rd);
23726 ctx->n = UINT(ctx->Rn);
23727 if(SLICE(ctx->immh,3,3)!=1) {
23728 UNDEFINED;
23729 }
23730 ctx->esize = (8) << (3);
23731 ctx->datasize = ctx->esize;
23732 ctx->elements = 1;
23733 ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb));
23734 ctx->unsigned_ = (ctx->U==1);
23735 ctx->round = (ctx->o1==1);
23736 ctx->accumulate = (ctx->o0==1);
23737 OK(ENC_SSHR_ASISDSHF_R);
23738 }
23739 /* class iclass_simd */
23740 /* 0|Q=x|U=0|011110|immh!=0000|immb=xxx|opcode[4:3]=00|o1=0|o0=0|opcode[0]=0|1|Rn=xxxxx|Rd=xxxxx */
23741 if((INSWORD & 0xBF80FC00)==0xF000400 && (INSWORD & 0x780000)!=0x0) {
23742 decode_fields32(ENC_SSHR_ASIMDSHF_R, ctx, instr);
23743 ctx->d = UINT(ctx->Rd);
23744 ctx->n = UINT(ctx->Rn);
23745 if(ctx->immh==0) {
23746 SEE /* asimdimm */;
23747 }
23748 if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) {
23749 UNDEFINED;
23750 }
23751 ctx->esize = (8) << (HighestSetBit(ctx->immh));
23752 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
23753 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
23754 ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb));
23755 ctx->unsigned_ = (ctx->U==1);
23756 ctx->round = (ctx->o1==1);
23757 ctx->accumulate = (ctx->o0==1);
23758 OK(ENC_SSHR_ASIMDSHF_R);
23759 }
23760 return rc;
23761}
23762
23763/* ssra_advsimd.xml */
23764int SSRA_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