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

Function EON

arch/arm64/disassembler/decode2.c:3637–3678  ·  view source on GitHub ↗

eon.xml */

Source from the content-addressed store, hash-verified

3635
3636/* eon.xml */
3637int EON(context *ctx, Instruction *instr)
3638{
3639 int rc = DECODE_STATUS_UNMATCHED;
3640 /* class iclass_no_s */
3641 /* sf=x|opc=10|01010|shift=xx|N=1|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */
3642 if((INSWORD & 0x7F200000)==0x4A200000) {
3643 decode_fields32(ENC_EON_32_LOG_SHIFT, ctx, instr);
3644 ctx->d = UINT(ctx->Rd);
3645 ctx->n = UINT(ctx->Rn);
3646 ctx->m = UINT(ctx->Rm);
3647 ctx->datasize = (ctx->sf==1) ? 0x40 : 0x20;
3648 if(!ctx->opc) {
3649 ctx->op = LogicalOp_AND;
3650 ctx->setflags = FALSE;
3651 instr->setflags = FLAGEFFECT_NONE;
3652 }
3653 else if(ctx->opc==1) {
3654 ctx->op = LogicalOp_ORR;
3655 ctx->setflags = FALSE;
3656 instr->setflags = FLAGEFFECT_NONE;
3657 }
3658 else if(ctx->opc==2) {
3659 ctx->op = LogicalOp_EOR;
3660 ctx->setflags = FALSE;
3661 instr->setflags = FLAGEFFECT_NONE;
3662 }
3663 else if(ctx->opc==3) {
3664 ctx->op = LogicalOp_AND;
3665 ctx->setflags = TRUE;
3666 instr->setflags = FLAGEFFECT_SETS;
3667 }
3668 if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) {
3669 UNDEFINED;
3670 }
3671 ctx->shift_type = DecodeShift(ctx->shift);
3672 ctx->shift_amount = UINT(ctx->imm6);
3673 ctx->invert = (ctx->N==1);
3674 if(ctx->sf==0) OK(ENC_EON_32_LOG_SHIFT);
3675 if(ctx->sf==1) OK(ENC_EON_64_LOG_SHIFT);
3676 }
3677 return rc;
3678}
3679
3680/* eon_eor_z_zi.xml */
3681int EON_eor_z_zi(context *ctx, Instruction *instr)

Callers 1

decode_iclass_log_shiftFunction · 0.85

Calls 2

decode_fields32Function · 0.85
DecodeShiftFunction · 0.85

Tested by

no test coverage detected