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

Function FSUB_advsimd

arch/arm64/disassembler/decode2.c:11573–11609  ·  view source on GitHub ↗

fsub_advsimd.xml */

Source from the content-addressed store, hash-verified

11571
11572/* fsub_advsimd.xml */
11573int FSUB_advsimd(context *ctx, Instruction *instr)
11574{
11575 int rc = DECODE_STATUS_UNMATCHED;
11576 /* class iclass_half */
11577 /* 0|Q=x|U=0|01110|a=1|10|Rm=xxxxx|00|opcode=010|1|Rn=xxxxx|Rd=xxxxx */
11578 if((INSWORD & 0xBFE0FC00)==0xEC01400) {
11579 decode_fields32(ENC_FSUB_ASIMDSAMEFP16_ONLY, ctx, instr);
11580 if(!HaveFP16Ext()) {
11581 UNDEFINED;
11582 }
11583 ctx->d = UINT(ctx->Rd);
11584 ctx->n = UINT(ctx->Rn);
11585 ctx->m = UINT(ctx->Rm);
11586 ctx->esize = 0x10;
11587 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
11588 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
11589 ctx->abs = (ctx->U==1);
11590 OK(ENC_FSUB_ASIMDSAMEFP16_ONLY);
11591 }
11592 /* class iclass_single_and_double */
11593 /* 0|Q=x|U=0|01110|size[1]=1|sz=x|1|Rm=xxxxx|opcode=11010|1|Rn=xxxxx|Rd=xxxxx */
11594 if((INSWORD & 0xBFA0FC00)==0xEA0D400) {
11595 decode_fields32(ENC_FSUB_ASIMDSAME_ONLY, ctx, instr);
11596 ctx->d = UINT(ctx->Rd);
11597 ctx->n = UINT(ctx->Rn);
11598 ctx->m = UINT(ctx->Rm);
11599 if(((ctx->sz<<1)|ctx->Q)==2) {
11600 UNDEFINED;
11601 }
11602 ctx->esize = (0x20) << (UINT(ctx->sz));
11603 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
11604 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
11605 ctx->abs = (ctx->U==1);
11606 OK(ENC_FSUB_ASIMDSAME_ONLY);
11607 }
11608 return rc;
11609}
11610
11611/* fsub_float.xml */
11612int FSUB_float(context *ctx, Instruction *instr)

Callers 2

decode_iclass_asimdsameFunction · 0.85

Calls 1

decode_fields32Function · 0.85

Tested by

no test coverage detected