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

Function LDNP_gen

arch/arm64/disassembler/decode2.c:14112–14142  ·  view source on GitHub ↗

ldnp_gen.xml */

Source from the content-addressed store, hash-verified

14110
14111/* ldnp_gen.xml */
14112int LDNP_gen(context *ctx, Instruction *instr)
14113{
14114 int rc = DECODE_STATUS_UNMATCHED;
14115 /* class iclass_signed_scaled_offset */
14116 /* opc=x0|101|V=0|000|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */
14117 if((INSWORD & 0x7FC00000)==0x28400000) {
14118 decode_fields32(ENC_LDNP_32_LDSTNAPAIR_OFFS, ctx, instr);
14119 if(ctx->opc==0) OK(ENC_LDNP_32_LDSTNAPAIR_OFFS);
14120 if(ctx->opc==2) OK(ENC_LDNP_64_LDSTNAPAIR_OFFS);
14121 }
14122 /* post-decode pcode */
14123 ctx->n = UINT(ctx->Rn);
14124 ctx->t = UINT(ctx->Rt);
14125 ctx->t2 = UINT(ctx->Rt2);
14126 ctx->acctype = ctx->AccType_STREAM;
14127 ctx->memop = (ctx->L==1) ? MemOp_LOAD : MemOp_STORE;
14128 if(SLICE(ctx->opc,0,0)==1) {
14129 UNDEFINED;
14130 }
14131 ctx->scale = 2+UINT(SLICE(ctx->opc,1,1));
14132 ctx->datasize = (8) << (ctx->scale);
14133 ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale);
14134 ctx->tag_checked = ctx->wback || ctx->n!=0x1f;
14135 ctx->rt_unknown = FALSE;
14136 if(ctx->memop==MemOp_LOAD && ctx->t==ctx->t2) {
14137 ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP);
14138 // assert
14139 // switch on constraint
14140 }
14141 return rc;
14142}
14143
14144/* ldpsw.xml */
14145int LDPSW(context *ctx, Instruction *instr)

Callers 1

Calls 3

decode_fields32Function · 0.85
SignExtendFunction · 0.85
ConstrainUnpredictableFunction · 0.85

Tested by

no test coverage detected