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

Function EXTR

arch/arm64/disassembler/decode2.c:3994–4018  ·  view source on GitHub ↗

extr.xml */

Source from the content-addressed store, hash-verified

3992
3993/* extr.xml */
3994int EXTR(context *ctx, Instruction *instr)
3995{
3996 int rc = DECODE_STATUS_UNMATCHED;
3997 /* class iclass_general */
3998 /* sf=x|op21=00|100111|N=x|o0=0|Rm=xxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */
3999 if((INSWORD & 0x7FA00000)==0x13800000) {
4000 decode_fields32(ENC_EXTR_32_EXTRACT, ctx, instr);
4001 ctx->d = UINT(ctx->Rd);
4002 ctx->n = UINT(ctx->Rn);
4003 ctx->m = UINT(ctx->Rm);
4004 ctx->datasize = (ctx->sf==1) ? 0x40 : 0x20;
4005 if(ctx->N!=ctx->sf) {
4006 UNDEFINED;
4007 }
4008 if(ctx->sf==0 && SLICE(ctx->imms,5,5)==1) {
4009 UNDEFINED;
4010 }
4011 ctx->lsb = UINT(ctx->imms);
4012 /* regular aliases */
4013 if(ctx->Rn==ctx->Rm) return ROR_EXTR(ctx, instr);
4014 if(ctx->sf==0 && ctx->N==0 && !(ctx->imms&0x20)) OK(ENC_EXTR_32_EXTRACT);
4015 if(ctx->sf==1 && ctx->N==1) OK(ENC_EXTR_64_EXTRACT);
4016 }
4017 return rc;
4018}
4019
4020/* ext_advsimd.xml */
4021int EXT_advsimd(context *ctx, Instruction *instr)

Callers 1

decode_iclass_extractFunction · 0.85

Calls 2

decode_fields32Function · 0.85
ROR_EXTRFunction · 0.85

Tested by

no test coverage detected