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

Function SQSHRUN_advsimd

arch/arm64/disassembler/decode2.c:23276–23320  ·  view source on GitHub ↗

sqshrun_advsimd.xml */

Source from the content-addressed store, hash-verified

23274
23275/* sqshrun_advsimd.xml */
23276int SQSHRUN_advsimd(context *ctx, Instruction *instr)
23277{
23278 int rc = DECODE_STATUS_UNMATCHED;
23279 /* class iclass_sisd */
23280 /* 01|U=1|111110|immh!=0000|immb=xxx|opcode[4:1]=1000|op=0|1|Rn=xxxxx|Rd=xxxxx */
23281 if((INSWORD & 0xFF80FC00)==0x7F008400 && (INSWORD & 0x780000)!=0x0) {
23282 decode_fields32(ENC_SQSHRUN_ASISDSHF_N, ctx, instr);
23283 ctx->d = UINT(ctx->Rd);
23284 ctx->n = UINT(ctx->Rn);
23285 if(ctx->immh==0) {
23286 UNDEFINED;
23287 }
23288 if(SLICE(ctx->immh,3,3)==1) {
23289 UNDEFINED;
23290 }
23291 ctx->esize = (8) << (HighestSetBit(ctx->immh));
23292 ctx->datasize = ctx->esize;
23293 ctx->elements = 1;
23294 ctx->part = 0;
23295 ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb));
23296 ctx->round = (ctx->op==1);
23297 OK(ENC_SQSHRUN_ASISDSHF_N);
23298 }
23299 /* class iclass_simd */
23300 /* 0|Q=x|U=1|011110|immh!=0000|immb=xxx|opcode[4:1]=1000|op=0|1|Rn=xxxxx|Rd=xxxxx */
23301 if((INSWORD & 0xBF80FC00)==0x2F008400 && (INSWORD & 0x780000)!=0x0) {
23302 decode_fields32(ENC_SQSHRUN_ASIMDSHF_N, ctx, instr);
23303 ctx->d = UINT(ctx->Rd);
23304 ctx->n = UINT(ctx->Rn);
23305 if(ctx->immh==0) {
23306 SEE /* asimdimm */;
23307 }
23308 if(SLICE(ctx->immh,3,3)==1) {
23309 UNDEFINED;
23310 }
23311 ctx->esize = (8) << (HighestSetBit(ctx->immh));
23312 ctx->datasize = 0x40;
23313 ctx->part = UINT(ctx->Q);
23314 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
23315 ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb));
23316 ctx->round = (ctx->op==1);
23317 OK(ENC_SQSHRUN_ASIMDSHF_N);
23318 }
23319 return rc;
23320}
23321
23322/* sqsub_advsimd.xml */
23323int SQSUB_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